From a75be734718fc45f5ffe2e71209bdd37c65edde2 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sat, 28 Mar 2015 18:16:16 +0100 Subject: [PATCH] riff: add ADPCM_G722 support https://bugzilla.gnome.org/show_bug.cgi?id=746574 --- gst-libs/gst/riff/riff-ids.h | 1 + gst-libs/gst/riff/riff-media.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/gst-libs/gst/riff/riff-ids.h b/gst-libs/gst/riff/riff-ids.h index 2c9c2d507c..cd5a934392 100644 --- a/gst-libs/gst/riff/riff-ids.h +++ b/gst-libs/gst/riff/riff-ids.h @@ -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? */ diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c index a103a389cd..3befe2aa56 100644 --- a/gst-libs/gst/riff/riff-media.c +++ b/gst-libs/gst/riff/riff-media.c @@ -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;