From 81a78449d5b408ad719e58e3ee818316169e6b7f Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 3 Aug 2015 19:48:16 +1000 Subject: [PATCH] glvideomixer: swap control binding proxy The ref_object and object parameters were the wrong way around. For the typical use case where an application is setting a GstControlBinding on the returned ghost pad: 1. our control binding would be removed when the new one was set 2. sync_values calls were not being forwarded from the internal pad to the ghost pad. If an application attempts to perform other control binding operations (get_* family of functions) on the internal pad, they will also be forwarded to the ghost pad where a possible GstControlBinding will provide the necessary values. --- ext/gl/gstglvideomixer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c index 25897d8731..d17a744945 100644 --- a/ext/gl/gstglvideomixer.c +++ b/ext/gl/gstglvideomixer.c @@ -327,10 +327,10 @@ _create_video_mixer_input (GstGLMixerBin * self, GstPad * mixer_pad) gst_object_unref (input); return NULL; } -#define ADD_PROXY_CONTROL_BINDING(prop) \ - cb = gst_gl_mixer_control_binding_proxy_new (GST_OBJECT (input), \ - G_STRINGIFY (prop), GST_OBJECT (mixer_pad), G_STRINGIFY (prop)); \ - gst_object_add_control_binding (GST_OBJECT (input), cb) +#define ADD_PROXY_CONTROL_BINDING(prop) \ + cb = gst_gl_mixer_control_binding_proxy_new (GST_OBJECT (mixer_pad), \ + G_STRINGIFY (prop), GST_OBJECT (input), G_STRINGIFY (prop)); \ + gst_object_add_control_binding (GST_OBJECT (mixer_pad), cb) ADD_PROXY_CONTROL_BINDING (zorder); ADD_PROXY_CONTROL_BINDING (xpos);