summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@collabora.com>2012-02-14 11:44:48 -0300
committerThibault Saunier <thibault.saunier@collabora.com>2012-02-15 15:48:44 -0300
commitcda0d3aed881018c4a39273613f7644742705ece (patch)
tree678b32e16e048ca6166c9f43abc4c72bf646e05f
parent6094ec27b17cd69f43e5e5c86b6bcad9f92d1f96 (diff)
tsdemux: Add AAC latm support
-rw-r--r--gst/mpegtsdemux/gstmpegdefs.h3
-rw-r--r--gst/mpegtsdemux/tsdemux.c20
2 files changed, 14 insertions, 9 deletions
diff --git a/gst/mpegtsdemux/gstmpegdefs.h b/gst/mpegtsdemux/gstmpegdefs.h
index be6209aaf..66f922b71 100644
--- a/gst/mpegtsdemux/gstmpegdefs.h
+++ b/gst/mpegtsdemux/gstmpegdefs.h
@@ -151,8 +151,9 @@
#define ST_DSMCC_D 0x0d
/* later extensions */
-#define ST_AUDIO_AAC 0x0f
+#define ST_AUDIO_AAC_ADTS 0x0f
#define ST_VIDEO_MPEG4 0x10
+#define ST_AUDIO_AAC_LATM 0x11
#define ST_VIDEO_H264 0x1b
/* Un-official Dirac extension */
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
index 03814b6d4..7049c816e 100644
--- a/gst/mpegtsdemux/tsdemux.c
+++ b/gst/mpegtsdemux/tsdemux.c
@@ -149,7 +149,7 @@ struct _TSDemuxStream
"mpegversion = (int) 1;" \
"audio/mpeg, " \
"mpegversion = (int) 4, " \
- "stream-format = (string) adts; " \
+ "stream-format = (string) {adts, loas}; " \
"audio/x-lpcm, " \
"width = (int) { 16, 20, 24 }, " \
"rate = (int) { 48000, 96000 }, " \
@@ -256,14 +256,11 @@ gst_ts_demux_base_init (gpointer klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- gst_element_class_add_static_pad_template (element_class,
- &video_template);
- gst_element_class_add_static_pad_template (element_class,
- &audio_template);
+ gst_element_class_add_static_pad_template (element_class, &video_template);
+ gst_element_class_add_static_pad_template (element_class, &audio_template);
gst_element_class_add_static_pad_template (element_class,
&subpicture_template);
- gst_element_class_add_static_pad_template (element_class,
- &private_template);
+ gst_element_class_add_static_pad_template (element_class, &private_template);
gst_element_class_set_details_simple (element_class,
"MPEG transport stream demuxer",
@@ -1080,13 +1077,20 @@ create_pad_for_stream (MpegTSBase * base, MpegTSBaseStream * bstream,
case ST_DSMCC_D:
MPEGTS_BIT_UNSET (base->is_pes, bstream->pid);
break;
- case ST_AUDIO_AAC: /* ADTS */
+ case ST_AUDIO_AAC_ADTS:
template = gst_static_pad_template_get (&audio_template);
name = g_strdup_printf ("audio_%04x", bstream->pid);
caps = gst_caps_new_simple ("audio/mpeg",
"mpegversion", G_TYPE_INT, 4,
"stream-format", G_TYPE_STRING, "adts", NULL);
break;
+ case ST_AUDIO_AAC_LATM:
+ template = gst_static_pad_template_get (&audio_template);
+ name = g_strdup_printf ("audio_%04x", bstream->pid);
+ caps = gst_caps_new_simple ("audio/mpeg",
+ "mpegversion", G_TYPE_INT, 4,
+ "stream-format", G_TYPE_STRING, "loas", NULL);
+ break;
case ST_VIDEO_MPEG4:
template = gst_static_pad_template_get (&video_template);
name = g_strdup_printf ("video_%04x", bstream->pid);