summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-08-15 22:29:41 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2015-08-16 14:30:57 -0300
commit1b27badcfd5c37da59ad1dfa76154358a2f21f4d (patch)
tree5869604fbcf30ee3ea6180d6a70df52d760d2b58
parenta39bebb5feecfd35745e946249586f5413000c0d (diff)
videoencoders: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and should be enough Elements: jpegenc, pngenc, vp8enc, vp9enc, y4menc
-rw-r--r--ext/jpeg/gstjpegenc.c2
-rw-r--r--ext/libpng/gstpngenc.c2
-rw-r--r--ext/vpx/gstvp8enc.c1
-rw-r--r--ext/vpx/gstvp9enc.c1
-rw-r--r--gst/y4m/gsty4mencode.c2
5 files changed, 8 insertions, 0 deletions
diff --git a/ext/jpeg/gstjpegenc.c b/ext/jpeg/gstjpegenc.c
index 74c7bdde8..c1ba69473 100644
--- a/ext/jpeg/gstjpegenc.c
+++ b/ext/jpeg/gstjpegenc.c
@@ -283,6 +283,8 @@ gst_jpegenc_term_destination (j_compress_ptr cinfo)
static void
gst_jpegenc_init (GstJpegEnc * jpegenc)
{
+ GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (jpegenc));
+
/* setup jpeglib */
memset (&jpegenc->cinfo, 0, sizeof (jpegenc->cinfo));
memset (&jpegenc->jerr, 0, sizeof (jpegenc->jerr));
diff --git a/ext/libpng/gstpngenc.c b/ext/libpng/gstpngenc.c
index d3ebc49c9..df763ed32 100644
--- a/ext/libpng/gstpngenc.c
+++ b/ext/libpng/gstpngenc.c
@@ -199,6 +199,8 @@ done:
static void
gst_pngenc_init (GstPngEnc * pngenc)
{
+ GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (pngenc));
+
/* init settings */
pngenc->png_struct_ptr = NULL;
pngenc->png_info_ptr = NULL;
diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c
index cfb5a2f6e..a53819266 100644
--- a/ext/vpx/gstvp8enc.c
+++ b/ext/vpx/gstvp8enc.c
@@ -726,6 +726,7 @@ gst_vp8_enc_init (GstVP8Enc * gst_vp8_enc)
vpx_codec_err_t status;
GST_DEBUG_OBJECT (gst_vp8_enc, "init");
+ GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (gst_vp8_enc));
status =
vpx_codec_enc_config_default (&vpx_codec_vp8_cx_algo, &gst_vp8_enc->cfg,
diff --git a/ext/vpx/gstvp9enc.c b/ext/vpx/gstvp9enc.c
index ec2ea2163..e8e347f3f 100644
--- a/ext/vpx/gstvp9enc.c
+++ b/ext/vpx/gstvp9enc.c
@@ -698,6 +698,7 @@ gst_vp9_enc_init (GstVP9Enc * gst_vp9_enc)
vpx_codec_err_t status;
GST_DEBUG_OBJECT (gst_vp9_enc, "init");
+ GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (gst_vp9_enc));
status =
vpx_codec_enc_config_default (&vpx_codec_vp9_cx_algo, &gst_vp9_enc->cfg,
diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c
index 7b39d5f8a..bfadddb24 100644
--- a/gst/y4m/gsty4mencode.c
+++ b/gst/y4m/gsty4mencode.c
@@ -114,6 +114,8 @@ gst_y4m_encode_class_init (GstY4mEncodeClass * klass)
static void
gst_y4m_encode_init (GstY4mEncode * filter)
{
+ GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (filter));
+
/* init properties */
gst_y4m_encode_reset (filter);
}