Changing properties of Base classes

Arun Raghavan arun at arunraghavan.net
Fri Oct 21 11:39:04 UTC 2016


On Fri, 21 Oct 2016, at 03:43 PM, mariannasb wrote:
> Hi,
> 
> I have created a Sink element which uses VideoSink as the Base class.
> 
> In my sink class I want to disable rendering the preroll frame.
> 
> I know I can do g_object_set(G_OBJECT(mysink), "show-preroll-frame",
> FALSE;
> NULL) inside my element init() function for example.
> But if I then call gst-inspect it will still show show-preroll-frame
> default=TRUE
> 
> Is there a way for me to overwrite the default value so that it is
> reflected
> in gst-inspect?
> 
> And I would also like if possible to change it to a read-only property,
> because I never want to render the preroll frame in this kind of sink.
> 
> I have found something about calling g_object_class_install_property() in
> a
> derived class using the same property name as the one in the base class
> in
> order to overwrite the property.
> But I don't really have access to the PROP_MAX_LATENESS enum value from
> my
> class in order to do that.

Maybe this is useful to you:

  https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-class-override-property

In general, if I'm not sure if some GObject or GStreamer API is
available, I look around in Devhelp to see if there's something. The
next resort is of course this list or IRC.

Cheers,
Arun


More information about the gstreamer-devel mailing list