From fb0f3c17f53ab86f451eff407b0a9f39095afaf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 2 Sep 2012 02:50:50 +0100 Subject: [PATCH] text/plain + text/x-pango-markup -> text/x-raw --- gst/isomp4/qtdemux.c | 3 ++- gst/matroska/matroska-demux.c | 5 +++-- gst/matroska/matroska-mux.c | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index a955189027..fba56415d5 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -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; diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 9476be52f0..fbca729c6e 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -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)) { diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 7bd24f901c..c8a74148c7 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -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")) {