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

Issue 2199913002: Notify demux stream clients when a stream is disabled. (Closed)

Created:
4 years, 4 months ago by servolk
Modified:
4 years, 4 months ago
CC:
Aaron Boodman, abarth-chromium, alokp+watch_chromium.org, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), feature-media-reviews_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Notify demux stream clients when a stream is disabled. Currently DemuxerStream client are notified about the stream being disabled by an EOS buffer being returned from the Read call. But that is problematic on media pipelines with deep buffering (like Chromecast) where the client would have to read and process all previous buffers before getting the EOS buffer. In order to ensure that disabling a demuxer stream happens instantly, we need to notify clients via the same mechanism that is currently being used for notifying them about stream being re-enabled. This change will make it so that the corresponding renderer gets flushed as soon as the DemuxerStream is disabled. And then the renderer is going to be restarted, will read the EOS buffer from the stream and will go into the 'ended' state just like before. BUG=633299 Committed: https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6 Cr-Commit-Position: refs/heads/master@{#409941}

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : Fixed Chromecast build #

Patch Set 4 : Added tests #

Patch Set 5 : Verify that the streams are restarted in the new test #

Patch Set 6 : Pass stream enabled/disabled flag into StatusChangeCB #

Total comments: 9

Patch Set 7 : Don't pass DemuxerStream into the status callback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -47 lines) Patch
M chromecast/media/cma/base/demuxer_stream_for_test.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chromecast/media/cma/base/demuxer_stream_for_test.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M media/base/demuxer_stream.h View 1 2 3 4 5 6 1 chunk +6 lines, -3 lines 0 comments Download
M media/base/fake_demuxer_stream.h View 1 chunk +1 line, -1 line 0 comments Download
M media/base/fake_demuxer_stream.cc View 1 chunk +2 lines, -1 line 0 comments Download
M media/base/fake_text_track_stream.h View 1 chunk +1 line, -1 line 0 comments Download
M media/base/fake_text_track_stream.cc View 1 chunk +2 lines, -1 line 0 comments Download
M media/base/mock_filters.h View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/chunk_demuxer.h View 2 chunks +2 lines, -2 lines 0 comments Download
M media/filters/chunk_demuxer.cc View 1 2 3 4 5 6 1 chunk +5 lines, -4 lines 0 comments Download
M media/filters/chunk_demuxer_unittest.cc View 1 2 3 4 5 6 2 chunks +38 lines, -0 lines 0 comments Download
M media/filters/decrypting_demuxer_stream.h View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/decrypting_demuxer_stream.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 2 chunks +2 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 2 3 4 5 6 1 chunk +5 lines, -4 lines 0 comments Download
M media/mojo/services/mojo_demuxer_stream_adapter.h View 1 chunk +1 line, -1 line 0 comments Download
M media/mojo/services/mojo_demuxer_stream_adapter.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M media/renderers/renderer_impl.h View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M media/renderers/renderer_impl.cc View 1 2 3 4 5 6 3 chunks +18 lines, -16 lines 0 comments Download
M media/renderers/renderer_impl_unittest.cc View 1 2 3 4 5 6 2 chunks +29 lines, -1 line 0 comments Download

Messages

Total messages: 48 (34 generated)
servolk
4 years, 4 months ago (2016-08-02 00:32:52 UTC) #15
chcunningham1
Dale can you stand in for xhwang? I think this change generally looks good, but ...
4 years, 4 months ago (2016-08-03 00:27:17 UTC) #18
DaleCurtis
Mechanically lg2m, but I don't see that you're adding any information to the callback. If ...
4 years, 4 months ago (2016-08-04 00:23:35 UTC) #23
servolk
On 2016/08/04 00:23:35, DaleCurtis wrote: > Mechanically lg2m, but I don't see that you're adding ...
4 years, 4 months ago (2016-08-04 00:28:25 UTC) #24
DaleCurtis
OnStatusChange is pretty generic though; do you want this to only ever mean the stream ...
4 years, 4 months ago (2016-08-04 00:32:14 UTC) #25
servolk
On 2016/08/04 00:32:14, DaleCurtis wrote: > OnStatusChange is pretty generic though; do you want this ...
4 years, 4 months ago (2016-08-04 00:36:59 UTC) #26
DaleCurtis
OnStreamAvailabilityChanged? Though that's a bit misleading since the stream is still there, it's just disabled. ...
4 years, 4 months ago (2016-08-04 00:49:33 UTC) #27
servolk
On 2016/08/04 00:49:33, DaleCurtis wrote: > OnStreamAvailabilityChanged? Though that's a bit misleading since the stream ...
4 years, 4 months ago (2016-08-04 01:15:55 UTC) #31
DaleCurtis
lgtm
4 years, 4 months ago (2016-08-04 01:17:39 UTC) #32
alokp
lgtm % nits https://codereview.chromium.org/2199913002/diff/100001/media/base/demuxer_stream.h File media/base/demuxer_stream.h (right): https://codereview.chromium.org/2199913002/diff/100001/media/base/demuxer_stream.h#newcode110 media/base/demuxer_stream.h:110: using StreamStatusChangeCB = nit: is it ...
4 years, 4 months ago (2016-08-04 19:02:37 UTC) #35
servolk
https://codereview.chromium.org/2199913002/diff/100001/media/base/demuxer_stream.h File media/base/demuxer_stream.h (right): https://codereview.chromium.org/2199913002/diff/100001/media/base/demuxer_stream.h#newcode110 media/base/demuxer_stream.h:110: using StreamStatusChangeCB = On 2016/08/04 19:02:36, alokp wrote: > ...
4 years, 4 months ago (2016-08-04 20:31:48 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2199913002/120001
4 years, 4 months ago (2016-08-04 22:18:20 UTC) #44
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 4 months ago (2016-08-05 00:19:19 UTC) #46
commit-bot: I haz the power
4 years, 4 months ago (2016-08-05 00:21:11 UTC) #48
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6
Cr-Commit-Position: refs/heads/master@{#409941}

Powered by Google App Engine
This is Rietveld 408576698