Commit 038488fa authored by Young-Ho Cha's avatar Young-Ho Cha Committed by Wim Taymans
Browse files

gst-libs/gst/riff/: Added MPEG-4 AAC and id and caps. Fixes #357289

Original commit message from CVS:
Patch by: Young-Ho Cha <ganadist at chollian dot net>
* gst-libs/gst/riff/riff-ids.h:
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
(gst_riff_create_audio_template_caps):
Added MPEG-4 AAC and id and caps. Fixes #357289
Added WMA9 Lossless id.
parent 8df1f1ad
2006-09-23 Wim Taymans <wim@fluendo.com>
Patch by: Young-Ho Cha <ganadist at chollian dot net>
* gst-libs/gst/riff/riff-ids.h:
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
(gst_riff_create_audio_template_caps):
Added MPEG-4 AAC and id and caps. Fixes #357289
Added WMA9 Lossless id.
2006-09-22 Tim-Philipp Müller <tim at centricular dot net>
 
* ext/gnomevfs/gstgnomevfssrc.c:
......@@ -304,12 +304,14 @@ typedef struct _gst_riff_strf_auds { /* == WaveHeader (?) */
#define GST_RIFF_WAVE_FORMAT_VOXWARE_VR18 (0x0078)
#define GST_RIFF_WAVE_FORMAT_VOXWARE_TQ40 (0x0079)
#define GST_RIFF_WAVE_FORMAT_VOXWARE_TQ60 (0x0081)
#define GST_RIFF_WAVE_FORMAT_AAC (0x00ff)
#define GST_RIFF_IBM_FORMAT_MULAW (0x0101)
#define GST_RIFF_IBM_FORMAT_ALAW (0x0102)
#define GST_RIFF_IBM_FORMAT_ADPCM (0x0103)
#define GST_RIFF_WAVE_FORMAT_WMAV1 (0x0160)
#define GST_RIFF_WAVE_FORMAT_WMAV2 (0x0161)
#define GST_RIFF_WAVE_FORMAT_WMAV3 (0x0162)
#define GST_RIFF_WAVE_FORMAT_WMAV3_L (0x0163)
#define GST_RIFF_WAVE_FORMAT_SONY_ATRAC3 (0x0270)
#define GST_RIFF_WAVE_FORMAT_A52 (0x2000)
#define GST_RIFF_WAVE_FORMAT_DTS (0x2001)
......
......@@ -726,7 +726,9 @@ gst_riff_create_audio_caps (guint16 codec_id,
gint ch = strf->channels;
gint ws = strf->size;
caps = gst_caps_new_simple ("audio/x-raw-int", "endianness", G_TYPE_INT, G_LITTLE_ENDIAN, "channels", G_TYPE_INT, ch, /* needed for _add_layout() */
caps = gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
"channels", G_TYPE_INT, ch,
"width", G_TYPE_INT, (int) (ba * 8 / ch),
"depth", G_TYPE_INT, ws, "signed", G_TYPE_BOOLEAN, ws != 8, NULL);
......@@ -879,6 +881,15 @@ gst_riff_create_audio_caps (guint16 codec_id,
if (codec_name)
*codec_name = g_strdup ("DTS audio");
break;
case GST_RIFF_WAVE_FORMAT_AAC:
{
channels_max = 8;
caps = gst_caps_new_simple ("audio/mpeg",
"mpegversion", G_TYPE_INT, 4, NULL);
if (codec_name)
*codec_name = g_strdup ("MPEG-4 AAC audio");
break;
}
case GST_RIFF_WAVE_FORMAT_WMAV1:
case GST_RIFF_WAVE_FORMAT_WMAV2:
case GST_RIFF_WAVE_FORMAT_WMAV3:
......@@ -886,7 +897,6 @@ gst_riff_create_audio_caps (guint16 codec_id,
gint version = (codec_id - GST_RIFF_WAVE_FORMAT_WMAV1) + 1;
channels_max = 6;
block_align = TRUE;
caps = gst_caps_new_simple ("audio/x-wma",
......@@ -905,6 +915,11 @@ gst_riff_create_audio_caps (guint16 codec_id,
}
break;
}
case GST_RIFF_WAVE_FORMAT_WMAV3_L:
{
/* WMA Version 9 Lossless */
goto unknown;
}
case GST_RIFF_WAVE_FORMAT_SONY_ATRAC3:
caps = gst_caps_new_simple ("audio/x-vnd.sony.atrac3", NULL);
if (codec_name)
......@@ -979,6 +994,8 @@ gst_riff_create_audio_caps (guint16 codec_id,
subformat_guid[1] == 0x41783f83 &&
subformat_guid[2] == 0xf0006596 && subformat_guid[3] == 0xe59262bf) {
caps = gst_caps_new_simple ("application/x-ogg-avi", NULL);
if (codec_name)
*codec_name = g_strdup ("Ogg-AVI");
}
if (caps == NULL) {
......@@ -987,7 +1004,6 @@ gst_riff_create_audio_caps (guint16 codec_id,
}
break;
}
/* can anything decode these? pitfdll? */
case GST_RIFF_WAVE_FORMAT_VOXWARE:
case GST_RIFF_WAVE_FORMAT_VOXWARE_BYTE_ALIGNED:
......@@ -1154,6 +1170,7 @@ gst_riff_create_audio_template_caps (void)
GST_RIFF_WAVE_FORMAT_VORBIS1,
GST_RIFF_WAVE_FORMAT_A52,
GST_RIFF_WAVE_FORMAT_DTS,
GST_RIFF_WAVE_FORMAT_AAC,
GST_RIFF_WAVE_FORMAT_ALAW,
GST_RIFF_WAVE_FORMAT_MULAW,
GST_RIFF_WAVE_FORMAT_ADPCM,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment