gst-libs/gst/riff/: Add support for ADPCM IMA DK3 and DK4 variant in RIFF containers.

Original commit message from CVS:
* 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):
Add support for ADPCM IMA DK3 and DK4 variant in RIFF containers.
Fixes bug #540351.
This commit is contained in:
Sebastian Dröge 2008-06-30 09:20:59 +00:00
parent a97dc76ad7
commit 1aca2efee8
3 changed files with 38 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2008-06-30 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* 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):
Add support for ADPCM IMA DK3 and DK4 variant in RIFF containers.
Fixes bug #540351.
2008-06-30 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:

View file

@ -325,8 +325,13 @@ typedef struct _gst_riff_strf_auds { /* == WaveHeader (?) */
#define GST_RIFF_WAVE_FORMAT_MPEGL3 (0x0055)
#define GST_RIFF_WAVE_FORMAT_LUCENT_G723 (0x0059)
#define GST_RIFF_WAVE_FORMAT_CIRRUS (0x0060)
#define GST_RIFF_WAVE_FORMAT_ADPCM_IMA_DK4 (0x0061) /* not official */
#define GST_RIFF_WAVE_FORMAT_ADPCM_IMA_DK3 (0x0062) /* not official */
/* FIXME: where are these from? are they used at all? */
#if 0
#define GST_RIFF_WAVE_FORMAT_ESPCM (0x0061)
#define GST_RIFF_WAVE_FORMAT_VOXWARE (0x0062)
#endif
#define GST_RIFF_WAVE_FORMAT_CANOPUS_ATRAC (0x0063)
#define GST_RIFF_WAVE_FORMAT_G726_ADPCM (0x0064)
#define GST_RIFF_WAVE_FORMAT_G722_ADPCM (0x0065)

View file

@ -1133,6 +1133,27 @@ gst_riff_create_audio_caps (guint16 codec_id,
*codec_name = g_strdup ("Sony ATRAC3");
break;
case GST_RIFF_WAVE_FORMAT_ADPCM_IMA_DK4:
rate_min = 8000;
rate_max = 96000;
channels_max = 2;
caps =
gst_caps_new_simple ("audio/x-adpcm", "layout", G_TYPE_STRING, "dk4",
NULL);
if (codec_name)
*codec_name = g_strdup ("IMA/DK4 ADPCM");
break;
case GST_RIFF_WAVE_FORMAT_ADPCM_IMA_DK3:
rate_min = 8000;
rate_max = 96000;
channels_max = 2;
caps =
gst_caps_new_simple ("audio/x-adpcm", "layout", G_TYPE_STRING, "dk3",
NULL);
if (codec_name)
*codec_name = g_strdup ("IMA/DK3 ADPCM");
break;
case GST_RIFF_WAVE_FORMAT_EXTENSIBLE:{
guint16 valid_bits_per_sample;
guint32 channel_mask;
@ -1310,7 +1331,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:
case GST_RIFF_WAVE_FORMAT_VOXWARE_AC8:
case GST_RIFF_WAVE_FORMAT_VOXWARE_AC10:
@ -1514,8 +1534,10 @@ gst_riff_create_audio_template_caps (void)
GST_RIFF_WAVE_FORMAT_WMAV3,
GST_RIFF_WAVE_FORMAT_SONY_ATRAC3,
GST_RIFF_WAVE_FORMAT_IEEE_FLOAT,
GST_RIFF_WAVE_FORMAT_VOXWARE
/* FILL ME */
GST_RIFF_WAVE_FORMAT_VOXWARE_METASOUND,
GST_RIFF_WAVE_FORMAT_ADPCM_IMA_DK4,
GST_RIFF_WAVE_FORMAT_ADPCM_IMA_DK3,
/* FILL ME */
};
guint i;
GstCaps *caps, *one;