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

Issue 2226443002: Support multiple media tracks in MSE / ChunkDemuxer (Closed)

Created:
4 years, 4 months ago by servolk
Modified:
4 years, 3 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support multiple media tracks in MSE / ChunkDemuxer This will also allow multiple audio/video SourceBuffers for a single MediaSource. Note that for now we'll still only select/play the first audio and video track by default. Switching between tracks will require further work in media renderers. A few notes: Most of the changes are straightforward, except media_source_state.* In order to allow multiple tracks in a single SourceBuffer, we'll now pass the codecs parameter from WSBI further down to ChunkDemuxer and MediaSourceState, replacing the old has_audio/has_video flags. The new MSS::OnNewConfigs structure is much closer to the MSE init segment handling algorithm, with essentially the same logic for handling new/existing track ids and such. BUG=487288 Committed: https://crrev.com/d3acf22f7d91ad262a07075848fad13b94d15226 Cr-Commit-Position: refs/heads/master@{#420113}

Patch Set 1 #

Patch Set 2 : wip #

Patch Set 3 : wip #

Patch Set 4 : wip #

Patch Set 5 : wip #

Patch Set 6 : rebase #

Patch Set 7 : wip #

Patch Set 8 : wip #

Patch Set 9 : Fixed MSE/EME tests #

Patch Set 10 : rebase #

Patch Set 11 : Improved tests #

Patch Set 12 : rebase #

Patch Set 13 : Refactored OnNewConfigs #

Patch Set 14 : Fixed addSourceBuffer test #

Patch Set 15 : A few clean ups #

Total comments: 24

Patch Set 16 : Replace pending_source_init_done_count_ with pending_source_init_ids_ set #

Total comments: 5

Patch Set 17 : Remove demuxer streams created for the removed MediaSourceState/SourceBuffer #

Patch Set 18 : Keep alive demuxer streams for removed ChunkDemuxer ids #

Patch Set 19 : mp4 format is not supported on some trybots, so use webm #

Total comments: 69

Patch Set 20 : Fixed EvictCodecFrame + other CR feedback #

Patch Set 21 : nit #

Total comments: 9

Patch Set 22 : CR feedback #

Total comments: 8

Patch Set 23 : CR feedback #

Total comments: 15

Patch Set 24 : CR feedback #

Patch Set 25 : nit #

Patch Set 26 : Fixed integer overflow #

Unified diffs Side-by-side diffs Delta from patch set Stats (+869 lines, -612 lines) Patch
M media/base/audio_codecs.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M media/base/audio_codecs.cc View 1 2 3 4 5 6 2 chunks +23 lines, -0 lines 0 comments Download
M media/base/media_track.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +3 lines, -0 lines 0 comments Download
M media/base/media_track.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +13 lines, -0 lines 0 comments Download
M media/base/video_codecs.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M media/base/video_codecs.cc View 1 2 3 4 5 6 1 chunk +22 lines, -0 lines 0 comments Download
M media/blink/webmediasource_impl.cc View 1 2 3 4 5 6 1 chunk +2 lines, -6 lines 0 comments Download
M media/filters/chunk_demuxer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 7 chunks +25 lines, -19 lines 0 comments Download
M media/filters/chunk_demuxer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 16 chunks +143 lines, -98 lines 0 comments Download
M media/filters/chunk_demuxer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 32 chunks +172 lines, -109 lines 0 comments Download
M media/filters/frame_processor.h View 1 2 3 4 5 1 chunk +0 lines, -9 lines 0 comments Download
M media/filters/frame_processor.cc View 1 2 3 4 5 2 chunks +7 lines, -18 lines 0 comments Download
M media/filters/frame_processor_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M media/filters/media_source_state.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +17 lines, -15 lines 0 comments Download
M media/filters/media_source_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 25 chunks +371 lines, -293 lines 0 comments Download
M media/filters/stream_parser_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -7 lines 0 comments Download
M media/filters/stream_parser_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -8 lines 0 comments Download
M media/test/data/README View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +11 lines, -0 lines 0 comments Download
A media/test/data/green-a300hz.webm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Binary file 0 comments Download
A media/test/data/red-a500hz.webm View 1 2 3 4 5 6 7 8 9 10 11 12 Binary file 0 comments Download
M media/test/pipeline_integration_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +6 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +43 lines, -19 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 149 (116 generated)
servolk
4 years, 3 months ago (2016-09-02 17:32:21 UTC) #58
DaleCurtis
This one's on the MSE experts.
4 years, 3 months ago (2016-09-06 18:49:28 UTC) #65
wolenetz
I didn't review beyond CD.cc on this first pass, though I found some things that ...
4 years, 3 months ago (2016-09-06 21:20:50 UTC) #68
servolk
https://codereview.chromium.org/2226443002/diff/280001/media/filters/chunk_demuxer.cc File media/filters/chunk_demuxer.cc (right): https://codereview.chromium.org/2226443002/diff/280001/media/filters/chunk_demuxer.cc#newcode9 media/filters/chunk_demuxer.cc:9: #include <set> On 2016/09/06 21:20:50, wolenetz wrote: > nit: ...
4 years, 3 months ago (2016-09-07 01:35:10 UTC) #69
servolk
On 2016/09/07 01:35:10, servolk wrote: > https://codereview.chromium.org/2226443002/diff/280001/media/filters/chunk_demuxer.cc > File media/filters/chunk_demuxer.cc (right): > > https://codereview.chromium.org/2226443002/diff/280001/media/filters/chunk_demuxer.cc#newcode9 > ...
4 years, 3 months ago (2016-09-07 02:23:26 UTC) #70
servolk
On 2016/09/07 02:23:26, servolk wrote: > On 2016/09/07 01:35:10, servolk wrote: > > > https://codereview.chromium.org/2226443002/diff/280001/media/filters/chunk_demuxer.cc ...
4 years, 3 months ago (2016-09-07 17:26:59 UTC) #75
wolenetz
On 2016/09/07 17:26:59, servolk wrote: > On 2016/09/07 02:23:26, servolk wrote: > > On 2016/09/07 ...
4 years, 3 months ago (2016-09-09 23:02:09 UTC) #76
wolenetz
Looking better - I found another pre-existing case which we should look into fixing with ...
4 years, 3 months ago (2016-09-12 21:41:06 UTC) #77
servolk
https://codereview.chromium.org/2226443002/diff/300001/media/filters/chunk_demuxer.cc File media/filters/chunk_demuxer.cc (right): https://codereview.chromium.org/2226443002/diff/300001/media/filters/chunk_demuxer.cc#newcode630 media/filters/chunk_demuxer.cc:630: void ChunkDemuxer::RemoveId(const std::string& id) { On 2016/09/12 21:41:06, wolenetz ...
4 years, 3 months ago (2016-09-13 02:09:31 UTC) #79
servolk
https://codereview.chromium.org/2226443002/diff/300001/media/filters/chunk_demuxer.cc File media/filters/chunk_demuxer.cc (right): https://codereview.chromium.org/2226443002/diff/300001/media/filters/chunk_demuxer.cc#newcode630 media/filters/chunk_demuxer.cc:630: void ChunkDemuxer::RemoveId(const std::string& id) { On 2016/09/13 02:09:30, servolk ...
4 years, 3 months ago (2016-09-13 17:14:48 UTC) #85
wolenetz
Looking quite good. Almost there. Full review pass this time, one further case noted which ...
4 years, 3 months ago (2016-09-13 21:03:14 UTC) #92
servolk
https://codereview.chromium.org/2226443002/diff/360001/media/filters/chunk_demuxer.cc File media/filters/chunk_demuxer.cc (right): https://codereview.chromium.org/2226443002/diff/360001/media/filters/chunk_demuxer.cc#newcode496 media/filters/chunk_demuxer.cc:496: if (s->enabled()) On 2016/09/13 21:03:13, wolenetz wrote: > Add ...
4 years, 3 months ago (2016-09-14 18:15:27 UTC) #97
wolenetz
https://codereview.chromium.org/2226443002/diff/360001/media/filters/chunk_demuxer.cc File media/filters/chunk_demuxer.cc (right): https://codereview.chromium.org/2226443002/diff/360001/media/filters/chunk_demuxer.cc#newcode496 media/filters/chunk_demuxer.cc:496: if (s->enabled()) On 2016/09/14 18:15:24, servolk wrote: > On ...
4 years, 3 months ago (2016-09-14 23:31:22 UTC) #102
wolenetz
One further note: https://codereview.chromium.org/2226443002/diff/360001/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html File third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html (right): https://codereview.chromium.org/2226443002/diff/360001/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html#newcode148 third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html:148: }, "Test addSourceBuffer() throws QuotaExceededError after ...
4 years, 3 months ago (2016-09-14 23:34:27 UTC) #103
wolenetz
One further note: https://codereview.chromium.org/2226443002/diff/360001/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html File third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html (right): https://codereview.chromium.org/2226443002/diff/360001/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html#newcode148 third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html:148: }, "Test addSourceBuffer() throws QuotaExceededError after ...
4 years, 3 months ago (2016-09-14 23:34:28 UTC) #104
servolk
https://codereview.chromium.org/2226443002/diff/360001/media/filters/chunk_demuxer_unittest.cc File media/filters/chunk_demuxer_unittest.cc (right): https://codereview.chromium.org/2226443002/diff/360001/media/filters/chunk_demuxer_unittest.cc#newcode4736 media/filters/chunk_demuxer_unittest.cc:4736: EXPECT_MEDIA_LOG(SegmentMissingFrames("1")).Times(AnyNumber()); On 2016/09/14 23:31:21, wolenetz wrote: > On 2016/09/14 ...
4 years, 3 months ago (2016-09-15 00:18:33 UTC) #106
servolk
4 years, 3 months ago (2016-09-15 00:18:34 UTC) #107
wolenetz
Aside from nits, almost l*tm except there are some problems in last few patch sets ...
4 years, 3 months ago (2016-09-15 01:00:09 UTC) #109
servolk
All done and I believe the test failures in patchset #21 were random flakes, since ...
4 years, 3 months ago (2016-09-15 02:13:07 UTC) #112
wolenetz
LGTM % patch set 22 is having trouble with the *quota-exceeded-* tests again (pass before ...
4 years, 3 months ago (2016-09-15 18:04:50 UTC) #117
wolenetz
On 2016/09/15 18:04:50, wolenetz wrote: > LGTM % patch set 22 is having trouble with ...
4 years, 3 months ago (2016-09-15 18:05:22 UTC) #118
wolenetz
Please also await chcunningham@'s review of this.
4 years, 3 months ago (2016-09-15 20:32:16 UTC) #121
chcunningham
Nice change. Kudos to Matt for doing the heavy lifting in this CR. https://codereview.chromium.org/2226443002/diff/440001/media/filters/chunk_demuxer.cc File ...
4 years, 3 months ago (2016-09-16 00:05:06 UTC) #122
servolk
https://codereview.chromium.org/2226443002/diff/440001/media/filters/chunk_demuxer.cc File media/filters/chunk_demuxer.cc (right): https://codereview.chromium.org/2226443002/diff/440001/media/filters/chunk_demuxer.cc#newcode725 media/filters/chunk_demuxer.cc:725: selected_stream = track_id_to_demux_stream_map_[track_ids[0]]; On 2016/09/16 00:05:06, chcunningham wrote: > ...
4 years, 3 months ago (2016-09-16 00:34:31 UTC) #123
servolk
On 2016/09/15 18:04:50, wolenetz wrote: > LGTM % patch set 22 is having trouble with ...
4 years, 3 months ago (2016-09-16 00:36:35 UTC) #126
chcunningham1
https://codereview.chromium.org/2226443002/diff/440001/media/filters/media_source_state.cc File media/filters/media_source_state.cc (right): https://codereview.chromium.org/2226443002/diff/440001/media/filters/media_source_state.cc#newcode592 media/filters/media_source_state.cc:592: if (audio_streams_.size() > 1) { Right, I see your ...
4 years, 3 months ago (2016-09-16 16:49:19 UTC) #130
servolk
https://codereview.chromium.org/2226443002/diff/440001/media/filters/media_source_state.cc File media/filters/media_source_state.cc (right): https://codereview.chromium.org/2226443002/diff/440001/media/filters/media_source_state.cc#newcode592 media/filters/media_source_state.cc:592: if (audio_streams_.size() > 1) { On 2016/09/16 16:49:19, chcunningham1 ...
4 years, 3 months ago (2016-09-16 17:05:19 UTC) #131
chcunningham1
My first thought is to use a mock stream parser. Then the parser can claim ...
4 years, 3 months ago (2016-09-16 18:47:55 UTC) #132
servolk
On 2016/09/16 18:47:55, chcunningham1 wrote: > My first thought is to use a mock stream ...
4 years, 3 months ago (2016-09-21 02:04:07 UTC) #135
chcunningham
LGTM!
4 years, 3 months ago (2016-09-21 18:24:09 UTC) #142
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/2226443002/500001
4 years, 3 months ago (2016-09-21 18:25:40 UTC) #145
commit-bot: I haz the power
Committed patchset #26 (id:500001)
4 years, 3 months ago (2016-09-21 18:35:16 UTC) #147
commit-bot: I haz the power
4 years, 3 months ago (2016-09-21 18:39:20 UTC) #149
Message was sent while issue was closed.
Patchset 26 (id:??) landed as
https://crrev.com/d3acf22f7d91ad262a07075848fad13b94d15226
Cr-Commit-Position: refs/heads/master@{#420113}

Powered by Google App Engine
This is Rietveld 408576698