Associating User Data with an Element?

Tim-Philipp Müller t.i.m at zen.co.uk
Thu Nov 15 09:07:15 PST 2012


On Thu, 2012-11-15 at 11:51 -0500, Stirling Westrup wrote:

> Right now I am writing an application in C where it would be helpful
> if I could cache data in an element. One example is that I have three
> different elements that may appear at a certain spot in the pipeline,
> depending on what user commands I've received. When its time to
> dynamically tear down that part of the pipeline and reconfigure, I
> need to invoke a different teardown function for each of the elements,
> as they have radically different connections to the pipleline (some
> have ghost pads, some have request pads, some have always pads, etc.).
> 
> I'd love to have some sort of gst_element_set_user_data(element, data)
> function, but no such animal exists. Is there some easy way to achieve
> this using other gstreamer features?

There is g_object_set_data{_full}, but it sounds like a bit of a weird
setup overall, there might be a better way.

Cheers
 -Tim



More information about the gstreamer-devel mailing list