summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSeungha Yang <sh.yang@lge.com>2017-07-09 14:34:21 +0900
committerEdward Hervey <bilboed@bilboed.com>2017-07-18 09:40:18 +0200
commita218a2a1af13c75b33a53c209ae25e9eb6a5509f (patch)
treee3eabfde1ca2037cd4d065f799174aaa6a7d4777 /ext
parente8f11615bd2ceede201398fd3b409dacadc4de5c (diff)
downloadgstreamer-plugins-bad-a218a2a1af13c75b33a53c209ae25e9eb6a5509f.tar.gz
dashdemux: Add support webvtt subtitle stream
Enable exposing webvtt subtitle streams. https://bugzilla.gnome.org/show_bug.cgi?id=784715
Diffstat (limited to 'ext')
-rw-r--r--ext/dash/gstmpdparser.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c
index f60c3d59c..dcb055410 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;
}