###chromium webrtc視頻顯示 ###
兩個數據源:
本地數據源: MediaStreamRemoteVideoSource(content/renderer/media/webrtc/media_stream_remote_video_source.cc),
數據錨點在video_track_adapter。
遠端數據源: MediaStreamVideoCapturerSource(content/renderer/media/stream/media_stream_video_capturer_source.cc),
數據錨點在video_track_adapter。web
一個WebMediaPlayerMS表示一個播放器。ide
TX:
OnFrameReadyInBuffer@content/browser/renderer_host/media/video_capture_controller.cc.
OnBufferReady@content/renderer/media/video_capture_impl.cc (收到相機幀)
VideoTrackAdapter::DeliverFrameOnIO @content\renderer\media\stream\video_track_adapter.cc.
DeliverFrameOnIO@content\renderer\media\stream\video_track_adapter.cc.
MediaStreamVideoTrack::FrameDeliverer::DeliverFrameOnIO @ media_stream_video_track.cc [本地video track]
WebRtcVideoSourceAdapter::OnVideoFrameOnIO @ media_stream_video_webrtc_sink.cc
WebRtcVideoCapturerAdapter::OnFrameCaptured @ webrtc_video_capturer_adapter.cc (錄製的數據送進WEBRTC)。
預覽顯示:
OnVideoFrame @ media_stream_video_renderer_sink.cc [鏈接到了本地video track]
repaint_cb_.Run(frame);//繪製本地圖像。線程
RX:
RemoteVideoSourceDelegate::OnFrame @ media_stream_remote_video_source.cc RTC線程。
RemoteVideoSourceDelegate::DoRenderFrameOnIOThread @ media_stream_remote_video_source.cc IO線程。
MediaStreamVideoTrack::FrameDeliverer::DeliverFrameOnIO @ media_stream_video_track.cc [遠程video track]
OnVideoFrame @ media_stream_video_renderer_sink.cc
repaint_cb_.Run(frame);//繪製遠程圖像。視頻