Dynamically Changing Pipeline - Deadlock

Maurice Ackel maurice.ackel at students.uni-mannheim.de
Wed Sep 8 15:39:59 UTC 2021


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 <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/20210908/517a923f/attachment.htm>


More information about the gstreamer-devel mailing list