Associating User Data with an Element?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Associating User Data with an Element?

Stirling Westrup
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?


--
Stirling Westrup
Programmer, Entrepreneur.
https://www.linkedin.com/e/fpf/77228
http://www.linkedin.com/in/swestrup
http://technaut.livejournal.com
http://sourceforge.net/users/stirlingwestrup
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Associating User Data with an Element?

Tim-Philipp Müller-2
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

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel