From fcdd84f55815c860f81670106302489541a8d560 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 5 Nov 2003 03:06:10 +0000 Subject: fix GST_FF_AUD_CAPS_NEW to not include channels and rate in unfixed caps and make audio caps use them again. This ens... Original commit message from CVS: fix GST_FF_AUD_CAPS_NEW to not include channels and rate in unfixed caps and make audio caps use them again. This ensures that audio encoders set these properties when setting fixed caps and audio decoders can advertise fixed caps, too. This should work in all cases. If not, change it back and ffdec_mp3 is broken again ;) --- ext/ffmpeg/gstffmpegcodecmap.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c index a82ed41..a50710c 100644 --- a/ext/ffmpeg/gstffmpegcodecmap.c +++ b/ext/ffmpeg/gstffmpegcodecmap.c @@ -68,8 +68,6 @@ : \ GST_CAPS_NEW (name, \ mimetype, \ - "rate", GST_PROPS_INT_RANGE (8000, 96000), \ - "channels", GST_PROPS_INT_RANGE (1, 2) , \ ##props) /* Convert a FFMPEG codec ID and optional AVCodecContext @@ -111,28 +109,28 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, break; case CODEC_ID_MP2: - caps = GST_CAPS_NEW ("ffmpeg_mp2", + caps = GST_FF_AUD_CAPS_NEW ("ffmpeg_mp2", "audio/mpeg", "layer", GST_PROPS_INT (2) ); break; case CODEC_ID_MP3LAME: - caps = GST_CAPS_NEW ("ffmpeg_mp3", + caps = GST_FF_AUD_CAPS_NEW ("ffmpeg_mp3", "audio/mpeg", "layer", GST_PROPS_INT (3) ); break; case CODEC_ID_VORBIS: /* FIXME? vorbis or ogg? */ - caps = GST_CAPS_NEW ("ffmpeg_vorbis", + caps = GST_FF_AUD_CAPS_NEW ("ffmpeg_vorbis", "application/ogg", NULL ); break; case CODEC_ID_AC3: - caps = GST_CAPS_NEW ("ffmpeg_ac3", + caps = GST_FF_AUD_CAPS_NEW ("ffmpeg_ac3", "audio/x-ac3", NULL ); @@ -233,8 +231,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_DVAUDIO: caps = GST_FF_AUD_CAPS_NEW ("ffmpeg_dvaudio", - "audio/x-dv" - ); + "audio/x-dv", + NULL); break; case CODEC_ID_DVVIDEO: @@ -397,12 +395,14 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_PCM_MULAW: caps = GST_FF_AUD_CAPS_NEW ("ffmpeg_mulawaudio", - "audio/x-mulaw"); + "audio/x-mulaw", + NULL); break; case CODEC_ID_PCM_ALAW: caps = GST_FF_AUD_CAPS_NEW ("ffmpeg_alawaudio", - "audio/x-alaw"); + "audio/x-alaw", + NULL); break; case CODEC_ID_ADPCM_IMA_QT: -- cgit v1.2.1