mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 21:46:22 +00:00
videodecoders: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an accept-caps query Elements: jpegdec, pngdec, vp8dec, vp9dec
This commit is contained in:
parent
65d2af6462
commit
16fbd4f86f
4 changed files with 12 additions and 0 deletions
|
@ -278,6 +278,10 @@ gst_jpeg_dec_init (GstJpegDec * dec)
|
||||||
/* init properties */
|
/* init properties */
|
||||||
dec->idct_method = JPEG_DEFAULT_IDCT_METHOD;
|
dec->idct_method = JPEG_DEFAULT_IDCT_METHOD;
|
||||||
dec->max_errors = JPEG_DEFAULT_MAX_ERRORS;
|
dec->max_errors = JPEG_DEFAULT_MAX_ERRORS;
|
||||||
|
|
||||||
|
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 gboolean
|
static inline gboolean
|
||||||
|
|
|
@ -112,6 +112,10 @@ gst_pngdec_init (GstPngDec * pngdec)
|
||||||
|
|
||||||
pngdec->image_ready = FALSE;
|
pngdec->image_ready = FALSE;
|
||||||
pngdec->read_data = 0;
|
pngdec->read_data = 0;
|
||||||
|
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (GST_VIDEO_DECODER_CAST
|
||||||
|
(pngdec), TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (pngdec));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -207,6 +207,8 @@ gst_vp8_dec_init (GstVP8Dec * gst_vp8_dec)
|
||||||
gst_vp8_dec->noise_level = DEFAULT_NOISE_LEVEL;
|
gst_vp8_dec->noise_level = DEFAULT_NOISE_LEVEL;
|
||||||
|
|
||||||
gst_video_decoder_set_needs_format (decoder, TRUE);
|
gst_video_decoder_set_needs_format (decoder, TRUE);
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (decoder, TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (decoder));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -207,6 +207,8 @@ gst_vp9_dec_init (GstVP9Dec * gst_vp9_dec)
|
||||||
gst_vp9_dec->noise_level = DEFAULT_NOISE_LEVEL;
|
gst_vp9_dec->noise_level = DEFAULT_NOISE_LEVEL;
|
||||||
|
|
||||||
gst_video_decoder_set_needs_format (decoder, TRUE);
|
gst_video_decoder_set_needs_format (decoder, TRUE);
|
||||||
|
gst_video_decoder_set_use_default_pad_acceptcaps (decoder, TRUE);
|
||||||
|
GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (decoder));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue