DemuxerStream being disabled is not detected immediately |
||
Issue descriptionI have been testing the disabling/re-enabling of media tracks (and thus demuxer streams) on Chromecast. And I have noticed that, for example, disabling the audio stream doesn't happen instantly, it might take a while (up to several minutes) to take effect. After investigating the root cause of this issue, I think I understand what's happening. Unlink desktop Chrome, Chromecast uses a hardware audio/video decoders with relatively deep pipeline length. The size of hardware audio buffer on Chromecast is 2 megabytes, which translates into several minutes of compressed audio data. So when an audio stream gets disabled, currently we are notified about this by an EOS buffer being returned from DemuxerStream::Read. But that buffer gets processed the same as a regular EOS buffer - it gets put into the audio pipeline and doesn't get processed immediately. So we need a different way of notifying DemuxerStream clients about the stream being disabled.
,
Aug 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/af21ccc6ee855dda09fd437637759071b04439e6 commit af21ccc6ee855dda09fd437637759071b04439e6 Author: servolk <servolk@chromium.org> Date: Fri Aug 05 00:18:39 2016 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 Review-Url: https://codereview.chromium.org/2199913002 Cr-Commit-Position: refs/heads/master@{#409941} [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/chromecast/media/cma/base/demuxer_stream_for_test.cc [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/chromecast/media/cma/base/demuxer_stream_for_test.h [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/base/demuxer_stream.h [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/base/fake_demuxer_stream.cc [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/base/fake_demuxer_stream.h [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/base/fake_text_track_stream.cc [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/base/fake_text_track_stream.h [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/base/mock_filters.h [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/filters/chunk_demuxer.cc [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/filters/chunk_demuxer.h [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/filters/chunk_demuxer_unittest.cc [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/filters/decrypting_demuxer_stream.cc [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/filters/decrypting_demuxer_stream.h [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/filters/ffmpeg_demuxer.cc [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/filters/ffmpeg_demuxer.h [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/mojo/services/mojo_demuxer_stream_adapter.cc [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/mojo/services/mojo_demuxer_stream_adapter.h [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/renderers/renderer_impl.cc [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/renderers/renderer_impl.h [modify] https://crrev.com/af21ccc6ee855dda09fd437637759071b04439e6/media/renderers/renderer_impl_unittest.cc
,
Aug 5 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by servolk@chromium.org
, Aug 1 2016Labels: OS-All