From: Thiago Santos Date: Sun, 16 Aug 2015 10:06:44 +0000 (-0300) Subject: videoencoders: use template subset check for accept-caps X-Git-Tag: 1.19.3~507^2~8097 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6dc5e19a288f5e135f3f3a13dc3748a7a250b47;p=platform%2Fupstream%2Fgstreamer.git videoencoders: use template subset check for accept-caps It is faster than doing a query that propagates downstream and should be enough Elements: openjpegenc, schroenc, webpenc, pnmenc --- diff --git a/ext/openjpeg/gstopenjpegenc.c b/ext/openjpeg/gstopenjpegenc.c index aee074a..a68493c 100644 --- a/ext/openjpeg/gstopenjpegenc.c +++ b/ext/openjpeg/gstopenjpegenc.c @@ -203,6 +203,8 @@ gst_openjpeg_enc_class_init (GstOpenJPEGEncClass * klass) static void gst_openjpeg_enc_init (GstOpenJPEGEnc * self) { + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (self)); + opj_set_default_encoder_parameters (&self->params); self->params.cp_fixed_quality = 1; diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c index f1a7493..6cd761f 100644 --- a/ext/schroedinger/gstschroenc.c +++ b/ext/schroedinger/gstschroenc.c @@ -240,6 +240,8 @@ gst_schro_enc_init (GstSchroEnc * schro_enc) { GST_DEBUG ("gst_schro_enc_init"); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (schro_enc)); + /* Normally, we'd create the encoder in ->start(), but we use the * encoder to store object properties. So it needs to be created * here. */ diff --git a/ext/webp/gstwebpenc.c b/ext/webp/gstwebpenc.c index b813e4e..75891ea 100644 --- a/ext/webp/gstwebpenc.c +++ b/ext/webp/gstwebpenc.c @@ -163,6 +163,8 @@ gst_webp_enc_class_init (GstWebpEncClass * klass) static void gst_webp_enc_init (GstWebpEnc * webpenc) { + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (webpenc)); + webpenc->lossless = DEFAULT_LOSSLESS; webpenc->quality = DEFAULT_QUALITY; webpenc->speed = DEFAULT_SPEED; diff --git a/gst/pnm/gstpnmenc.c b/gst/pnm/gstpnmenc.c index 1c059c8..8a0461c 100644 --- a/gst/pnm/gstpnmenc.c +++ b/gst/pnm/gstpnmenc.c @@ -111,6 +111,8 @@ gst_pnmenc_get_property (GObject * object, guint prop_id, GValue * value, static void gst_pnmenc_init (GstPnmenc * s) { + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (s)); + /* Set default encoding as RAW as ASCII takes up 4 time more bytes */ s->info.encoding = GST_PNM_ENCODING_RAW; }