Controller Troubles for setting brightness programmatically
Tim Müller
tim at centricular.com
Tue Dec 10 08:56:43 PST 2013
On Tue, 2013-12-10 at 00:15 +0100, Urs Hofer wrote:
Hi Urs,
> 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.
The 'pspec' is the property specification for a GObject property, so
this critical implies that this is not set for some reason.
> -------------------------------------
>
> /* 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);
I'm going to guess that your pipeline does not have a "brightness"
property.
If it's playbin, you can check the available properties (and if they are
controllable) with:
$ gst-inspect-1.0 playbin
> -------------------------------------
>
> Same happens if I want to change "volume". It happens also if I am referring to the
> sink element or the playbin pipeline.
Playbin's volume property is not controllable currently, it just proxies
another element's volume property.
If you want a controllable volume you should probably create a
convenience bin that contains "volume ! audiosink" and then control the
volume on the volume element directly via GstController. Alternatively
(depending on how precise it has to be and what the use case is), you
could just set up timers in your application thread and change playbin's
volume property (or the sink's).
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list