Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Issue 264363005: Cast: deliver video frames on the IO thread (Closed)

Created:
6 years, 7 months ago by Alpha Left Google
Modified:
6 years, 7 months ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org
Visibility:
Public.

Description

Cast: deliver video frames on the IO thread This is the last change to deliver video frames to Cast streaming API on the IO thread. It will no longer be blocked by Javascript events. This needs a change in the MediaStreamVideoSink interface. Also getting rid of the interface of MediaStreamVideoTrack that delivers frames on the render thread. All clients now handle the thread hopping directly. BUG=335327, 371775 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269616

Patch Set 1 #

Patch Set 2 : test #

Patch Set 3 : test again #

Total comments: 1

Patch Set 4 : merged #

Total comments: 3

Patch Set 5 : style nits #

Total comments: 11

Patch Set 6 : done #

Patch Set 7 : upload again #

Total comments: 3

Patch Set 8 : merged #

Patch Set 9 : reset on right thread #

Patch Set 10 : comments #

Total comments: 1

Patch Set 11 : racy condition #

Patch Set 12 : fixed tests #

Total comments: 2

Patch Set 13 : ThreadCheckerImpl #

Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -162 lines) Patch
M chrome/renderer/media/cast_rtp_stream.cc View 1 2 3 4 5 6 7 7 chunks +34 lines, -20 lines 0 comments Download
M content/public/renderer/media_stream_video_sink.h View 1 2 3 4 5 6 7 8 9 3 chunks +14 lines, -2 lines 0 comments Download
M content/public/renderer/media_stream_video_sink.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/media_stream_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_video_source_unittest.cc View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M content/renderer/media/media_stream_video_track.h View 1 2 3 4 5 6 7 8 3 chunks +18 lines, -11 lines 0 comments Download
M content/renderer/media/media_stream_video_track.cc View 5 chunks +10 lines, -39 lines 0 comments Download
M content/renderer/media/media_stream_video_track_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +58 lines, -6 lines 0 comments Download
M content/renderer/media/mock_media_stream_video_sink.h View 1 2 3 4 5 3 chunks +11 lines, -4 lines 0 comments Download
M content/renderer/media/mock_media_stream_video_sink.cc View 1 chunk +15 lines, -3 lines 0 comments Download
M content/renderer/media/rtc_peer_connection_handler_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/rtc_video_renderer.h View 3 chunks +6 lines, -2 lines 0 comments Download
M content/renderer/media/rtc_video_renderer.cc View 6 chunks +14 lines, -4 lines 0 comments Download
M content/renderer/media/video_frame_deliverer.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -2 lines 0 comments Download
M content/renderer/media/video_frame_deliverer.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +18 lines, -3 lines 0 comments Download
M content/renderer/media/video_source_handler.h View 3 chunks +8 lines, -6 lines 0 comments Download
M content/renderer/media/video_source_handler.cc View 1 2 3 4 5 3 chunks +39 lines, -20 lines 0 comments Download
M content/renderer/media/video_source_handler_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +4 lines, -3 lines 0 comments Download
M content/renderer/media/webrtc/media_stream_remote_video_source_unittest.cc View 1 2 chunks +2 lines, -6 lines 0 comments Download
M content/renderer/media/webrtc/video_destination_handler_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +14 lines, -10 lines 0 comments Download
M content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc/webrtc_video_track_adapter.h View 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/media/webrtc/webrtc_video_track_adapter.cc View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -5 lines 0 comments Download
M content/renderer/pepper/pepper_media_stream_video_track_host.h View 3 chunks +5 lines, -3 lines 0 comments Download
M content/renderer/pepper/pepper_media_stream_video_track_host.cc View 7 chunks +18 lines, -7 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Alpha Left Google
6 years, 7 months ago (2014-05-08 07:06:04 UTC) #1
Alpha Left Google
https://codereview.chromium.org/264363005/diff/40001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (left): https://codereview.chromium.org/264363005/diff/40001/chrome/renderer/media/cast_rtp_stream.cc#oldcode233 chrome/renderer/media/cast_rtp_stream.cc:233: // Capture time is calculated using the time when ...
6 years, 7 months ago (2014-05-08 07:08:02 UTC) #2
perkj_chrome
This looks great! lgtm provided the below is addressed. I will try to talk to ...
6 years, 7 months ago (2014-05-08 08:15:07 UTC) #3
perkj_chrome
And actually adding Ronghua and Tommi.
6 years, 7 months ago (2014-05-08 08:20:54 UTC) #4
Alpha Left Google
https://codereview.chromium.org/264363005/diff/70001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/264363005/diff/70001/chrome/renderer/media/cast_rtp_stream.cc#newcode236 chrome/renderer/media/cast_rtp_stream.cc:236: if (frame->coded_size() != expected_coded_size) { On 2014/05/08 08:15:08, perkj ...
6 years, 7 months ago (2014-05-08 18:45:51 UTC) #5
Alpha Left Google
ping ronghua.
6 years, 7 months ago (2014-05-08 18:46:01 UTC) #6
perkj_chrome
see explanation- but I leave it up to you and Ronghua. https://codereview.chromium.org/264363005/diff/70001/content/renderer/media/video_source_handler.h File content/renderer/media/video_source_handler.h (right): ...
6 years, 7 months ago (2014-05-08 19:14:03 UTC) #7
Ronghua Wu (Left Chromium)
Reviewed: video_source_handler* pepper_media_stream_video_track_host* +David and Peng for pepper_media_stream_video_track_host changes. https://codereview.chromium.org/264363005/diff/110001/content/renderer/media/video_source_handler.cc File content/renderer/media/video_source_handler.cc (right): https://codereview.chromium.org/264363005/diff/110001/content/renderer/media/video_source_handler.cc#newcode58 content/renderer/media/video_source_handler.cc:58: ...
6 years, 7 months ago (2014-05-08 21:32:14 UTC) #8
Alpha Left Google
https://codereview.chromium.org/264363005/diff/110001/content/renderer/media/video_source_handler.cc File content/renderer/media/video_source_handler.cc (right): https://codereview.chromium.org/264363005/diff/110001/content/renderer/media/video_source_handler.cc#newcode58 content/renderer/media/video_source_handler.cc:58: if (reader_) { On 2014/05/08 21:32:14, Ronghua Wu wrote: ...
6 years, 7 months ago (2014-05-08 21:48:41 UTC) #9
dmichael (off chromium)
content/renderer/pepper lgtm
6 years, 7 months ago (2014-05-08 21:53:26 UTC) #10
Ronghua Wu (Left Chromium)
video_source_handler* pepper_media_stream_video_track_host* LGTM https://codereview.chromium.org/264363005/diff/110001/content/renderer/media/video_source_handler.cc File content/renderer/media/video_source_handler.cc (right): https://codereview.chromium.org/264363005/diff/110001/content/renderer/media/video_source_handler.cc#newcode58 content/renderer/media/video_source_handler.cc:58: if (reader_) { On 2014/05/08 21:48:41, ...
6 years, 7 months ago (2014-05-08 22:00:03 UTC) #11
Alpha Left Google
+piman for OWNERS approval of content/public
6 years, 7 months ago (2014-05-08 23:04:22 UTC) #12
Alpha Left Google
I have updated the code such that the added callback is guaranteed to be released ...
6 years, 7 months ago (2014-05-09 03:27:47 UTC) #13
piman
https://codereview.chromium.org/264363005/diff/170001/content/renderer/media/video_frame_deliverer.cc File content/renderer/media/video_frame_deliverer.cc (right): https://codereview.chromium.org/264363005/diff/170001/content/renderer/media/video_frame_deliverer.cc#newcode60 content/renderer/media/video_frame_deliverer.cc:60: message_loop->PostTask(FROM_HERE, base::Bind(&ResetCallback, callback)); So, this is racy. If the ...
6 years, 7 months ago (2014-05-09 03:44:22 UTC) #14
Alpha Left Google
I've updated the code to prevent this race condition. It is however very difficult to ...
6 years, 7 months ago (2014-05-09 04:32:23 UTC) #15
tommi (sloooow) - chröme
Sorry for the delay, things have been rather crazy. I took a quick look over ...
6 years, 7 months ago (2014-05-09 16:20:49 UTC) #16
piman
lgtm
6 years, 7 months ago (2014-05-09 16:53:00 UTC) #17
Alpha Left Google
https://codereview.chromium.org/264363005/diff/210001/content/renderer/media/media_stream_video_track_unittest.cc File content/renderer/media/media_stream_video_track_unittest.cc (right): https://codereview.chromium.org/264363005/diff/210001/content/renderer/media/media_stream_video_track_unittest.cc#newcode119 content/renderer/media/media_stream_video_track_unittest.cc:119: *correct_ = thread_checker_.CalledOnValidThread(); Sneaky! Changed it to use ThreadCheckerImpl ...
6 years, 7 months ago (2014-05-09 17:33:22 UTC) #18
Alpha Left Google
The CQ bit was checked by hclam@chromium.org
6 years, 7 months ago (2014-05-09 17:33:28 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hclam@chromium.org/264363005/230001
6 years, 7 months ago (2014-05-09 17:35:08 UTC) #20
commit-bot: I haz the power
6 years, 7 months ago (2014-05-10 19:18:45 UTC) #21
Message was sent while issue was closed.
Change committed as 269616

Powered by Google App Engine
This is Rietveld 408576698