Dynamically Changing Pipeline - Deadlock

Clyde McQueen clydemcqueen at gmail.com
Tue Sep 14 16:26:02 UTC 2021


I just ran the example code you mentioned, and it worked fine for me. I'm
running gstreamer 1.16.2 on ubuntu 20.04.

/Clyde

On Wed, Sep 8, 2021 at 8:40 AM Maurice Ackel via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> wrote:

> Hi,
>
> I’m following the explanation about dynamically changing pipelines found
> here:
>
> https://gstreamer.freedesktop.org/documentation/application-development/advanced/pipeline-manipulation.html?gi-language=c#dynamically-changing-the-pipeline
>
> However, when I run my program and the EOS event callback is called, I get
> the following error:
>
> ```
> Trying to join task 0x7fa51f928dd0 from its thread would deadlock.
> You cannot change the state of an element from its streaming
> thread. Use g_idle_add() or post a GstMessage on the bus to
> schedule the state change from the main thread.
> ```
>
> The reason seems simple. I’m listening for an EOS event on the src pad of
> the element I want to remove.. (As explained in the demo code).
>
> Now I’m wondering if I am doing something wrong or if perhaps the example
> code might not be up to data anymore?
>
> In any case, what is the best practice to remove an element from a
> (theoretically running) pipeline?
>
> Thank you!
> Maurice
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210914/786062ba/attachment.htm>


More information about the gstreamer-devel mailing list