[gst-cvs] gst-plugins-bad: mpegtsdemux: Implement EAC3 handling according some ATSC specs.

Sebastian Dröge slomo at kemper.freedesktop.org
Thu Sep 3 06:46:49 PDT 2009


Module: gst-plugins-bad
Branch: master
Commit: 1e865242a7a30ca398af3dcb89908785b46b7862
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=1e865242a7a30ca398af3dcb89908785b46b7862

Author: Josep Torra <josep at fluendo.com>
Date:   Thu Sep  3 15:40:14 2009 +0200

mpegtsdemux: Implement EAC3 handling according some ATSC specs.

Fixes bug #594030.

---

 gst/mpegdemux/gstmpegdefs.h    |    1 +
 gst/mpegdemux/gstmpegtsdemux.c |   14 +++++++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/gst/mpegdemux/gstmpegdefs.h b/gst/mpegdemux/gstmpegdefs.h
index 4055113..35ee967 100644
--- a/gst/mpegdemux/gstmpegdefs.h
+++ b/gst/mpegdemux/gstmpegdefs.h
@@ -178,6 +178,7 @@
 #define ST_BD_AUDIO_AC3_TRUE_HD         0x83
 #define ST_BD_AUDIO_AC3_PLUS            0x84
 #define ST_BD_AUDIO_DTS_HD              0x85
+#define ST_BD_AUDIO_EAC3                0x87
 #define ST_BD_PGS_SUBPICTURE            0x90
 #define ST_BD_IGS                       0x91
 #define ST_BD_SUBTITLE                  0x92
diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c
index 2ab639b..6723afb 100644
--- a/gst/mpegdemux/gstmpegtsdemux.c
+++ b/gst/mpegdemux/gstmpegtsdemux.c
@@ -669,9 +669,21 @@ gst_mpegts_demux_fill_stream (GstMpegTSStream * stream, guint8 id,
           NULL);
       break;
     case ST_BD_AUDIO_AC3:
+      if (gst_mpeg_descriptor_find (stream->ES_info, DESC_DVB_AC3)) {
+        template = klass->audio_template;
+        name = g_strdup_printf ("audio_%04x", stream->PID);
+        caps = gst_caps_new_simple ("audio/x-ac3", NULL);
+      } else if (gst_mpeg_descriptor_find (stream->ES_info,
+              DESC_DVB_ENHANCED_AC3)) {
+        template = klass->audio_template;
+        name = g_strdup_printf ("audio_%04x", stream->PID);
+        caps = gst_caps_new_simple ("audio/x-eac3", NULL);
+      }
+      break;
+    case ST_BD_AUDIO_EAC3:
       template = klass->audio_template;
       name = g_strdup_printf ("audio_%04x", stream->PID);
-      caps = gst_caps_new_simple ("audio/x-ac3", NULL);
+      caps = gst_caps_new_simple ("audio/x-eac3", NULL);
       break;
     case ST_PS_AUDIO_DTS:
       template = klass->audio_template;





More information about the Gstreamer-commits mailing list