diff options
author | Benjamin Otte <otte@gnome.org> | 2003-04-14 02:18:46 +0000 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2003-04-14 02:18:46 +0000 |
commit | fe00dae6d49ce8e473652bc71a36771e7c56aad5 (patch) | |
tree | e53ae4b0fde705fb7577094d71b4fab92a153aa6 /gst | |
parent | 06c7783da2853846b5294feafd671651b5d9b42f (diff) |
added support for alaw/mulaw audio - yes, I have alaw encoded AVIs here
Original commit message from CVS:
added support for alaw/mulaw audio - yes, I have alaw encoded AVIs here
Diffstat (limited to 'gst')
-rw-r--r-- | gst/avi/gstavidemux.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index d768f14c..894d1571 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -798,6 +798,25 @@ gst_avi_demux_strf_auds (GstAviDemux *avi_demux) codecname = g_strdup_printf("Raw PCM/WAV (0x%04x)", strf->format); break; + case GST_RIFF_WAVE_FORMAT_MULAW: + case GST_RIFF_WAVE_FORMAT_ALAW: + if (strf->size != 8) + g_warning ("invalid depth (%d) of mulaw/alaw audio, overwriting.", strf->size); + newcaps = gst_caps_new ("avidemux_audio_src", + "audio/raw", + gst_props_new ( + "format", GST_PROPS_STRING ("int"), + "law", GST_PROPS_INT (GUINT16_FROM_LE(strf->format) == GST_RIFF_WAVE_FORMAT_ALAW ? 2 : 1), + "endianness", GST_PROPS_INT (G_LITTLE_ENDIAN), + "width", GST_PROPS_INT (8), + "depth", GST_PROPS_INT (8), + "rate", GST_PROPS_INT (GUINT32_FROM_LE (strf->rate)), + "channels", GST_PROPS_INT (GUINT16_FROM_LE (strf->channels)), + NULL + )); + codecname = g_strdup_printf("%s-law encoded (0x%04x)", + GUINT16_FROM_LE(strf->format) == GST_RIFF_WAVE_FORMAT_ALAW ? "A" : "Mu", strf->format); + break; case GST_RIFF_WAVE_FORMAT_VORBIS1: /* ogg/vorbis mode 1 */ case GST_RIFF_WAVE_FORMAT_VORBIS2: /* ogg/vorbis mode 2 */ case GST_RIFF_WAVE_FORMAT_VORBIS3: /* ogg/vorbis mode 3 */ |