Removing elements

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

Removing elements

GStreamer-devel mailing list
Hi,

I have a gstreamer pipeline that mixes streams from various sources.
What's the best way to remove elements when they are no longer required,
without destroying and rebuilding the whole stream?

At the moment, I'm removing the elements from the pipeline, setting
their state to GST_STATE_NULL, and unlinking the final element from the
mixer. However, this is unreliable, and sometimes leads to a hang.

Can anyone point to some example code that shows how to do this reliably?

Thanks,

Anthony

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing elements

GStreamer-devel mailing list
Was just looking at this yesterday, here's a minimal example:

https://github.com/GStreamer/gst-python/blob/master/examples/dynamic_src.py

IIRC the method is to install an idle probe on the upstream pad, unlink the pads
when the idle probe is triggered, and set the state to NULL later (in an idle
callback or such).

Best, Florian

On 28/05/2021 11:28, Anthony Williams via gstreamer-devel wrote:

> Hi,
>
> I have a gstreamer pipeline that mixes streams from various sources.
> What's the best way to remove elements when they are no longer required,
> without destroying and rebuilding the whole stream?
>
> At the moment, I'm removing the elements from the pipeline, setting
> their state to GST_STATE_NULL, and unlinking the final element from the
> mixer. However, this is unreliable, and sometimes leads to a hang.
>
> Can anyone point to some example code that shows how to do this reliably?
>
> Thanks,
>
> Anthony
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>

--
SENT FROM MY DEC VT50 TERMINAL


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

OpenPGP_signature (209 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Removing elements

GStreamer-devel mailing list
On 28/05/2021 10:32, Florian Echtler via gstreamer-devel wrote:
> Was just looking at this yesterday, here's a minimal example:
>
> https://github.com/GStreamer/gst-python/blob/master/examples/dynamic_src.py
>
>
> IIRC the method is to install an idle probe on the upstream pad,
> unlink the pads when the idle probe is triggered, and set the state to
> NULL later (in an idle callback or such).

Thanks, that works much better!

Cheers,

Anthony

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