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

Issue 692323002: Move Liveness from DemuxerStreamProvider to DemuxerStream. (Closed)

Created:
6 years, 1 month ago by xhwang
Modified:
6 years, 1 month ago
Reviewers:
wolenetz
CC:
chromium-reviews, qsr+mojo_chromium.org, Aaron Boodman, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, feature-media-reviews_chromium.org, darin (slow to review), ben+mojo_chromium.org, DaleCurtis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Move Liveness from DemuxerStreamProvider to DemuxerStream. The "Liveness" really is a property of a stream (as in "live stream"). Also this helps us remove a lot of plumbing code for the "liveness" or "low delay". Committed: https://crrev.com/2f7e4aca24bb09def39cf2fa0604d95189f9a5fb Cr-Commit-Position: refs/heads/master@{#304240}

Patch Set 1 #

Patch Set 2 : #

Total comments: 24

Patch Set 3 : comments addressed #

Patch Set 4 : rebase only #

Patch Set 5 : fix mojo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -174 lines) Patch
M media/base/demuxer_stream.h View 1 2 2 chunks +14 lines, -6 lines 0 comments Download
M media/base/demuxer_stream.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M media/base/demuxer_stream_provider.h View 2 chunks +0 lines, -9 lines 0 comments Download
M media/base/fake_text_track_stream.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M media/base/fake_text_track_stream.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M media/base/mock_filters.h View 1 2 3 chunks +9 lines, -8 lines 0 comments Download
M media/base/mock_filters.cc View 1 2 2 chunks +12 lines, -2 lines 0 comments Download
M media/base/pipeline_unittest.cc View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M media/base/stream_parser.h View 2 chunks +2 lines, -1 line 0 comments Download
M media/base/stream_parser.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/base/video_renderer.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M media/filters/audio_decoder_selector_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M media/filters/audio_renderer_impl.cc View 1 chunk +1 line, -3 lines 0 comments Download
M media/filters/chunk_demuxer.h View 1 2 6 chunks +7 lines, -4 lines 0 comments Download
M media/filters/chunk_demuxer.cc View 1 2 6 chunks +18 lines, -14 lines 0 comments Download
M media/filters/decoder_selector.h View 2 chunks +0 lines, -2 lines 0 comments Download
M media/filters/decoder_selector.cc View 4 chunks +4 lines, -10 lines 0 comments Download
M media/filters/decoder_stream.h View 2 chunks +0 lines, -2 lines 0 comments Download
M media/filters/decoder_stream.cc View 1 2 4 chunks +3 lines, -9 lines 0 comments Download
M media/filters/decoder_stream_traits.h View 2 chunks +8 lines, -14 lines 0 comments Download
M media/filters/decoder_stream_traits.cc View 4 chunks +10 lines, -20 lines 0 comments Download
M media/filters/decrypting_demuxer_stream.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M media/filters/decrypting_demuxer_stream.cc View 1 2 1 chunk +6 lines, -1 line 0 comments Download
M media/filters/fake_demuxer_stream.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M media/filters/fake_demuxer_stream.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 2 6 chunks +7 lines, -5 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 2 8 chunks +28 lines, -14 lines 0 comments Download
M media/filters/frame_processor_unittest.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M media/filters/renderer_impl.cc View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M media/filters/renderer_impl_unittest.cc View 1 2 3 3 chunks +8 lines, -10 lines 0 comments Download
M media/filters/video_decoder_selector_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M media/filters/video_frame_stream_unittest.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M media/filters/video_renderer_impl.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M media/filters/video_renderer_impl.cc View 1 2 3 chunks +2 lines, -5 lines 0 comments Download
M media/filters/video_renderer_impl_unittest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M media/formats/webm/webm_stream_parser.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M media/mojo/services/demuxer_stream_provider_shim.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M media/mojo/services/demuxer_stream_provider_shim.cc View 1 2 1 chunk +0 lines, -6 lines 0 comments Download
M media/mojo/services/media_renderer_apptest.cc View 1 2 2 chunks +1 line, -4 lines 0 comments Download
M media/mojo/services/mojo_demuxer_stream_adapter.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M media/mojo/services/mojo_demuxer_stream_adapter.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 13 (2 generated)
xhwang
wolenetz: PTAL dalecurtis: FYI
6 years, 1 month ago (2014-11-01 06:01:13 UTC) #2
xhwang
BTW: This doesn't address the issue discussed in issue 420025. But I felt this is ...
6 years, 1 month ago (2014-11-01 06:06:41 UTC) #3
xhwang
wolenetz: kindly ping!
6 years, 1 month ago (2014-11-11 17:18:35 UTC) #4
wolenetz
On 2014/11/11 17:18:35, xhwang wrote: > wolenetz: kindly ping! taking a look now. thanks for ...
6 years, 1 month ago (2014-11-11 22:46:30 UTC) #5
wolenetz
lgtm % nits and double-checks: https://codereview.chromium.org/692323002/diff/20001/media/base/demuxer_stream.h File media/base/demuxer_stream.h (right): https://codereview.chromium.org/692323002/diff/20001/media/base/demuxer_stream.h#newcode75 media/base/demuxer_stream.h:75: virtual Type type() = ...
6 years, 1 month ago (2014-11-11 23:48:07 UTC) #6
xhwang
https://codereview.chromium.org/692323002/diff/20001/media/base/demuxer_stream.h File media/base/demuxer_stream.h (right): https://codereview.chromium.org/692323002/diff/20001/media/base/demuxer_stream.h#newcode75 media/base/demuxer_stream.h:75: virtual Type type() = 0; On 2014/11/11 23:48:07, wolenetz ...
6 years, 1 month ago (2014-11-14 06:38:05 UTC) #7
xhwang
rebase only
6 years, 1 month ago (2014-11-14 07:05:56 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/692323002/80001
6 years, 1 month ago (2014-11-14 17:47:12 UTC) #10
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years, 1 month ago (2014-11-14 18:37:45 UTC) #11
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/2f7e4aca24bb09def39cf2fa0604d95189f9a5fb Cr-Commit-Position: refs/heads/master@{#304240}
6 years, 1 month ago (2014-11-14 18:38:31 UTC) #12
wolenetz
6 years, 1 month ago (2014-11-14 19:21:58 UTC) #13
Message was sent while issue was closed.
https://codereview.chromium.org/692323002/diff/20001/media/base/pipeline_unit...
File media/base/pipeline_unittest.cc (left):

https://codereview.chromium.org/692323002/diff/20001/media/base/pipeline_unit...
media/base/pipeline_unittest.cc:102:
.WillRepeatedly(Return(Demuxer::LIVENESS_UNKNOWN));
On 2014/11/14 06:38:04, xhwang wrote:
> On 2014/11/11 23:48:07, wolenetz wrote:
> > Just a double-check: pipeline no longer should care at all about whether a
> > demuxer (or the streams produced by a demuxer) has some particular liveness,
> > right?
> 
> Yes. This is just to suppress warnings.

Acknowledged.

https://codereview.chromium.org/692323002/diff/20001/media/filters/chunk_demu...
File media/filters/chunk_demuxer.cc (right):

https://codereview.chromium.org/692323002/diff/20001/media/filters/chunk_demu...
media/filters/chunk_demuxer.cc:1645: MEDIA_LOG(log_cb_)
On 2014/11/14 06:38:04, xhwang wrote:
> On 2014/11/11 23:48:07, wolenetz wrote:
> > Moving this logic to decoders (or just removing this) is for a later CL as
> part
> > of bug 420025 fix, right?
> 
> Yes, I'll handle that in a separate CL.

Acknowledged.

https://codereview.chromium.org/692323002/diff/20001/media/filters/decoder_st...
File media/filters/decoder_stream_traits.cc (right):

https://codereview.chromium.org/692323002/diff/20001/media/filters/decoder_st...
media/filters/decoder_stream_traits.cc:27:
decoder->Initialize(stream->audio_decoder_config(), status_cb, output_cb);
On 2014/11/14 06:38:04, xhwang wrote:
> On 2014/11/11 23:48:07, wolenetz wrote:
> > Another double-check: Audio decoders don't care about "low delay" or
liveness,
> > right?
> 
> I think it's either not needed, or not implemented yet.

Acknowledged.

https://codereview.chromium.org/692323002/diff/20001/media/filters/video_rend...
File media/filters/video_renderer_impl.cc (right):

https://codereview.chromium.org/692323002/diff/20001/media/filters/video_rend...
media/filters/video_renderer_impl.cc:127: low_delay_ = (stream->liveness() ==
DemuxerStream::LIVENESS_LIVE);
On 2014/11/14 06:38:04, xhwang wrote:
> On 2014/11/11 23:48:07, wolenetz wrote:
> > nit: This logic is now in multiple places (see also
> > DecoderStreamTraits<DemuxerStream::VIDEO>::InitializeDecoder(), and inverse
in
> > VideoRendererImplTest::CallInitialize()). Can some of this be simplified
> (maybe
> > as a static method in DemuxerStream such as:
> > static bool is_low_delay(Liveness liveness) { return liveness ==
> LIVENESS_LIVE;
> > } )
> 
> Hmm, I don't feel
> 
> DemuxerStream::is_low_delay(stream->liveness)
> 
> is much better than 
> 
> stream->liveness() == DemuxerStream::LIVENESS_LIVE
> 
> Maybe we don't need liveness at all in DemuxerStream. A boolean "low_delay"
> would suffice.
> 
> I'll like to iterate on this later.

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698