text/plain + text/x-pango-markup -> text/x-raw
authorTim-Philipp Müller <tim@centricular.net>
Sun, 2 Sep 2012 01:50:50 +0000 (02:50 +0100)
committerTim-Philipp Müller <tim@centricular.net>
Sun, 2 Sep 2012 01:50:50 +0000 (02:50 +0100)
gst/isomp4/qtdemux.c
gst/matroska/matroska-demux.c
gst/matroska/matroska-mux.c

index a955189..fba5641 100644 (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;
index 9476be5..fbca729 100644 (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)) {
index 7bd24f9..c8a7414 100644 (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")) {