text/plain + text/x-pango-markup -> text/x-raw

This commit is contained in:
Tim-Philipp Müller 2012-09-02 02:50:50 +01:00
parent b27ac94af2
commit fb0f3c17f5
3 changed files with 7 additions and 5 deletions

View file

@ -9809,7 +9809,8 @@ qtdemux_sub_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
case GST_MAKE_FOURCC ('t', 'x', '3', 'g'):
_codec ("3GPP timed text");
text:
caps = gst_caps_new_empty_simple ("text/plain");
caps = gst_caps_new_simple ("text/x-raw", "format", G_TYPE_STRING,
"utf8", NULL);
/* actual text piece needs to be extracted */
stream->need_process = TRUE;
break;

View file

@ -114,7 +114,7 @@ static GstStaticPadTemplate subtitle_src_templ =
GST_STATIC_PAD_TEMPLATE ("subtitle_%u",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
GST_STATIC_CAPS ("text/x-pango-markup; application/x-ssa; "
GST_STATIC_CAPS ("text/x-raw, format=pango-markup; application/x-ssa; "
"application/x-ass;application/x-usf; subpicture/x-dvd; "
"subpicture/x-pgs; subtitle/x-kate; " "application/x-subtitle-unknown")
);
@ -5626,7 +5626,8 @@ gst_matroska_demux_subtitle_caps (GstMatroskaTrackSubtitleContext *
* Check if we have to do something with codec_private */
if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_SUBTITLE_UTF8)) {
/* well, plain text simply does not have a lot of markup ... */
caps = gst_caps_new_empty_simple ("text/x-pango-markup");
caps = gst_caps_new_simple ("text/x-raw", "format", G_TYPE_STRING,
"pango-markup", NULL);
context->postprocess_frame = gst_matroska_demux_check_subtitle_buffer;
subtitlecontext->check_markup = TRUE;
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_SUBTITLE_SSA)) {

View file

@ -190,7 +190,7 @@ static GstStaticPadTemplate subtitlesink_templ =
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS ("subtitle/x-kate; "
"text/plain; application/x-ssa; application/x-ass; "
"text/x-raw, format=utf8; application/x-ssa; application/x-ass; "
"application/x-usf; subpicture/x-dvd; "
"application/x-subtitle-unknown")
);
@ -2014,7 +2014,7 @@ gst_matroska_mux_subtitle_pad_setcaps (GstPad * pad, GstCaps * caps)
ret = FALSE;
goto exit;
}
} else if (!strcmp (mimetype, "text/plain")) {
} else if (!strcmp (mimetype, "text/x-raw")) {
gst_matroska_mux_set_codec_id (context,
GST_MATROSKA_CODEC_ID_SUBTITLE_UTF8);
} else if (!strcmp (mimetype, "application/x-ssa")) {