diff options
author | Matthew Waters <matthew@centricular.com> | 2017-01-10 12:51:51 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2017-01-10 13:57:37 +1100 |
commit | a4024b61cf78182ea4ff7413fed39474bd1b23bd (patch) | |
tree | 827873792a2bffce10fd1a72b34b1829998b03cd /ext | |
parent | 6d17a4133ba02d290b040012c28b42b9b06d09ce (diff) | |
download | gstreamer-plugins-bad-a4024b61cf78182ea4ff7413fed39474bd1b23bd.tar.gz |
gl: remove custom control binding proxy
Use the existing GstProxyControlBinding instead.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/gl/Makefile.am | 3 | ||||
-rw-r--r-- | ext/gl/gstglsinkbin.c | 18 | ||||
-rw-r--r-- | ext/gl/gstglvideomixer.c | 55 | ||||
-rw-r--r-- | ext/gl/meson.build | 2 |
4 files changed, 36 insertions, 42 deletions
diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am index 80036b5e8..11734bfb2 100644 --- a/ext/gl/Makefile.am +++ b/ext/gl/Makefile.am @@ -128,6 +128,7 @@ libgstopengl_la_OBJCFLAGS = \ $(GST_OBJCFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_CONTROLLER_CFLAGS) \ $(GL_OBJCFLAGS) # check order of CFLAGS and LIBS, shouldn't the order be the other way around @@ -138,6 +139,7 @@ libgstopengl_la_CFLAGS = \ $(GST_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_CONTROLLER_CFLAGS) \ $(GL_CFLAGS) \ $(LIBPNG_CFLAGS) \ $(GRAPHENE_CFLAGS) @@ -149,6 +151,7 @@ libgstopengl_la_LIBADD = \ $(GST_BASE_LIBS) \ $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) \ -lgstpbutils-$(GST_API_VERSION) \ + $(GST_CONTROLLER_LIBS) \ $(GL_LIBS) \ $(LIBPNG_LIBS) \ $(JPEG_LIBS) \ diff --git a/ext/gl/gstglsinkbin.c b/ext/gl/gstglsinkbin.c index c9c5a7239..8477d73f1 100644 --- a/ext/gl/gstglsinkbin.c +++ b/ext/gl/gstglsinkbin.c @@ -24,6 +24,7 @@ #include <gst/video/videooverlay.h> #include <gst/video/navigation.h> +#include <gst/controller/gstproxycontrolbinding.h> #include "gstglsinkbin.h" @@ -248,14 +249,15 @@ gst_gl_sink_bin_init (GstGLSinkBin * self) gst_object_unref (pad); } - gst_gl_object_add_control_binding_proxy (GST_OBJECT (self->balance), - GST_OBJECT (self), "contrast"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (self->balance), - GST_OBJECT (self), "brightness"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (self->balance), - GST_OBJECT (self), "hue"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (self->balance), - GST_OBJECT (self), "saturation"); +#define ADD_BINDING(obj,ref,prop) \ + gst_object_add_control_binding (GST_OBJECT (obj), \ + gst_proxy_control_binding_new (GST_OBJECT (obj), prop, \ + GST_OBJECT (ref), prop)); + ADD_BINDING (self->balance, self, "contrast"); + ADD_BINDING (self->balance, self, "brightness"); + ADD_BINDING (self->balance, self, "hue"); + ADD_BINDING (self->balance, self, "saturation"); +#undef ADD_BINDING if (!res) { GST_WARNING_OBJECT (self, "Failed to add/connect the necessary machinery"); diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c index ffb43d4e8..1c8655792 100644 --- a/ext/gl/gstglvideomixer.c +++ b/ext/gl/gstglvideomixer.c @@ -44,6 +44,7 @@ #endif #include <gst/video/gstvideoaffinetransformationmeta.h> +#include <gst/controller/gstproxycontrolbinding.h> #include "gstglvideomixer.h" #include "gstglmixerbin.h" @@ -338,39 +339,27 @@ _create_video_mixer_input (GstGLMixerBin * self, GstPad * mixer_pad) gst_object_unref (input); return NULL; } - - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "zorder"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "xpos"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "ypos"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "width"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "height"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "alpha"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "blend-equation-rgb"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "blend-equation-alpha"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "blend-function-src-rgb"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "blend-function-src-alpha"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "blend-function-dst-rgb"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "blend-function-dst-alpha"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "blend-constant-color-red"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "blend-constant-color-green"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "blend-constant-color-blue"); - gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), - GST_OBJECT (input), "blend-constant-color-alpha"); +#define ADD_BINDING(obj,ref,prop) \ + gst_object_add_control_binding (GST_OBJECT (obj), \ + gst_proxy_control_binding_new (GST_OBJECT (obj), prop, \ + GST_OBJECT (ref), prop)); + ADD_BINDING (mixer_pad, input, "zorder"); + ADD_BINDING (mixer_pad, input, "xpos"); + ADD_BINDING (mixer_pad, input, "ypos"); + ADD_BINDING (mixer_pad, input, "width"); + ADD_BINDING (mixer_pad, input, "height"); + ADD_BINDING (mixer_pad, input, "alpha"); + ADD_BINDING (mixer_pad, input, "blend-equation-rgb"); + ADD_BINDING (mixer_pad, input, "blend-equation-alpha"); + ADD_BINDING (mixer_pad, input, "blend-function-src-rgb"); + ADD_BINDING (mixer_pad, input, "blend-function-src-alpha"); + ADD_BINDING (mixer_pad, input, "blend-function-dst-rgb"); + ADD_BINDING (mixer_pad, input, "blend-function-dst-alpha"); + ADD_BINDING (mixer_pad, input, "blend-constant-color-red"); + ADD_BINDING (mixer_pad, input, "blend-constant-color-green"); + ADD_BINDING (mixer_pad, input, "blend-constant-color-blue"); + ADD_BINDING (mixer_pad, input, "blend-constant-color-alpha"); +#undef ADD_BINDING input->mixer_pad = mixer_pad; diff --git a/ext/gl/meson.build b/ext/gl/meson.build index 60d9ccc90..9dfd78117 100644 --- a/ext/gl/meson.build +++ b/ext/gl/meson.build @@ -108,7 +108,7 @@ if build_gstgl and gstgl_dep.found() link_args : noseh_link_args, include_directories : [configinc], dependencies : [gstgl_dep, gstbadvideo_dep, gstbadbase_dep, gstvideo_dep, - gstbase_dep, libm] + optional_deps, + gstbase_dep, gstcontroller_dep, libm] + optional_deps, install : true, install_dir : plugins_install_dir, ) |