[gst-cvs] gst-plugins-good: matroskademux: Recognise PGS subpicture streams - the bluray format.

Jan Schmidt thaytan at kemper.freedesktop.org
Thu May 21 13:37:03 PDT 2009


Module: gst-plugins-good
Branch: master
Commit: 66149475bde68cdd9a9f4557eea2b4bbf79043e0
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=66149475bde68cdd9a9f4557eea2b4bbf79043e0

Author: Jan Schmidt <thaytan at noraisin.net>
Date:   Tue May 19 15:12:09 2009 +0100

matroskademux: Recognise PGS subpicture streams - the bluray format.

Recognise and apply appropriate caps to PGS (Presentation Graphic Stream)
subpicture streams.

---

 gst/matroska/matroska-demux.c |    4 +++-
 gst/matroska/matroska-ids.h   |    1 +
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 5601485..bb71ac3 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -121,7 +121,7 @@ static GstStaticPadTemplate subtitle_src_templ =
     GST_PAD_SOMETIMES,
     GST_STATIC_CAPS ("text/plain; application/x-ssa; application/x-ass; "
         "application/x-usf; video/x-dvd-subpicture; "
-        "application/x-subtitle-unknown")
+        "subpicture/x-pgs; " "application/x-subtitle-unknown")
     );
 
 static GstFlowReturn gst_matroska_demux_parse_contents (GstMatroskaDemux *
@@ -5670,6 +5670,8 @@ gst_matroska_demux_subtitle_caps (GstMatroskaTrackSubtitleContext *
   } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_SUBTITLE_VOBSUB)) {
     caps = gst_caps_new_simple ("video/x-dvd-subpicture", NULL);
     ((GstMatroskaTrackContext *) subtitlecontext)->send_dvd_event = TRUE;
+  } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_SUBTITLE_HDMVPGS)) {
+    caps = gst_caps_new_simple ("subpicture/x-pgs", NULL);
   } else {
     GST_DEBUG ("Unknown subtitle stream: codec_id='%s'", codec_id);
     caps = gst_caps_new_simple ("application/x-subtitle-unknown", NULL);
diff --git a/gst/matroska/matroska-ids.h b/gst/matroska/matroska-ids.h
index ae4eed0..703c64d 100644
--- a/gst/matroska/matroska-ids.h
+++ b/gst/matroska/matroska-ids.h
@@ -377,6 +377,7 @@
 #define GST_MATROSKA_CODEC_ID_SUBTITLE_ASS       "S_TEXT/ASS" 
 #define GST_MATROSKA_CODEC_ID_SUBTITLE_USF       "S_TEXT/USF"
 #define GST_MATROSKA_CODEC_ID_SUBTITLE_VOBSUB    "S_VOBSUB"
+#define GST_MATROSKA_CODEC_ID_SUBTITLE_HDMVPGS   "S_HDMV/PGS"
 #define GST_MATROSKA_CODEC_ID_SUBTITLE_BMP       "S_IMAGE/BMP"
 
 /*





More information about the Gstreamer-commits mailing list