audioencoders: use template subset check for accept-caps

It is faster than doing a query that propagates downstream and
should be enough

Elements: speexenc, wavpackenc, mulawenc, alawenc
This commit is contained in:
Thiago Santos 2015-08-15 22:32:21 -03:00
parent 1b27badcfd
commit a1aa942acf
4 changed files with 5 additions and 1 deletions

View file

@ -242,6 +242,7 @@ gst_speex_enc_init (GstSpeexEnc * enc)
/* arrange granulepos marking (and required perfect ts) */
gst_audio_encoder_set_mark_granule (benc, TRUE);
gst_audio_encoder_set_perfect_timestamp (benc, TRUE);
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (enc));
}
static gboolean

View file

@ -345,6 +345,8 @@ gst_wavpack_enc_init (GstWavpackEnc * enc)
/* require perfect ts */
gst_audio_encoder_set_perfect_timestamp (benc, TRUE);
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (enc));
}

View file

@ -423,4 +423,5 @@ gst_alaw_enc_class_init (GstALawEncClass * klass)
static void
gst_alaw_enc_init (GstALawEnc * alawenc)
{
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (alawenc));
}

View file

@ -207,5 +207,5 @@ gst_mulawenc_class_init (GstMuLawEncClass * klass)
static void
gst_mulawenc_init (GstMuLawEnc * mulawenc)
{
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (mulawenc));
}