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.
This commit is contained in:
Matthew Waters 2015-08-03 19:48:16 +10:00
parent 620af5b04b
commit 374cd2a570

View file

@ -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);