WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
102561
HTMLMediaElement::configureTextTracks should configure all text tracks
https://bugs.webkit.org/show_bug.cgi?id=102561
Summary
HTMLMediaElement::configureTextTracks should configure all text tracks
Eric Carlson
Reported
2012-11-16 14:22:54 PST
The spec's "automatic text track selection" algorithm [1] select a track from "... a list consisting of the text tracks in the media element's list of text tracks ...", but HTMLMediaElement::configureTextTracks currently only considers <track> elements. It should consider all track types. [1]
http://dev.w3.org/html5/spec/media-elements.html#perform-automatic-text-track-selection
Attachments
Proposed patch
(23.82 KB, patch)
2012-11-16 16:12 PST
,
Eric Carlson
gtk-ews
: commit-queue-
Details
Formatted Diff
Diff
Updated patch
(23.79 KB, patch)
2012-11-16 17:04 PST
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Updated patch
(23.71 KB, patch)
2012-11-19 14:43 PST
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Eric Carlson
Comment 1
2012-11-16 16:12:49 PST
Created
attachment 174777
[details]
Proposed patch
WebKit Review Bot
Comment 2
2012-11-16 16:14:43 PST
Attachment 174777
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/medi..." exit_code: 1 Source/WebCore/html/HTMLMediaElement.cpp:2944: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
kov's GTK+ EWS bot
Comment 3
2012-11-16 16:36:27 PST
Comment on
attachment 174777
[details]
Proposed patch
Attachment 174777
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/14858637
Silvia Pfeiffer
Comment 4
2012-11-16 16:50:50 PST
The layout test result has this line: "ReferenceError: Can't find variable: showing" I think something has gone wrong there and there's a bug in the layout test.
Eric Carlson
Comment 5
2012-11-16 17:04:00 PST
Created
attachment 174787
[details]
Updated patch
Eric Carlson
Comment 6
2012-11-16 17:05:53 PST
(In reply to
comment #4
)
> The layout test result has this line: > "ReferenceError: Can't find variable: showing" > > I think something has gone wrong there and there's a bug in the layout test.
Oops I used the wrong version of the patch, thanks! Attached new patch with correct test and style nits.
Silvia Pfeiffer
Comment 7
2012-11-19 00:40:53 PST
FWIW: looks good to me Just wondering: would it be at all possible to add a media resource that has an in-band track and that we can base a layout test for TextTrack on?
Eric Carlson
Comment 8
2012-11-19 09:09:57 PST
(In reply to
comment #7
)
> FWIW: looks good to me > > Just wondering: would it be at all possible to add a media resource that has an in-band track and that we can base a layout test for TextTrack on?
We already have LayoutTests/media/content/counting-captioned.mov, which has in-band CEA 608 captions, but I think only Apple's media ending supports it currently.
Eric Carlson
Comment 9
2012-11-19 09:12:53 PST
(In reply to
comment #8
)
> > We already have LayoutTests/media/content/counting-captioned.mov, which has in-band CEA 608 captions, but I think only Apple's media ending supports it currently.
And WebKit doesn't yet have code to integrate the in-band tracks supported by a platform media engine into the out-of-band and dynamically created tracks, so the caption track in this file doesn't show up as a TextTrack, but that is my next task.
Philippe Normand
Comment 10
2012-11-19 12:16:45 PST
Comment on
attachment 174787
[details]
Updated patch View in context:
https://bugs.webkit.org/attachment.cgi?id=174787&action=review
Patch looks good, bonus points for the smart pointers. I just have two small questions. Not setting r+ yet because of the test result. See below.
> Source/WebCore/html/HTMLMediaElement.cpp:2877 > + RefPtr<TextTrack> trackEnable = 0;
I'm not a native English speaker so feel free to ignore this comment :) Would trackToEnable be a better name? I was just a bit confused by this new trackEnable name.
> LayoutTests/media/track/track-mode-not-changed-by-new-track-expected.txt:53 > +EXPECTED (track3.mode == 'hidden'), OBSERVED 'showing' FAIL
Is it normal to have that expectation here?
Martin Robinson
Comment 11
2012-11-19 12:20:27 PST
Comment on
attachment 174787
[details]
Updated patch View in context:
https://bugs.webkit.org/attachment.cgi?id=174787&action=review
> Source/WebCore/html/HTMLMediaElement.cpp:2879 > + RefPtr<TextTrack> defaultTrack = 0; > + RefPtr<TextTrack> fallbackTrack = 0;
Just a drive by suggestion after this landed in my bugzilla mail, but I think that the default constructor for RefPtr is "ALWAYS_INLINE RefPtr() : m_ptr(0) { }", so you can probably omit "= 0" from all these declarations, as it's implied.
Philippe Normand
Comment 12
2012-11-19 12:33:27 PST
(In reply to
comment #9
)
> (In reply to
comment #8
) > > > > We already have LayoutTests/media/content/counting-captioned.mov, which has in-band CEA 608 captions, but I think only Apple's media ending supports it currently. > > And WebKit doesn't yet have code to integrate the in-band tracks supported by a platform media engine into the out-of-band and dynamically created tracks, so the caption track in this file doesn't show up as a TextTrack, but that is my next task.
From the GStreamer backend POV it would be nice as well to advertize the text tracks exposed by the GStreamer playbin element to the media element. From playbin we can get the number of text tracks but I'm afraid we can only get the data from the currently selected track. Anyway, something to investigate further at some point, I didn't mean to hijack this bug :)
Silvia Pfeiffer
Comment 13
2012-11-19 12:39:25 PST
(In reply to
comment #8
)
> (In reply to
comment #7
) >> > > Just wondering: would it be at all possible to add a media resource that has an in-band track and that we can base a layout test for TextTrack on? > > We already have LayoutTests/media/content/counting-captioned.mov, which has in-band CEA 608 captions, but I think only Apple's media ending supports it currently.
Fair enough. I'll create myself a bug to add a WebM file with in-band WebVTT and have that work the same way.
Eric Carlson
Comment 14
2012-11-19 14:43:22 PST
Created
attachment 175044
[details]
Updated patch
Eric Carlson
Comment 15
2012-11-19 14:44:54 PST
(In reply to
comment #10
)
> (From update of
attachment 174787
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=174787&action=review
> > Patch looks good, bonus points for the smart pointers. I just have two small questions. Not setting r+ yet because of the test result. See below. > > > Source/WebCore/html/HTMLMediaElement.cpp:2877 > > + RefPtr<TextTrack> trackEnable = 0; > > I'm not a native English speaker so feel free to ignore this comment :) Would trackToEnable be a better name? I was just a bit confused by this new trackEnable name. >
Great suggestion, changed.
> > LayoutTests/media/track/track-mode-not-changed-by-new-track-expected.txt:53 > > +EXPECTED (track3.mode == 'hidden'), OBSERVED 'showing' FAIL > > Is it normal to have that expectation here?
> No, the test was incorrect. Fixed. (In reply to
comment #11
)
> (From update of
attachment 174787
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=174787&action=review
> > > Source/WebCore/html/HTMLMediaElement.cpp:2879 > > + RefPtr<TextTrack> defaultTrack = 0; > > + RefPtr<TextTrack> fallbackTrack = 0; > > Just a drive by suggestion after this landed in my bugzilla mail, but I think that the default constructor for RefPtr is "ALWAYS_INLINE RefPtr() : m_ptr(0) { }", so you can probably omit "= 0" from all these declarations, as it's implied.
Thanks, fixed.
Eric Carlson
Comment 16
2012-11-19 14:45:55 PST
(In reply to
comment #12
)
> (In reply to
comment #9
) > > (In reply to
comment #8
) > > > > > > We already have LayoutTests/media/content/counting-captioned.mov, which has in-band CEA 608 captions, but I think only Apple's media ending supports it currently. > > > > And WebKit doesn't yet have code to integrate the in-band tracks supported by a platform media engine into the out-of-band and dynamically created tracks, so the caption track in this file doesn't show up as a TextTrack, but that is my next task. > > From the GStreamer backend POV it would be nice as well to advertize the text tracks exposed by the GStreamer playbin element to the media element. From playbin we can get the number of text tracks but I'm afraid we can only get the data from the currently selected track. Anyway, something to investigate further at some point, I didn't mean to hijack this bug :)
My next couple of patches will make it possible for someone to hook this up.
Philippe Normand
Comment 17
2012-11-19 14:48:41 PST
Comment on
attachment 175044
[details]
Updated patch Ok!
WebKit Review Bot
Comment 18
2012-11-19 15:07:19 PST
Comment on
attachment 175044
[details]
Updated patch Clearing flags on attachment: 175044 Committed
r135202
: <
http://trac.webkit.org/changeset/135202
>
WebKit Review Bot
Comment 19
2012-11-19 15:07:25 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug