audioencoders: use template subset check for accept-caps

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

Elements: amrnbenc, lamemp3enc, twolamemp2enc
This commit is contained in:
Thiago Santos 2015-08-15 22:15:26 -03:00
parent c1211659cc
commit e1b6ef3209
3 changed files with 4 additions and 0 deletions

View file

@ -171,6 +171,7 @@ gst_amrnbenc_class_init (GstAmrnbEncClass * klass)
static void
gst_amrnbenc_init (GstAmrnbEnc * amrnbenc)
{
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (amrnbenc));
}
static gboolean

View file

@ -281,6 +281,7 @@ gst_lamemp3enc_class_init (GstLameMP3EncClass * klass)
static void
gst_lamemp3enc_init (GstLameMP3Enc * lame)
{
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (lame));
}
static gboolean

View file

@ -418,6 +418,8 @@ gst_two_lame_init (GstTwoLame * twolame)
{
GST_DEBUG_OBJECT (twolame, "starting initialization");
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (twolame));
twolame->mode = gst_two_lame_default_settings.mode;
twolame->psymodel = gst_two_lame_default_settings.psymodel;
twolame->bitrate = gst_two_lame_default_settings.bitrate;