Controller Troubles for setting brightness programmatically

Urs Hofer hoferurs at gmail.com
Tue Dec 10 15:13:05 PST 2013


Dear Tim

Indeed, volume works now if I use a bin containing
volume and autoaudiosink and attach it to the playbin setting the audio-sink
property.

Thanks for pointing to gst-inspect: indeed, brightness is not controllable in
xvimagesink, so I could try for ages ;). As for sound, it also works if I use 
the videobalance element before xvimagesink.

(This raises another question, which would be the fastest, most accelerated 
way of fading in and out)

Thanks for your help,
Urs

Am 10.12.2013 um 17:56 schrieb Tim Müller <tim at centricular.com>:

> 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
> 
> 
> 
> 
> _______________________________________________
> 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