Commit 6517282a authored by Thiago Santos's avatar Thiago Santos

audioencoders: use template subset check for accept-caps

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

Elements: faac, gsmenc, opusenc, sbcenc, voamrwbenc, adpcmenc, sirenenc
parent 6135ebeb
......@@ -243,6 +243,7 @@ gst_faac_class_init (GstFaacClass * klass)
static void
gst_faac_init (GstFaac * faac)
{
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (faac));
}
static void
......
......@@ -97,6 +97,7 @@ gst_gsmenc_class_init (GstGSMEncClass * klass)
static void
gst_gsmenc_init (GstGSMEnc * gsmenc)
{
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (gsmenc));
}
static gboolean
......
......@@ -376,6 +376,8 @@ gst_opus_enc_init (GstOpusEnc * enc)
GST_DEBUG_OBJECT (enc, "init");
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (enc));
g_mutex_init (&enc->property_lock);
enc->n_channels = -1;
......
......@@ -362,6 +362,7 @@ gst_sbc_enc_class_init (GstSbcEncClass * klass)
static void
gst_sbc_enc_init (GstSbcEnc * self)
{
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (self));
self->subbands = 0;
self->blocks = 0;
self->rate = 0;
......
......@@ -177,6 +177,7 @@ gst_voaacenc_class_init (GstVoAacEncClass * klass)
static void
gst_voaacenc_init (GstVoAacEnc * voaacenc)
{
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (voaacenc));
voaacenc->bitrate = VOAAC_ENC_DEFAULT_BITRATE;
voaacenc->output_format = VOAAC_ENC_DEFAULT_OUTPUTFORMAT;
......
......@@ -190,6 +190,8 @@ gst_voamrwbenc_class_init (GstVoAmrWbEncClass * klass)
static void
gst_voamrwbenc_init (GstVoAmrWbEnc * amrwbenc)
{
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (amrwbenc));
/* init rest */
amrwbenc->handle = NULL;
amrwbenc->channels = 0;
......
......@@ -421,6 +421,8 @@ adpcmenc_stop (GstAudioEncoder * enc)
static void
adpcmenc_init (ADPCMEnc * enc)
{
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (enc));
/* Set defaults. */
enc->blocksize = DEFAULT_ADPCM_BLOCK_SIZE;
enc->layout = DEFAULT_ADPCM_LAYOUT;
......
......@@ -92,6 +92,7 @@ gst_siren_enc_class_init (GstSirenEncClass * klass)
static void
gst_siren_enc_init (GstSirenEnc * enc)
{
GST_PAD_SET_ACCEPT_TEMPLATE (GST_AUDIO_ENCODER_SINK_PAD (enc));
}
static gboolean
......
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