mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 13:21:28 +00:00
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 ;)
This commit is contained in:
parent
4e9bb8eb6c
commit
fcdd84f558
1 changed files with 10 additions and 10 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue