gst-libs/gst/riff/: Add support for ADPCM IMA DK3 and DK4 variant in RIFF containers.
authorSebastian Dröge <slomo@circular-chaos.org>
Mon, 30 Jun 2008 09:20:59 +0000 (09:20 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Mon, 30 Jun 2008 09:20:59 +0000 (09:20 +0000)
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.

ChangeLog
gst-libs/gst/riff/riff-ids.h
gst-libs/gst/riff/riff-media.c

index 0648375..401fccd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 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:
        (gst_ffmpeg_pixfmt_to_caps):
        * gst/ffmpegcolorspace/gstffmpegcolorspace.c:
index adeaf35..dcd3cee 100644 (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)
index d344fb4..dcd86db 100644 (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;