Reputation: 2160
Gstreamer has an internal logging function: gstinfo
However, we have a custom logger object which should be shared by pipeline and has some specific functionality (SNMP) needed in the application context. The logger has an appropriate API needed by all internal elements of the plugins. (BTW: plugins in the context here are also built on our own). It has a built-in thread-safety elements as needed.
My question is, how can you pass the pointer to the object created by a pipeline object to inside of all plugin instances objects? Unless we are able to pass an object inside, there will be no way internals of the object will be able to access.
How does one pass on a (void *) object inside the plugins?
Upvotes: 1
Views: 497
Reputation: 2094
I'm not sure I fully understand what you want to do. But if you have the code for the plugin you can add a property to the elements that need this (void *) and set that property with the value you want.
If you need to have the same object/pointer shared across the whole pipeline I'd recommend taking a look at GstContext: https://developer.gnome.org/gstreamer/stable/gstreamer-GstContext.html It might be what you need.
Upvotes: 2