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

Dustin Spicuzza dustin at virtualroadside.com
Fri May 29 22:14:12 PDT 2015


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


More information about the gstreamer-devel mailing list