videodecoders: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an accept-caps query Elements: daaladec, libde265dec, openjpegdec, rsvgdec, schrodec, webpdec, pnmdec, vmncdec, openexrdec
This commit is contained in:
parent
51dfa3b135
commit
a5ed877783
@ -131,6 +131,9 @@ gst_daala_dec_init (GstDaalaDec * dec)
|
|||||||
* but is not marked that way so data gets parsed and keyframes marked */
|
* but is not marked that way so data gets parsed and keyframes marked */
|
||||||
gst_video_decoder_set_packetized (GST_VIDEO_DECODER (dec), FALSE);
|
gst_video_decoder_set_packetized (GST_VIDEO_DECODER (dec), FALSE);
|
||||||
gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (dec), TRUE);
|
gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (dec), TRUE);
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
|
||||||
|
(dec), TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (dec));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -200,6 +200,9 @@ gst_libde265_dec_init (GstLibde265Dec * dec)
|
|||||||
dec->length_size = 4;
|
dec->length_size = 4;
|
||||||
_gst_libde265_dec_reset_decoder (dec);
|
_gst_libde265_dec_reset_decoder (dec);
|
||||||
gst_video_decoder_set_packetized (GST_VIDEO_DECODER (dec), TRUE);
|
gst_video_decoder_set_packetized (GST_VIDEO_DECODER (dec), TRUE);
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
|
||||||
|
(dec), TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (dec));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
@ -151,6 +151,9 @@ gst_openexr_dec_init (GstOpenEXRDec * self)
|
|||||||
GstVideoDecoder *decoder = (GstVideoDecoder *) self;
|
GstVideoDecoder *decoder = (GstVideoDecoder *) self;
|
||||||
|
|
||||||
gst_video_decoder_set_packetized (decoder, FALSE);
|
gst_video_decoder_set_packetized (decoder, FALSE);
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
|
||||||
|
(self), TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (self));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -109,6 +109,9 @@ gst_openjpeg_dec_init (GstOpenJPEGDec * self)
|
|||||||
|
|
||||||
gst_video_decoder_set_packetized (decoder, TRUE);
|
gst_video_decoder_set_packetized (decoder, TRUE);
|
||||||
gst_video_decoder_set_needs_format (decoder, TRUE);
|
gst_video_decoder_set_needs_format (decoder, TRUE);
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
|
||||||
|
(self), TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (self));
|
||||||
opj_set_default_decoder_parameters (&self->params);
|
opj_set_default_decoder_parameters (&self->params);
|
||||||
#ifdef HAVE_OPENJPEG_1
|
#ifdef HAVE_OPENJPEG_1
|
||||||
self->params.cp_limit_decoding = NO_LIMITATION;
|
self->params.cp_limit_decoding = NO_LIMITATION;
|
||||||
|
@ -104,6 +104,9 @@ gst_rsvg_dec_init (GstRsvgDec * rsvg)
|
|||||||
{
|
{
|
||||||
GstVideoDecoder *decoder = GST_VIDEO_DECODER (rsvg);
|
GstVideoDecoder *decoder = GST_VIDEO_DECODER (rsvg);
|
||||||
gst_video_decoder_set_packetized (decoder, FALSE);
|
gst_video_decoder_set_packetized (decoder, FALSE);
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
|
||||||
|
(rsvg), TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (rsvg));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -155,6 +155,9 @@ gst_schro_dec_init (GstSchroDec * schro_dec)
|
|||||||
|
|
||||||
schro_dec->decoder = schro_decoder_new ();
|
schro_dec->decoder = schro_decoder_new ();
|
||||||
gst_video_decoder_set_packetized (GST_VIDEO_DECODER (schro_dec), FALSE);
|
gst_video_decoder_set_packetized (GST_VIDEO_DECODER (schro_dec), FALSE);
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
|
||||||
|
(schro_dec), TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (schro_dec));
|
||||||
schro_dec->header_read = FALSE;
|
schro_dec->header_read = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,6 +139,9 @@ gst_webp_dec_init (GstWebPDec * dec)
|
|||||||
dec->bypass_filtering = FALSE;
|
dec->bypass_filtering = FALSE;
|
||||||
dec->no_fancy_upsampling = FALSE;
|
dec->no_fancy_upsampling = FALSE;
|
||||||
dec->use_threads = FALSE;
|
dec->use_threads = FALSE;
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
|
||||||
|
(dec), TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (dec));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -108,6 +108,10 @@ gst_pnmdec_init (GstPnmdec * s)
|
|||||||
/* Initialize decoder */
|
/* Initialize decoder */
|
||||||
s->buf = NULL;
|
s->buf = NULL;
|
||||||
gst_pnmdec_flush (s);
|
gst_pnmdec_flush (s);
|
||||||
|
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
|
||||||
|
(s), TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (s));
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
|
@ -105,6 +105,9 @@ gst_vmnc_dec_class_init (GstVMncDecClass * klass)
|
|||||||
static void
|
static void
|
||||||
gst_vmnc_dec_init (GstVMncDec * dec)
|
gst_vmnc_dec_init (GstVMncDec * dec)
|
||||||
{
|
{
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
|
||||||
|
(dec), TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (dec));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user