riff: add ADPCM_G722 support
authorNicola Murino <nicola.murino@gmail.com>
Sat, 28 Mar 2015 17:16:16 +0000 (18:16 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 20 Dec 2016 10:48:32 +0000 (12:48 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=746574

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

index 2c9c2d507cfe9e9294234155f392a3c05a362f82..cd5a9343929c6dfcd9290aaf26ea2e4ad0f443ec 100644 (file)
@@ -359,6 +359,7 @@ typedef struct _gst_riff_strf_auds {       /* == WaveHeader (?) */
 #define GST_RIFF_WAVE_FORMAT_CANOPUS_ATRAC  (0x0063)
 #define GST_RIFF_WAVE_FORMAT_G726_ADPCM     (0x0064)
 #define GST_RIFF_WAVE_FORMAT_G722_ADPCM     (0x0065)
+#define GST_RIFF_WAVE_FORMAT_ADPCM_G722     (0x028F)
 #define GST_RIFF_WAVE_FORMAT_DSAT_DISPLAY   (0x0067)
 #define GST_RIFF_WAVE_FORMAT_ADPCM_IMA_WAV (0x0069)
 /* FIXME: where are these from? are they used at all? */
index a103a389cd9b699f3ebaf0751f094a0837b4a400..3befe2aa567eaeffa05f80ca9e9f3e2fbc66a828 100644 (file)
@@ -1411,6 +1411,15 @@ gst_riff_create_audio_caps (guint16 codec_id,
       block_align = TRUE;
       break;
 
+    case GST_RIFF_WAVE_FORMAT_ADPCM_G722:
+      rate_min = 16000;
+      rate_max = 16000;
+      channels_max = 1;
+      caps = gst_caps_new_empty_simple ("audio/G722");
+      if (codec_name)
+        *codec_name = g_strdup ("G722 audio");
+      break;
+
     case GST_RIFF_WAVE_FORMAT_ITU_G726_ADPCM:
       if (strf != NULL) {
         gint bitrate;