MediaStreamVideo*/VideoTrackAdapter and RTCVideoRenderer (small) cleanup
commitfc662d105b0365b58f8880034b0b277506866d59
authormcasas <mcasas@chromium.org>
Sat, 14 Mar 2015 04:18:27 +0000 (13 21:18 -0700)
committerCommit bot <commit-bot@chromium.org>
Sat, 14 Mar 2015 04:19:07 +0000 (14 04:19 +0000)
treec606d06458274a4d1bc5922f2c143cc3679c1620
parent82ede215b8c1618b704fd715ed81cbeed1cc09b6
MediaStreamVideo*/VideoTrackAdapter and RTCVideoRenderer (small) cleanup

Some more cleanup. In this CL:

- VideoCapturerDelegate::OnStateUpdateOnRenderThread
 does not need OnRenderThread suffix since it lives on
 Render Thread exclusively. Removed the suffix.

- cosmetic changes (removed unnecessary {}, updated comments).

- media_stream_video_source.cc struct SourceVideoResolution
 does not need to be named, defined anonymously together
 with the array it's used for, |kVideoResolutions|.

- Some for loops are substituted with range-based versions.

- Some member vars are made const.

- Some methods are reordered to follow class declarations.

- MediaStreamVideoTrack::thread_checker_ is unnecessary and
 |main_render_thread_checker_| from parent class can be used
 instead. Similar story for WebRtcLocalAudioTrack.

- MediaStreamVideoTrack::FrameDeliverer uses void* to identify
 a MediaStreamSink, changed to typedef MediaStreamSink* VideoSinkId
and used in this class (IMHO this is more readable).

All these happened to be noticeable as I was re-reading
the code, some kind of state-of-the-pipeline review :)

[1] https://code.google.com/p/chromium/codesearch#chromium/src/remoting/host/audio_pump.cc&l=135

BUG=441836

TBR=avi@chromium.org
(Avi, I'm TBRing you since it's just removing an
unused 2-class forward declaration @
content/public/renderer/media_stream_video_sink.h)

Review URL: https://codereview.chromium.org/976233002

Cr-Commit-Position: refs/heads/master@{#320640}
14 files changed:
content/public/renderer/media_stream_video_sink.h
content/renderer/media/media_stream_track.h
content/renderer/media/media_stream_video_capture_source_unittest.cc
content/renderer/media/media_stream_video_capturer_source.cc
content/renderer/media/media_stream_video_capturer_source.h
content/renderer/media/media_stream_video_source.h
content/renderer/media/media_stream_video_track.cc
content/renderer/media/media_stream_video_track.h
content/renderer/media/rtc_video_renderer.cc
content/renderer/media/rtc_video_renderer.h
content/renderer/media/video_track_adapter.cc
content/renderer/media/video_track_adapter.h
content/renderer/media/webrtc_local_audio_track.cc
content/renderer/media/webrtc_local_audio_track.h