Commit 65676c22 authored by Thiago Santos's avatar Thiago Santos

audiodecoders: use default pad accept-caps handling

Avoids useless check of downstream caps when handling an
accept-caps query

Elements: flacdec, speexdec, wavpackdec, mulawdec, alawdec
parent 16fbd4f8
......@@ -179,6 +179,9 @@ static void
gst_flac_dec_init (GstFlacDec * flacdec)
{
gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (flacdec), TRUE);
gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
(flacdec), TRUE);
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (flacdec));
}
static gboolean
......
......@@ -156,6 +156,9 @@ static void
gst_speex_dec_init (GstSpeexDec * dec)
{
gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (dec), TRUE);
gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
(dec), TRUE);
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (dec));
dec->enh = DEFAULT_ENH;
......
......@@ -142,6 +142,9 @@ gst_wavpack_dec_init (GstWavpackDec * dec)
dec->stream_reader = gst_wavpack_stream_reader_new ();
gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (dec), TRUE);
gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
(dec), TRUE);
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (dec));
gst_wavpack_dec_reset (dec);
}
......
......@@ -224,4 +224,7 @@ static void
gst_alaw_dec_init (GstALawDec * alawdec)
{
gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (alawdec), TRUE);
gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
(alawdec), TRUE);
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (alawdec));
}
......@@ -169,4 +169,7 @@ static void
gst_mulawdec_init (GstMuLawDec * mulawdec)
{
gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (mulawdec), TRUE);
gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST
(mulawdec), TRUE);
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_DECODER_SINK_PAD (mulawdec));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment