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

Issue 170233009: Initial implementation of AudioTrack, AudioTrackList, VideoTrack, and VideoTrackList. (Closed)

Created:
6 years, 10 months ago by acolwell GONE FROM CHROMIUM
Modified:
6 years, 7 months ago
CC:
blink-reviews, fs, eric.carlson_apple.com, nessy, adamk+blink_chromium.org, rwlbuis, Nils Barth (inactive), jamesr, Nate Chapin, arv+blink, dsinclair, abarth-chromium, danakj, marja+watch_chromium.org, dglazkov+blink, Rik, pdr., sof, jbroman, feature-media-reviews_chromium.org, krit, haraken, kojih, vcarbune.chromium, jsbell+bindings_chromium.org, gasubic, Inactive, Stephen Chennney, watchdog-blink-watchlist_google.com
Base URL:
https://chromium.googlesource.com/chromium/blink.git@blink-master
Visibility:
Public.

Description

Initial implementation of AudioTrack, AudioTrackList, VideoTrack, and VideoTrackList. This patch add the audioTracks and videoTracks attributes to HTMLMediaElement. These changes provide basic functionality that will bring us closer to HTML5 spec compliance. It also adds methods to WebMediaPlayer and WebMediaPlayerClient so the media engine in Chromium can notify Blink of audio & video tracks and Blink can notify Chromium of user/script initiated track selection changes. BUG=249427 TEST=LayoutTests/media/avtracklists.html

Patch Set 1 #

Total comments: 8

Patch Set 2 : Rebased, reworked impl, and addressed comments. #

Total comments: 44

Patch Set 3 : Addressed CR comments. #

Patch Set 4 : Rebase #

Total comments: 45

Patch Set 5 : Rebase #

Total comments: 36

Patch Set 6 : Address CR comments. #

Total comments: 12

Patch Set 7 : Rebase #

Patch Set 8 : Addressed IDL comments. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1056 lines, -13 lines) Patch
A LayoutTests/media/avtracklists.html View 1 2 3 4 5 1 chunk +93 lines, -0 lines 0 comments Download
M Source/bindings/v8/custom/V8TrackEventCustom.cpp View 2 chunks +7 lines, -3 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 3 chunks +13 lines, -0 lines 0 comments Download
M Source/core/events/EventTargetFactory.in View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLMediaElement.h View 1 2 3 4 5 6 6 chunks +29 lines, -0 lines 0 comments Download
M Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 5 6 15 chunks +217 lines, -0 lines 1 comment Download
M Source/core/html/HTMLMediaElement.idl View 1 1 chunk +2 lines, -0 lines 0 comments Download
A Source/core/html/track/AudioTrack.h View 1 2 3 4 5 1 chunk +46 lines, -0 lines 0 comments Download
A Source/core/html/track/AudioTrack.cpp View 1 2 3 4 5 1 chunk +90 lines, -0 lines 0 comments Download
A Source/core/html/track/AudioTrack.idl View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
A Source/core/html/track/AudioTrackList.h View 1 2 3 4 5 1 chunk +31 lines, -0 lines 0 comments Download
A Source/core/html/track/AudioTrackList.cpp View 1 2 3 4 5 1 chunk +40 lines, -0 lines 0 comments Download
A Source/core/html/track/AudioTrackList.idl View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
M Source/core/html/track/TextTrackList.idl View 1 2 3 4 5 6 7 1 chunk +3 lines, -4 lines 0 comments Download
M Source/core/html/track/TrackBase.h View 1 2 3 4 5 3 chunks +10 lines, -4 lines 0 comments Download
M Source/core/html/track/TrackBase.cpp View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
A Source/core/html/track/TrackListBase.h View 1 2 3 4 5 1 chunk +124 lines, -0 lines 1 comment Download
A Source/core/html/track/VideoTrack.h View 1 2 3 4 5 1 chunk +48 lines, -0 lines 0 comments Download
A Source/core/html/track/VideoTrack.cpp View 1 2 3 4 5 1 chunk +89 lines, -0 lines 0 comments Download
A Source/core/html/track/VideoTrack.idl View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
A Source/core/html/track/VideoTrackList.h View 1 2 3 4 5 1 chunk +34 lines, -0 lines 0 comments Download
A Source/core/html/track/VideoTrackList.cpp View 1 2 3 4 5 1 chunk +64 lines, -0 lines 0 comments Download
A Source/core/html/track/VideoTrackList.idl View 1 2 3 4 5 6 7 1 chunk +16 lines, -0 lines 0 comments Download
M Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/graphics/media/MediaPlayer.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/WebMediaPlayerClientImpl.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M Source/web/WebMediaPlayerClientImpl.cpp View 1 2 3 4 5 6 1 chunk +20 lines, -0 lines 0 comments Download
M public/platform/WebMediaPlayer.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M public/platform/WebMediaPlayerClient.h View 1 2 3 4 5 6 2 chunks +25 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
acolwell GONE FROM CHROMIUM
6 years, 10 months ago (2014-02-24 00:12:20 UTC) #1
philipj_slow
I haven't looked at the code, but liked the upstreamability of the test case :) ...
6 years, 10 months ago (2014-02-24 09:45:59 UTC) #2
fs
Just a cursory glance... https://codereview.chromium.org/170233009/diff/1/Source/core/html/track/AudioTrackList.cpp File Source/core/html/track/AudioTrackList.cpp (right): https://codereview.chromium.org/170233009/diff/1/Source/core/html/track/AudioTrackList.cpp#newcode50 Source/core/html/track/AudioTrackList.cpp:50: return owner()->executionContext(); I think owner() ...
6 years, 10 months ago (2014-02-24 10:32:35 UTC) #3
adamk
My initial reaction (not having too much context on this) is that this is a ...
6 years, 10 months ago (2014-02-24 19:08:30 UTC) #4
acolwell GONE FROM CHROMIUM
On 2014/02/24 19:08:30, adamk wrote: > My initial reaction (not having too much context on ...
6 years, 10 months ago (2014-02-24 20:22:01 UTC) #5
adamk
On 2014/02/24 20:22:01, acolwell wrote: > On 2014/02/24 19:08:30, adamk wrote: > > My initial ...
6 years, 10 months ago (2014-02-24 20:50:14 UTC) #6
philipj_slow
Please ping here when this is rebased if you would like a more in-depth review.
6 years, 9 months ago (2014-03-06 16:46:03 UTC) #7
acolwell GONE FROM CHROMIUM
On 2014/03/06 16:46:03, philipj wrote: > Please ping here when this is rebased if you ...
6 years, 9 months ago (2014-03-06 17:35:13 UTC) #8
acolwell GONE FROM CHROMIUM
https://codereview.chromium.org/170233009/diff/1/LayoutTests/media/avtracklists.html File LayoutTests/media/avtracklists.html (right): https://codereview.chromium.org/170233009/diff/1/LayoutTests/media/avtracklists.html#newcode71 LayoutTests/media/avtracklists.html:71: e.autoplay = true; On 2014/02/24 09:46:00, philipj wrote: > ...
6 years, 9 months ago (2014-03-07 22:08:43 UTC) #9
acolwell GONE FROM CHROMIUM
PTAL. This patch now only contains the changes for adding the audio and video track ...
6 years, 9 months ago (2014-03-07 22:14:27 UTC) #10
Inactive
https://codereview.chromium.org/170233009/diff/150001/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/170233009/diff/150001/Source/core/html/HTMLMediaElement.cpp#newcode171 Source/core/html/HTMLMediaElement.cpp:171: static AtomicString VideoKindToString(WebMediaPlayerClient::VideoTrackKind kind) Looks like this could return ...
6 years, 9 months ago (2014-03-08 03:05:59 UTC) #11
acolwell GONE FROM CHROMIUM
Addressed comments. In all cases were nullAtom was suggested, I used emptyAtom instead since that ...
6 years, 9 months ago (2014-03-08 19:56:40 UTC) #12
philipj_slow
Reviewed up to AudioTrackList.idl, stay tuned for more! https://codereview.chromium.org/170233009/diff/190001/LayoutTests/media/avtracklists.html File LayoutTests/media/avtracklists.html (right): https://codereview.chromium.org/170233009/diff/190001/LayoutTests/media/avtracklists.html#newcode19 LayoutTests/media/avtracklists.html:19: return; ...
6 years, 9 months ago (2014-03-09 09:04:13 UTC) #13
philipj_slow
https://codereview.chromium.org/170233009/diff/190001/Source/core/html/HTMLMediaElement.h File Source/core/html/HTMLMediaElement.h (right): https://codereview.chromium.org/170233009/diff/190001/Source/core/html/HTMLMediaElement.h#newcode523 Source/core/html/HTMLMediaElement.h:523: RefPtr<AudioTrackList> m_audioTracks; On 2014/03/09 09:04:14, philipj wrote: > I ...
6 years, 9 months ago (2014-03-09 16:26:41 UTC) #14
philipj_slow
Reviewed the second half. https://codereview.chromium.org/170233009/diff/210001/Source/core/html/track/TrackBase.h File Source/core/html/track/TrackBase.h (right): https://codereview.chromium.org/170233009/diff/210001/Source/core/html/track/TrackBase.h#newcode70 Source/core/html/track/TrackBase.h:70: HTMLMediaElement* m_mediaElement; This is used ...
6 years, 9 months ago (2014-03-13 10:00:03 UTC) #15
sof
https://codereview.chromium.org/170233009/diff/210001/Source/core/html/track/AudioTrackList.cpp File Source/core/html/track/AudioTrackList.cpp (right): https://codereview.chromium.org/170233009/diff/210001/Source/core/html/track/AudioTrackList.cpp#newcode15 Source/core/html/track/AudioTrackList.cpp:15: RefPtrWillBeRawPtr<AudioTrackList> trackList(adoptRefWillBeRefCountedGarbageCollected(new AudioTrackList(mediaElement))); RefPtr<> + adoptRef() https://codereview.chromium.org/170233009/diff/210001/Source/core/html/track/AudioTrackList.h File Source/core/html/track/AudioTrackList.h ...
6 years, 9 months ago (2014-03-13 12:19:19 UTC) #16
philipj_slow
https://codereview.chromium.org/170233009/diff/210001/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/170233009/diff/210001/Source/core/html/HTMLMediaElement.cpp#newcode3843 Source/core/html/HTMLMediaElement.cpp:3843: if (m_player->hasVideo() && !videoTracks().length()) hasVideo() can only be true ...
6 years, 9 months ago (2014-03-14 03:51:57 UTC) #17
acolwell GONE FROM CHROMIUM
PTAL. Addressed many of the comments. I know I still have test cases to add, ...
6 years, 9 months ago (2014-03-18 22:02:13 UTC) #18
Nils Barth (inactive)
(A few IDL style nits, if you could -- thanks!) https://codereview.chromium.org/170233009/diff/230001/Source/core/html/track/AudioTrack.idl File Source/core/html/track/AudioTrack.idl (right): https://codereview.chromium.org/170233009/diff/230001/Source/core/html/track/AudioTrack.idl#newcode6 ...
6 years, 9 months ago (2014-03-19 01:07:32 UTC) #19
philipj_slow
Nice bunch of improvements! https://codereview.chromium.org/170233009/diff/190001/LayoutTests/media/avtracklists.html File LayoutTests/media/avtracklists.html (right): https://codereview.chromium.org/170233009/diff/190001/LayoutTests/media/avtracklists.html#newcode83 LayoutTests/media/avtracklists.html:83: assert_equals(e.audioTracks.length, 1, "audioTracks.length"); On 2014/03/18 ...
6 years, 9 months ago (2014-03-20 16:17:38 UTC) #20
acolwell GONE FROM CHROMIUM
Addressed misc IDL comments. https://codereview.chromium.org/170233009/diff/190001/Source/core/html/track/AudioTrackList.idl File Source/core/html/track/AudioTrackList.idl (right): https://codereview.chromium.org/170233009/diff/190001/Source/core/html/track/AudioTrackList.idl#newcode10 Source/core/html/track/AudioTrackList.idl:10: AudioTrack getTrackById(DOMString id); On 2014/03/20 ...
6 years, 9 months ago (2014-03-28 01:32:34 UTC) #21
philipj_slow
https://codereview.chromium.org/170233009/diff/270001/Source/core/html/track/TrackListBase.h File Source/core/html/track/TrackListBase.h (right): https://codereview.chromium.org/170233009/diff/270001/Source/core/html/track/TrackListBase.h#newcode102 Source/core/html/track/TrackListBase.h:102: m_mediaElement->scheduleEvent(event); This isn't per spec but I think it ...
6 years, 9 months ago (2014-03-28 08:27:14 UTC) #22
philipj_slow
https://codereview.chromium.org/170233009/diff/270001/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/170233009/diff/270001/Source/core/html/HTMLMediaElement.cpp#newcode2297 Source/core/html/HTMLMediaElement.cpp:2297: ASSERT(!id.isEmpty()); We've made a little discovery on this point. ...
6 years, 8 months ago (2014-04-23 12:08:06 UTC) #23
acolwell GONE FROM CHROMIUM
On 2014/04/23 12:08:06, philipj wrote: > https://codereview.chromium.org/170233009/diff/270001/Source/core/html/HTMLMediaElement.cpp > File Source/core/html/HTMLMediaElement.cpp (right): > > https://codereview.chromium.org/170233009/diff/270001/Source/core/html/HTMLMediaElement.cpp#newcode2297 > ...
6 years, 8 months ago (2014-04-23 15:56:15 UTC) #24
philipj_slow
On 2014/04/23 15:56:15, acolwell wrote: > On 2014/04/23 12:08:06, philipj wrote: > > > https://codereview.chromium.org/170233009/diff/270001/Source/core/html/HTMLMediaElement.cpp ...
6 years, 8 months ago (2014-04-23 20:25:18 UTC) #25
nessy
The inband text track CG has actually surfaced these issues in the spec, see https://www.w3.org/Bugs/Public/show_bug.cgi?id=24997 ...
6 years, 8 months ago (2014-04-27 12:33:47 UTC) #26
nessy
6 years, 7 months ago (2014-05-05 07:11:32 UTC) #27
FYI: a first draft spec is now available at:

http://rawgit.com/silviapfeiffer/HTMLSourcingInbandTracks/master/index.html

Feedback / corrections welcome! Email to the Inband Text Track CG.

Cheers,
Silvia.


On Sun, Apr 27, 2014 at 10:33 PM, Silvia Pfeiffer <silviapf@chromium.org>
wrote:
> The inband text track CG has actually surfaced these issues in the spec, see
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=24997
> and
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=24986 .
>
> I have patches for the spec that Ian thought were going too far and
> should be specified elsewhere:
> https://github.com/w3c/html/commit/5fbd9199cc711d8ae9155da58be3d4368272e00d
> and
> https://github.com/w3c/html/commit/0d548a077fb90d35d8f1aa666cb0d116f2e1a6fa
> see
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=25133
> and
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=25132 .
>
> We're preparing a separate doc now outside the HTML spec that will explain:
> 1. how inband tracks are mapped into HTML xxxTrack objects and their
> attributes (including id)
> 2. the order of the inband tracks
> 3. how to create TextTrackCue objects where they are TextTrack objects
>
> It'll be based on
> https://www.w3.org/community/inbandtracks/wiki/Main_Page
>
> Will post to the HTML WG list.
>
> HTH,
> Silvia.
>
>
> On Thu, Apr 24, 2014 at 6:25 AM,  <philipj@opera.com> wrote:
>> On 2014/04/23 15:56:15, acolwell wrote:
>>>
>>> On 2014/04/23 12:08:06, philipj wrote:
>>> >
>>
>>
>>
https://codereview.chromium.org/170233009/diff/270001/Source/core/html/HTMLMe...
>>>
>>> > File Source/core/html/HTMLMediaElement.cpp (right):
>>> >
>>> >
>>
>>
>>
https://codereview.chromium.org/170233009/diff/270001/Source/core/html/HTMLMe...
>>>
>>> > Source/core/html/HTMLMediaElement.cpp:2297: ASSERT(!id.isEmpty());
>>> > We've made a little discovery on this point. The spec says "The
>>
>> AudioTrack.id
>>>
>>> > and VideoTrack.id attributes must return the identifier of the track, if
>>> > it
>>> has
>>> > one, or the empty string otherwise." In other words, we can't use the id
>>> > to
>>> > identify tracks (like in removeAudioTrack below) and the assert is
>>> > invalid.
>>> >
>>> > It's not exactly clear if just using the index as an identifier
>>> > everywhere
>>
>> is
>>>
>>> > going to work, but if that doesn't work an internal unique handle for
>>> > each
>>> track
>>> > could be added.
>>
>>
>>> It is unfortunate that the unique track ID's in the file are not mapped to
>>> the
>>> .id attribute. It would be nice if there was a registry that described the
>>> appropriate mapping to .id for common containers. The one Ogg example is
>>> not
>>> sufficient especially since Skeleton headers are not mandatory in Ogg.
>>> Should
>>> the impl fall back to stream serial numbers in that case?
>>
>>
>> Reaching interop on these finer points is going to be interesting. Just
>> using
>> the empty string when there is no id seems to be the assumption of the spec,
>> but
>> as you say it's always going to be possible to come up with a unique string
>> to
>> identify tracks if one tries hard enough...
>>
>> The spec is a bit more specific about text tracks:
>>
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element...
>>
>> Should I file a bug requesting similar level of detail for audio/video
>> tracks?
>>
>> https://codereview.chromium.org/170233009/

To unsubscribe from this group and stop receiving emails from it, send an email
to blink-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698