Controller Troubles for setting brightness programmatically

Stefan Sauer ensonic at hora-obscura.de
Thu Dec 19 13:48:57 PST 2013


On 12/10/2013 12:13 AM, Urs Hofer wrote:
> Hi All
>
> I'm in troubles with Controllers in Gstreamer 1.2.
>
> The following code compiles flawlessly, but does not do anything but throwing an GStreamer-CRITICAL Message
> gst_object_add_control_binding: assertion 'binding->pspec' failed.
>
> -------------------------------------
>
> /* volume fades */
> GstControlSource  * cs1 = gst_interpolation_control_source_new ();
> GstControlBinding * binding = gst_direct_control_binding_new (GST_OBJECT_CAST (pipeline), "brightness", cs1);
> gst_object_add_control_binding (GST_OBJECT_CAST (pipeline), binding);
You want to add the control-binding to the element that has the
"brightness"property. Handle the return value of
gst_object_add_control_binding().

Stefan
>
> /* set interpolation mode */
> g_object_set (G_OBJECT(cs1), "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
>
> /* set control values */
> GstTimedValueControlSource * tvcs = (GstTimedValueControlSource *) cs1;
> gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0);
> gst_timed_value_control_source_set (tvcs, 1 * GST_SECOND, 1);
> gst_object_unref (cs1);	
>
> -------------------------------------
>
> Same happens if I want to change "volume". It happens also if I am referring to the 
> sink element or the playbin pipeline.
>
> Has anyone a hint? 
> Best,
> Urs Hofer
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list