Gst element refcounting

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

Gst element refcounting

gandalfborland
This post was updated on .
In my pipeline I have many elements.
Sometime I need to remove link between two elements and remove this elements.
But sometimes this element are connect to other. So I need to leave it.
Decision if I need to remove some element depend on refcount of this element,
I mean if refcount >= 2 element couldn't be removed.
The problem is, that if I add element to pipeline an set playing state on it, refcount of element increase to 7.
At the moment when I try to remove it I set only this element to NULL state(not pipeline).
After that refcount increase to 12 but I sure that no other elements use it.
On the other hand when I set NULL state on pipeline, refcount back to 1.
How to drop refcaunt of element in pipeline to 1 without touching pipeline?

Tom
Reply | Threaded
Open this post in threaded view
|

Re: Gst application

Stefan Sauer
On 08/04/11 16:23, gandalfborland wrote:
> In my pipeline I have many elements.
> Sometime I need to remove link between two elements and remove this
> elements.
> But sometimes this element are connect to other. So I need to leave it.
> Decision if I need to remove some element depend on refcount of this
> element,
> I mean if refcount >= 2 element couldn't be remove.
Huh? The refcount tells how many references are the to the instance. It
has nothing to do with being linked in a pipliene or not. Just remove
elements you want to remove.

Stefan

> The problem is, that if I add element to pipeline an set playing state on
> it, refcount of element increase to 7.
> At the moment when I try to remove it I set only this element to NULL
> state(not pipeline).
> After that refcount increase to 12 but I sure that no other elements use it.
> On the other hand when I set NULL state on pipeline, refcount back to 1.
> How to drop refcaunt of element in pipeline to 1 without touching pipeline?
>
> Tom
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gst-application-tp3718844p3718844.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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