gl: remove custom control binding proxy

Use the existing GstProxyControlBinding instead.
This commit is contained in:
Matthew Waters 2017-01-10 12:51:51 +11:00
parent 0f4ed7e2d6
commit e8ec52b8ef

View file

@ -44,6 +44,7 @@
#endif #endif
#include <gst/video/gstvideoaffinetransformationmeta.h> #include <gst/video/gstvideoaffinetransformationmeta.h>
#include <gst/controller/gstproxycontrolbinding.h>
#include "gstglvideomixer.h" #include "gstglvideomixer.h"
#include "gstglmixerbin.h" #include "gstglmixerbin.h"
@ -338,39 +339,27 @@ _create_video_mixer_input (GstGLMixerBin * self, GstPad * mixer_pad)
gst_object_unref (input); gst_object_unref (input);
return NULL; return NULL;
} }
#define ADD_BINDING(obj,ref,prop) \
gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), gst_object_add_control_binding (GST_OBJECT (obj), \
GST_OBJECT (input), "zorder"); gst_proxy_control_binding_new (GST_OBJECT (obj), prop, \
gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), GST_OBJECT (ref), prop));
GST_OBJECT (input), "xpos"); ADD_BINDING (mixer_pad, input, "zorder");
gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), ADD_BINDING (mixer_pad, input, "xpos");
GST_OBJECT (input), "ypos"); ADD_BINDING (mixer_pad, input, "ypos");
gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), ADD_BINDING (mixer_pad, input, "width");
GST_OBJECT (input), "width"); ADD_BINDING (mixer_pad, input, "height");
gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), ADD_BINDING (mixer_pad, input, "alpha");
GST_OBJECT (input), "height"); ADD_BINDING (mixer_pad, input, "blend-equation-rgb");
gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), ADD_BINDING (mixer_pad, input, "blend-equation-alpha");
GST_OBJECT (input), "alpha"); ADD_BINDING (mixer_pad, input, "blend-function-src-rgb");
gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), ADD_BINDING (mixer_pad, input, "blend-function-src-alpha");
GST_OBJECT (input), "blend-equation-rgb"); ADD_BINDING (mixer_pad, input, "blend-function-dst-rgb");
gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), ADD_BINDING (mixer_pad, input, "blend-function-dst-alpha");
GST_OBJECT (input), "blend-equation-alpha"); ADD_BINDING (mixer_pad, input, "blend-constant-color-red");
gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), ADD_BINDING (mixer_pad, input, "blend-constant-color-green");
GST_OBJECT (input), "blend-function-src-rgb"); ADD_BINDING (mixer_pad, input, "blend-constant-color-blue");
gst_gl_object_add_control_binding_proxy (GST_OBJECT (mixer_pad), ADD_BINDING (mixer_pad, input, "blend-constant-color-alpha");
GST_OBJECT (input), "blend-function-src-alpha"); #undef ADD_BINDING
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");
input->mixer_pad = mixer_pad; input->mixer_pad = mixer_pad;