From a218a2a1af13c75b33a53c209ae25e9eb6a5509f Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sun, 9 Jul 2017 14:34:21 +0900 Subject: [PATCH] dashdemux: Add support webvtt subtitle stream Enable exposing webvtt subtitle streams. https://bugzilla.gnome.org/show_bug.cgi?id=784715 --- ext/dash/gstmpdparser.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index f60c3d59c6..dcb055410f 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -2383,7 +2383,7 @@ gst_mpdparser_representation_get_mimetype (GstAdaptationSetNode * adapt_set, return GST_STREAM_AUDIO; if (strncmp_ext (mime, "video") == 0) return GST_STREAM_VIDEO; - if (strncmp_ext (mime, "application") == 0) + if (strncmp_ext (mime, "application") == 0 || strncmp_ext (mime, "text") == 0) return GST_STREAM_APPLICATION; return GST_STREAM_UNKNOWN; @@ -5726,7 +5726,8 @@ gst_mpd_client_active_stream_contains_subtitles (GstActiveStream * stream) if (!mimeType) mimeType = stream->cur_adapt_set->RepresentationBase->mimeType; - if (g_strcmp0 (mimeType, "application/ttml+xml") == 0) + if (g_strcmp0 (mimeType, "application/ttml+xml") == 0 || + g_strcmp0 (mimeType, "text/vtt") == 0) return TRUE; adapt_set_codecs = stream->cur_adapt_set->RepresentationBase->codecs; @@ -5747,6 +5748,8 @@ gst_mpdparser_mimetype_to_caps (const gchar * mimeType) return "video/quicktime"; } else if (strcmp (mimeType, "audio/mp4") == 0) { return "audio/x-m4a"; + } else if (strcmp (mimeType, "text/vtt") == 0) { + return "application/x-subtitle-vtt"; } else return mimeType; }