Is it possible to be notified about plugins readonly parameter changes?

Michael Gruner michael.gruner at ridgerun.com
Tue Mar 20 16:05:06 UTC 2018


Hi Wellington

Every GObject (GstElements included) may emit a signal every time one of its properties change. This signal is named “notify::<property name>”. So, for example, if you’d like to register a callback every time the “sync” property changes, you would do something like:

/* Activate property change notification */
g_object_notify (G_OBJECT (sink), “sync”);

/* Register a callback */
g_signal_connect (sink, "notify::sync",
      G_CALLBACK (sync_update_callback), NULL);

You may find more info in the notify signal documentation:
https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#GObject-notify <https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#GObject-notify>


—
Michael Gruner <michael.gruner at ridgerun.com <mailto:michael.gruner at ridgerun.com>>
Embedded Linux and GStreamer solutions
RidgeRun Engineering
Contact Us - http://www.ridgerun.com/#!contact/c3vn <http://www.ridgerun.com/#!contact/c3vn>

> On Mar 20, 2018, at 09:18, wellington wallace <wellingtonwallace at gmail.com> wrote:
> 
> Hi!
> 
> I would like to be notified when an readonly parameter changes. Consider for example the current delay or latency of ladspa or lv2 delay plugin. I tried the following with no success:
> 
> self.delay.bind_property('left-delay', self.ui_value, 'value', GObject.BindingFlags.DEFAULT)
> 
> When the property is writable I am notified about its changes but not when it is readonly. I know that the plugin code made changes to the parameter because I can see them doing print(self.delay.get_property('left-delay)).
> 
> Is there a way to be notified about these changes without having to periodically calling get_property?
> 
> Best regards,
> 
>                  Wellington
> 
> -- 
> Prof.° Wellington Wallace Miguel Melo
> 
> CEFET/RJ Uned Nova Iguaçu
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180320/b1823533/attachment.html>


More information about the gstreamer-devel mailing list