playbin as a child element: deadlock when transitioning from PLAYING/PAUSED to NULL

Luis de Bethencourt luis at debethencourt.com
Sat May 30 04:39:27 PDT 2015


On 30 May 2015 at 06:14, Dustin Spicuzza <dustin at virtualroadside.com> wrote:

> Hey,
>
> I'm using GStreamer 1.4.5 on Fedora 21 via gst-python.
>
> I'm embedding playbin elements inside of another pipeline, with the goal
> to use multiple playbins to play multiple files simultaneously and feed
> them to the same output via an adder -- that part actually works, and I
> can play two audio streams at once. So far so good.
>
> However, after I start the pipeline, I've found that I'm having problems
> stopping it, and it deadlocks.
>
> PLAYING -> NULL: I did find that if I set the playbin state to NULL
> before setting its parent's state to NULL, then it doesn't deadlock.
> However, this leads me to believe I'm missing something here, as I
> should only need to set the pipe to NULL and not the playbin too, right?
>
> PAUSED -> NULL: I don't know how to break this deadlock, I'm sure it's
> something simple I'm missing. It looks like the thread is blocked on a
> pad lock (gstpad.c:966 - gst_pad_activate_mode) on the GhostPad I
> created to connect the playbin to the adder. Using GDB, the owner of the
> lock is the PulseSink thread, who is waiting for something to happen at
> gst_base_sink_wait_preroll() -- gstbasesink.c:2151.
>
> I've posted a very short python implementation that demonstrates the
> problem with a single playbin at github:
> https://gist.github.com/virtuald/7592a16d6dee07404438
>
> Thanks for any assistance!
>
> Dustin
>

Hello Dustin,

I run your Python code and it works with current GStreamer from git. I
can't reproduce your deadlock.

Could you provide a debug log? [0]

Also, in your case I think it would be better if you used filesrc and
decodebin, instead of playbin.

I am not very clear on what is the purpose of the Bin you create. What is
it for?

Thanks,
Luis

[0]
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gst-running.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150530/c8d7ce99/attachment.html>


More information about the gstreamer-devel mailing list