[GStreamer] Support "chapter" text tracks

https://bugs.webkit.org/show_bug.cgi?id=122000

Patch by Brendan Long <b.long@cablelabs.com> on 2013-10-01
Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/in-band/track-in-band-mkv-chapters.html

* platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: New class, needed for cues that aren't associated with GstPads.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for table of contents messages.
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Parse table of contents messages into text tracks.
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry): Recursive method for parsing all of the TOC entries.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add the processTableOfContents functions.

LayoutTests:

* media/content/counting-subtitled-srt.mkv: Added chapters metadata.
* media/track/in-band/track-in-band-mkv-chapters-expected.txt: New test, similar to cues-added-one, but uses "chapters" track.
* media/track/in-band/track-in-band-mkv-chapters.html: Same.
* media/in-band-cues.js: Updated tests to handle the new "chapters" track.
* media/track/in-band/track-in-band-kate-ogg-cues-added-once-expected.txt: Same.
* media/track/in-band/track-in-band-kate-ogg-cues-added-once.html: Same.
* media/track/in-band/track-in-band-kate-ogg-mode-expected.txt: Same.
* media/track/in-band/track-in-band-kate-ogg-mode.html: Same.
* media/track/in-band/track-in-band-kate-ogg-style-expected.txt: Same.
* media/track/in-band/track-in-band-kate-ogg-track-order-expected.txt: Same.
* media/track/in-band/track-in-band-kate-ogg-track-order.html: Same.
* media/track/in-band/track-in-band-srt-mkv-cues-added-once-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-cues-added-once.html: Same.
* media/track/in-band/track-in-band-srt-mkv-kind-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-kind.html: Same.
* media/track/in-band/track-in-band-srt-mkv-language-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-language.html: Same.
* media/track/in-band/track-in-band-srt-mkv-mode-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-mode.html: Same.
* media/track/in-band/track-in-band-srt-mkv-style-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-track-order-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-track-order.html: Same.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6d6824a7
2013-10-01 Brendan Long <b.long@cablelabs.com>
[GStreamer] Support "chapter" text tracks
https://bugs.webkit.org/show_bug.cgi?id=122000
Reviewed by Eric Carlson.
* media/content/counting-subtitled-srt.mkv: Added chapters metadata.
* media/track/in-band/track-in-band-mkv-chapters-expected.txt: New test, similar to cues-added-one, but uses "chapters" track.
* media/track/in-band/track-in-band-mkv-chapters.html: Same.
* media/in-band-cues.js: Updated tests to handle the new "chapters" track.
* media/track/in-band/track-in-band-kate-ogg-cues-added-once-expected.txt: Same.
* media/track/in-band/track-in-band-kate-ogg-cues-added-once.html: Same.
* media/track/in-band/track-in-band-kate-ogg-mode-expected.txt: Same.
* media/track/in-band/track-in-band-kate-ogg-mode.html: Same.
* media/track/in-band/track-in-band-kate-ogg-style-expected.txt: Same.
* media/track/in-band/track-in-band-kate-ogg-track-order-expected.txt: Same.
* media/track/in-band/track-in-band-kate-ogg-track-order.html: Same.
* media/track/in-band/track-in-band-srt-mkv-cues-added-once-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-cues-added-once.html: Same.
* media/track/in-band/track-in-band-srt-mkv-kind-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-kind.html: Same.
* media/track/in-band/track-in-band-srt-mkv-language-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-language.html: Same.
* media/track/in-band/track-in-band-srt-mkv-mode-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-mode.html: Same.
* media/track/in-band/track-in-band-srt-mkv-style-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-track-order-expected.txt: Same.
* media/track/in-band/track-in-band-srt-mkv-track-order.html: Same.
2013-10-01 Darin Adler <darin@apple.com>
Try to get another Windows test to pass.
......@@ -4,9 +4,8 @@ function testAttribute(uri, attribute, values)
{
consoleWrite("<br><i>** Check in-band kind attributes</i>");
testExpected("video.textTracks.length", values.length);
for (var i = 0; i < values.length; ++i) {
for (var i = 0; i < values.length; ++i)
testExpected("video.textTracks[" + i + "]." + attribute, values[i]);
}
consoleWrite("");
endTest();
......@@ -17,7 +16,7 @@ function testAttribute(uri, attribute, values)
waitForEvent('canplaythrough', canplaythrough);
}
function testCuesAddedOnce(uri)
function testCuesAddedOnce(uri, kind)
{
var seekedCount = 0;
var cuesStarts = [];
......@@ -65,7 +64,12 @@ function testCuesAddedOnce(uri)
setInterval(pollProgress, 100);
consoleWrite("<br><i>** Setting track 1 to showing</i>");
run("inbandTrack1 = video.textTracks[0]");
for (var i = 0; i < video.textTracks.length; ++i) {
if (video.textTracks[i].kind == kind) {
inbandTrack1 = video.textTracks[i];
break;
}
}
run("inbandTrack1.mode = 'showing'");
run("video.play()");
}
......@@ -75,7 +79,7 @@ function testCuesAddedOnce(uri)
waitForEvent('canplaythrough', canplaythrough);
}
function testMode(uri)
function testMode(uri, kind)
{
function seeked()
{
......@@ -93,7 +97,12 @@ function testMode(uri)
function canplaythrough()
{
run("inbandTrack1 = video.textTracks[0]");
for (var i = 0; i < video.textTracks.length; ++i) {
if (video.textTracks[i].kind == kind) {
inbandTrack1 = video.textTracks[i];
break;
}
}
consoleWrite("<br><i>** A hidden track should not have visible cues<" + "/i>");
run("inbandTrack1.mode = 'hidden'");
......@@ -127,7 +136,12 @@ function testStyle(uri)
function canplaythrough()
{
consoleWrite("<br><i>** Setting track 1 to showing and starting video</i>");
run("inbandTrack1 = video.textTracks[0]");
for (var i = 0; i < video.textTracks.length; ++i) {
if (video.textTracks[i].kind == "subtitles" || video.textTracks[i].kind == "captions") {
inbandTrack1 = video.textTracks[i];
break;
}
}
inbandTrack1.mode = 'showing';
run("video.play()");
......@@ -141,17 +155,7 @@ function testStyle(uri)
waitForEvent('canplaythrough', canplaythrough);
}
function testTrackOrder(uri) {
var addtrackEventCount = 0;
function trackAdded(event)
{
consoleWrite("EVENT(" + event.type + ")");
compareTracks("event.track", "video.textTracks[" + addtrackEventCount + "]");
++addtrackEventCount;
consoleWrite("");
}
function testTrackOrder(uri, numInBandTracks) {
function compareTracks(track1, track2)
{
var equal = (eval(track1) == eval(track2));
......@@ -161,21 +165,21 @@ function testTrackOrder(uri) {
function canplaythrough()
{
consoleWrite("<br><i>** Check initial in-band track states</i>");
testExpected("video.textTracks.length", 2);
run("inbandTrack1 = video.textTracks[0]");
run("inbandTrack2 = video.textTracks[1]");
testExpected("video.textTracks.length", numInBandTracks);
for (var i = 0; i < numInBandTracks; ++i)
run("inbandTrack" + (i + 1) + " = video.textTracks[" + i + "]");
consoleWrite("<br><i>** Add two tracks, check sort order<" + "/i>");
run("addTrack = video.addTextTrack('captions', 'Caption Track', 'en')");
run("trackElement = document.createElement('track')");
trackElement.label = '<track>';
run("video.appendChild(trackElement)");
testExpected("video.textTracks.length", 4);
testExpected("video.textTracks.length", numInBandTracks + 2);
compareTracks("video.textTracks[0]", "trackElement.track");
compareTracks("video.textTracks[1]", "addTrack");
compareTracks("video.textTracks[2]", "inbandTrack1");
compareTracks("video.textTracks[3]", "inbandTrack2");
for (var i = 1; i < numInBandTracks + 1; ++i)
compareTracks("video.textTracks[" + (i + 1) + "]", "inbandTrack" + i);
consoleWrite("<br><i>** Unload video file, check track count<" + "/i>");
run("video.src = ''");
......@@ -186,7 +190,6 @@ function testTrackOrder(uri) {
}
findMediaElement();
video.textTracks.addEventListener("addtrack", trackAdded);
video.src = uri;
waitForEvent('canplaythrough', canplaythrough);
}
......@@ -3,7 +3,6 @@ Check that we don't have duplicate cues after seeking backwards.
EVENT(canplaythrough)
** Setting track 1 to showing
RUN(inbandTrack1 = video.textTracks[0])
RUN(inbandTrack1.mode = 'showing')
RUN(video.play())
EXPECTED (inbandTrack1.cues.length > '0') OK
......
......@@ -7,7 +7,7 @@
<script src=../../video-test.js></script>
<script src=../../in-band-cues.js></script>
</head>
<body onload="testCuesAddedOnce('../../content/counting-subtitled-kate.ogv')">
<body onload="testCuesAddedOnce('../../content/counting-subtitled-kate.ogv', 'subtitles')">
<video controls></video>
<p>Check that we don't have duplicate cues after seeking backwards.</p>
</body>
......
Test that cues from in-band tracks are displayed immediately when a track is made visible.
EVENT(canplaythrough)
RUN(inbandTrack1 = video.textTracks[0])
** A hidden track should not have visible cues
RUN(inbandTrack1.mode = 'hidden')
......
......@@ -8,7 +8,7 @@
<script src=../../media-controls.js></script>
<script src=../../in-band-cues.js></script>
</head>
<body onload="testMode('../../content/counting-subtitled-kate.ogv')">
<body onload="testMode('../../content/counting-subtitled-kate.ogv', 'subtitles')">
<video controls></video>
<p>Test that cues from in-band tracks are displayed immediately when a track is made visible.</p>
</body>
......
......@@ -2,7 +2,6 @@ Test that style is applied to all cues correctly.
EVENT(canplaythrough)
** Setting track 1 to showing and starting video
RUN(inbandTrack1 = video.textTracks[0])
RUN(video.play())
EVENT(seeked)
......
Test track order when using in-band and out-of-band text tracks.
EVENT(addtrack)
EXPECTED (event.track == 'video.textTracks[0]') OK
EVENT(addtrack)
EXPECTED (event.track == 'video.textTracks[1]') OK
EVENT(canplaythrough)
** Check initial in-band track states
......
......@@ -7,7 +7,7 @@
<script src=../../video-test.js></script>
<script src=../../in-band-cues.js></script>
</head>
<body onload="testTrackOrder('../../content/counting-subtitled-kate.ogv')">
<body onload="testTrackOrder('../../content/counting-subtitled-kate.ogv', 2)">
<video controls></video>
<p>Test track order when using in-band and out-of-band text tracks.</p>
</body>
......
Check for chapter track from an mkv file.
EVENT(canplaythrough)
** Setting track 1 to showing
RUN(inbandTrack1.mode = 'showing')
RUN(video.play())
EXPECTED (inbandTrack1.cues.length > '0') OK
RUN(video.pause())
RUN(video.currentTime = 0)
RUN(video.play())
EVENT(seeked)
EXPECTED (inbandTrack1.cues.length > '0') OK
RUN(video.pause())
Test all cues are equal OK
END OF TEST
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src=../../media-file.js></script>
<script src=../../video-test.js></script>
<script src=../../in-band-cues.js></script>
</head>
<body onload="testCuesAddedOnce('../../content/counting-subtitled-srt.mkv', 'chapters')">
<video controls></video>
<p>Check for chapter track from an mkv file.</p>
</body>
</html>
......@@ -3,7 +3,6 @@ Check that we don't have duplicate cues after seeking backwards.
EVENT(canplaythrough)
** Setting track 1 to showing
RUN(inbandTrack1 = video.textTracks[0])
RUN(inbandTrack1.mode = 'showing')
RUN(video.play())
EXPECTED (inbandTrack1.cues.length > '0') OK
......
......@@ -7,7 +7,7 @@
<script src=../../video-test.js></script>
<script src=../../in-band-cues.js></script>
</head>
<body onload="testCuesAddedOnce('../../content/counting-subtitled-srt.mkv')">
<body onload="testCuesAddedOnce('../../content/counting-subtitled-srt.mkv', 'subtitles')">
<video controls></video>
<p>Check that we don't have duplicate cues after seeking backwards.</p>
</body>
......
......@@ -3,9 +3,10 @@ Check in-band text tracks' kind attributes.
EVENT(canplaythrough)
** Check in-band kind attributes
EXPECTED (video.textTracks.length == '2') OK
EXPECTED (video.textTracks[0].kind == 'subtitles') OK
EXPECTED (video.textTracks.length == '3') OK
EXPECTED (video.textTracks[0].kind == 'chapters') OK
EXPECTED (video.textTracks[1].kind == 'subtitles') OK
EXPECTED (video.textTracks[2].kind == 'subtitles') OK
END OF TEST
......@@ -7,7 +7,7 @@
<script src=../../video-test.js></script>
<script src=../../in-band-cues.js></script>
</head>
<body onload="testAttribute('../../content/counting-subtitled-srt.mkv', 'kind', ['subtitles', 'subtitles'])">
<body onload="testAttribute('../../content/counting-subtitled-srt.mkv', 'kind', ['chapters', 'subtitles', 'subtitles'])">
<video controls></video>
<p>Check in-band text tracks' kind attributes.</p>
</body>
......
......@@ -3,9 +3,10 @@ Check in-band text tracks' language attributes.
EVENT(canplaythrough)
** Check in-band kind attributes
EXPECTED (video.textTracks.length == '2') OK
EXPECTED (video.textTracks[0].language == 'en') OK
EXPECTED (video.textTracks[1].language == 'fr') OK
EXPECTED (video.textTracks.length == '3') OK
EXPECTED (video.textTracks[0].language == '') OK
EXPECTED (video.textTracks[1].language == 'en') OK
EXPECTED (video.textTracks[2].language == 'fr') OK
END OF TEST
......@@ -7,7 +7,7 @@
<script src=../../video-test.js></script>
<script src=../../in-band-cues.js></script>
</head>
<body onload="testAttribute('../../content/counting-subtitled-srt.mkv', 'language', ['en', 'fr'])">
<body onload="testAttribute('../../content/counting-subtitled-srt.mkv', 'language', ['', 'en', 'fr'])">
<video controls></video>
<p>Check in-band text tracks' language attributes.</p>
</body>
......
Test that cues from in-band tracks are displayed immediately when a track is made visible.
EVENT(canplaythrough)
RUN(inbandTrack1 = video.textTracks[0])
** A hidden track should not have visible cues
RUN(inbandTrack1.mode = 'hidden')
......
......@@ -8,7 +8,7 @@
<script src=../../media-controls.js></script>
<script src=../../in-band-cues.js></script>
</head>
<body onload="testMode('../../content/counting-subtitled-srt.mkv')">
<body onload="testMode('../../content/counting-subtitled-srt.mkv', 'subtitles')">
<video controls></video>
<p>Test that cues from in-band tracks are displayed immediately when a track is made visible.</p>
</body>
......
......@@ -2,7 +2,6 @@ Test that style is applied to all cues correctly.
EVENT(canplaythrough)
** Setting track 1 to showing and starting video
RUN(inbandTrack1 = video.textTracks[0])
RUN(video.play())
EVENT(seeked)
......
Test track order when using in-band and out-of-band text tracks.
EVENT(addtrack)
EXPECTED (event.track == 'video.textTracks[0]') OK
EVENT(addtrack)
EXPECTED (event.track == 'video.textTracks[1]') OK
EVENT(canplaythrough)
** Check initial in-band track states
EXPECTED (video.textTracks.length == '2') OK
EXPECTED (video.textTracks.length == '3') OK
RUN(inbandTrack1 = video.textTracks[0])
RUN(inbandTrack2 = video.textTracks[1])
RUN(inbandTrack3 = video.textTracks[2])
** Add two tracks, check sort order
RUN(addTrack = video.addTextTrack('captions', 'Caption Track', 'en'))
RUN(trackElement = document.createElement('track'))
RUN(video.appendChild(trackElement))
EXPECTED (video.textTracks.length == '4') OK
EXPECTED (video.textTracks.length == '5') OK
EXPECTED (video.textTracks[0] == 'trackElement.track') OK
EXPECTED (video.textTracks[1] == 'addTrack') OK
EXPECTED (video.textTracks[2] == 'inbandTrack1') OK
EXPECTED (video.textTracks[3] == 'inbandTrack2') OK
EXPECTED (video.textTracks[4] == 'inbandTrack3') OK
** Unload video file, check track count
RUN(video.src = '')
......
......@@ -7,7 +7,7 @@
<script src=../../video-test.js></script>
<script src=../../in-band-cues.js></script>
</head>
<body onload="testTrackOrder('../../content/counting-subtitled-srt.mkv')">
<body onload="testTrackOrder('../../content/counting-subtitled-srt.mkv', 3)">
<video controls></video>
<p>Test track order when using in-band and out-of-band text tracks.</p>
</body>
......
2013-10-01 Brendan Long <b.long@cablelabs.com>
[GStreamer] Support "chapter" text tracks
https://bugs.webkit.org/show_bug.cgi?id=122000
Reviewed by Eric Carlson.
Test: media/track/in-band/track-in-band-mkv-chapters.html
* platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: New class, needed for cues that aren't associated with GstPads.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for table of contents messages.
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Parse table of contents messages into text tracks.
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry): Recursive method for parsing all of the TOC entries.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add the processTableOfContents functions.
2013-10-01 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Texmap] CSS filter not working on software composited layers
/*
* Copyright (C) 2013 Cable Television Laboratories, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef InbandMetadataTextTrackPrivateGStreamer_h
#define InbandMetadataTextTrackPrivateGStreamer_h
#if ENABLE(VIDEO) && USE(GSTREAMER) && ENABLE(VIDEO_TRACK) && defined(GST_API_VERSION_1)
#include "GRefPtrGStreamer.h"
#include "InbandTextTrackPrivate.h"
namespace WebCore {
class InbandMetadataTextTrackPrivateGStreamer : public InbandTextTrackPrivate {
public:
static PassRefPtr<InbandMetadataTextTrackPrivateGStreamer> create(Kind kind)
{
return adoptRef(new InbandMetadataTextTrackPrivateGStreamer(kind));
}
~InbandMetadataTextTrackPrivateGStreamer() { }
virtual Kind kind() const OVERRIDE { return m_kind; }
private:
InbandMetadataTextTrackPrivateGStreamer(Kind kind)
: InbandTextTrackPrivate(Generic)
, m_kind(kind)
{
}
Kind m_kind;
};
} // namespace WebCore
#endif // ENABLE(VIDEO) && USE(GSTREAMER) && ENABLE(VIDEO_TRACK) && defined(GST_API_VERSION_1)
#endif // InbandMetadataTextTrackPrivateGStreamer_h
......@@ -43,6 +43,7 @@
#include <wtf/text/CString.h>
#if ENABLE(VIDEO_TRACK) && defined(GST_API_VERSION_1)
#include "InbandMetadataTextTrackPrivateGStreamer.h"
#include "InbandTextTrackPrivateGStreamer.h"
#include "TextCombinerGStreamer.h"
#include "TextSinkGStreamer.h"
......@@ -958,6 +959,11 @@ gboolean MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message)
g_free(detail);
}
break;
#if ENABLE(VIDEO_TRACK) && defined(GST_API_VERSION_1)
case GST_MESSAGE_TOC:
processTableOfContents(message);
break;
#endif
default:
LOG_MEDIA_MESSAGE("Unhandled GStreamer message type: %s",
GST_MESSAGE_TYPE_NAME(message));
......@@ -986,6 +992,56 @@ void MediaPlayerPrivateGStreamer::processBufferingStats(GstMessage* message)
updateStates();
}
#if ENABLE(VIDEO_TRACK) && defined(GST_API_VERSION_1)
void MediaPlayerPrivateGStreamer::processTableOfContents(GstMessage* message)
{
if (m_chaptersTrack)
m_player->removeTextTrack(m_chaptersTrack);
m_chaptersTrack = InbandMetadataTextTrackPrivateGStreamer::create(InbandTextTrackPrivate::Chapters);
m_player->addTextTrack(m_chaptersTrack);
GstToc* toc;
gboolean updated;
gst_message_parse_toc(message, &toc, &updated);
ASSERT(toc);
for (GList* i = gst_toc_get_entries(toc); i; i = i->next)
processTableOfContentsEntry(static_cast<GstTocEntry*>(i->data), 0);
gst_toc_unref(toc);
}
void MediaPlayerPrivateGStreamer::processTableOfContentsEntry(GstTocEntry* entry, GstTocEntry* parent)
{
ASSERT(entry);
RefPtr<GenericCueData> cue = GenericCueData::create();
gint64 start = -1, stop = -1;
gst_toc_entry_get_start_stop_times(entry, &start, &stop);
if (start != -1)
cue->setStartTime(static_cast<double>(start) / GST_SECOND);
if (stop != -1)
cue->setEndTime(static_cast<double>(stop) / GST_SECOND);
GstTagList* tags = gst_toc_entry_get_tags(entry);
if (tags) {
gchar* title = 0;
gst_tag_list_get_string(tags, GST_TAG_TITLE, &title);
if (title) {
cue->setContent(title);
g_free(title);
}
}
m_chaptersTrack->client()->addGenericCue(m_chaptersTrack.get(), cue.release());
for (GList* i = gst_toc_entry_get_sub_entries(entry); i; i = i->next)
processTableOfContentsEntry(static_cast<GstTocEntry*>(i->data), entry);
}
#endif
void MediaPlayerPrivateGStreamer::fillTimerFired(Timer<MediaPlayerPrivateGStreamer>*)
{
GstQuery* query = gst_query_new_buffering(GST_FORMAT_PERCENT);
......
......@@ -135,6 +135,10 @@ private:
void setDownloadBuffering();
void processBufferingStats(GstMessage*);
#if ENABLE(VIDEO_TRACK) && defined(GST_API_VERSION_1)
void processTableOfContents(GstMessage*);
void processTableOfContentsEntry(GstTocEntry*, GstTocEntry* parent);
#endif
virtual String engineDescription() const { return "GStreamer"; }
virtual bool isLiveStream() const { return m_isStreaming; }
......@@ -187,6 +191,7 @@ private:
bool m_missingPlugins;
#if ENABLE(VIDEO_TRACK) && defined(GST_API_VERSION_1)
Vector<RefPtr<InbandTextTrackPrivateGStreamer> > m_textTracks;
RefPtr<InbandTextTrackPrivate> m_chaptersTrack;
#endif
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment