Bug 122000

Summary: [GStreamer] Support "chapter" text tracks
Product: WebKit Reporter: Brendan Long <b.long>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: b.long, commit-queue, eric.carlson, glenn, gustavo, jer.noble, menard, mrobinson, pnormand, webkit-ews
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Add ENABLE(VIDEO_TRACK) checks
none
Patch for landing none

Description Brendan Long 2013-09-26 17:45:59 PDT
It looks like the way to do this is with GstToc:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstToc.html#gst-toc-entry-get-uid

We can get these from GstMessages:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMessage.html#gst-message-parse-toc

It looks like Matroska currently has the best support, but there's a TODO saying mp4 should support it too.

mkvmerge can create these:

http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvmerge.html#mkvmerge.chapters

I have a *very* basic patch (adding chapters to counting-subtitled-srt.mkv and printing out chapter contents) here. It's not even remotely done, but it might be useful for someone else who wants to finish this:

https://github.com/cablelabs/webkit/commits/ruih/handle-table-of-contents
Comment 1 Brendan Long 2013-09-30 09:56:30 PDT
Created attachment 213009 [details]
Patch
Comment 2 Early Warning System Bot 2013-09-30 10:03:02 PDT
Comment on attachment 213009 [details]
Patch

Attachment 213009 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/2755120
Comment 3 Early Warning System Bot 2013-09-30 10:03:18 PDT
Comment on attachment 213009 [details]
Patch

Attachment 213009 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/2815091
Comment 4 Brendan Long 2013-09-30 11:10:20 PDT
Created attachment 213014 [details]
Add ENABLE(VIDEO_TRACK) checks
Comment 5 Eric Carlson 2013-10-01 08:08:39 PDT
Comment on attachment 213014 [details]
Add ENABLE(VIDEO_TRACK) checks

View in context: https://bugs.webkit.org/attachment.cgi?id=213014&action=review

> Source/WebCore/platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:36
> +class InbandMetadataTextTrackPrivateGStreamer : public InbandTextTrackPrivate {

Nit: FINAL

> LayoutTests/media/in-band-cues.js:185
> +        for (var i = 1; i < numInBandTracks + 1; ++i) {
> +          compareTracks("video.textTracks[" + (i + 1) + "]", "inbandTrack" + i);
> +        }

Nit: braces aren't necessary here
Comment 6 Brendan Long 2013-10-01 08:12:46 PDT
(In reply to comment #5)
> Nit: braces aren't necessary here

I'm surprised the style checker let me do that. Since you set it to review+, I assume you don't think it's worth fixing and resubmitting?
Comment 7 Brendan Long 2013-10-01 08:14:12 PDT
Or is it intentionally still "commit-queue?" so someone else can review it?
Comment 8 Eric Carlson 2013-10-01 08:19:23 PDT
(In reply to comment #7)
> Or is it intentionally still "commit-queue?" so someone else can review it?

You can update the patch and upload as "Patch for landing" and anyone will cq+ it.
Comment 9 Brendan Long 2013-10-01 08:49:31 PDT
Created attachment 213086 [details]
Patch for landing

Removed superfluous braces
Comment 10 Eric Carlson 2013-10-01 08:56:24 PDT
Comment on attachment 213086 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=213086&action=review

> Source/WebCore/platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:36
> +class InbandMetadataTextTrackPrivateGStreamer : public InbandTextTrackPrivate {

You forgot to mark this FINAL, but it is OK to fix this in a follow-up.
Comment 11 WebKit Commit Bot 2013-10-01 09:25:35 PDT
Comment on attachment 213086 [details]
Patch for landing

Clearing flags on attachment: 213086

Committed r156713: <http://trac.webkit.org/changeset/156713>
Comment 12 WebKit Commit Bot 2013-10-01 09:25:39 PDT
All reviewed patches have been landed.  Closing bug.