[gst-devel] Asynchronous READY -> PAUSED state change in rtspsrc
arnout at mind.be
Fri Apr 3 20:41:04 CEST 2009
I have a rather simple application that displays several video feeds. It
uses playbin2. I have one GMainLoop from which I start several independent
However, when one of the playbins tries to connect to a non-existing RTSP
server, the application (not the already running playbins, which have their
own thread) freezes until that connection times out. This happens in the
READY -> PAUSED state change of the playbin, which is done synchronously (it
returns SUCCESS or FAILURE, never ASYNC). Note that the playbin's
async-handling is set to TRUE, I suppose this propagates to rtspsrc.
As comparison, souphttpsrc returns ASYNC on a READY -> PAUSED state change.
I tried to solve this by starting each bin in a separate thread. However,
that quickly becomes a locking nightmare (the bin can be set to NULL and
unreffed by the rest of the application before the state change ever happens
in the new thread; if I use a simple locking mechanism, acquiring that lock
from the application thread can still make it freeze for a couple of
It seems more logical to me that rtspsrc would, like souphttpsrc, do its
READY -> PAUSED transition asynchronously. Therefore, my questions:
* Has this been done or tried already? (I'm currently using -good
0.10.11, -base 0.10.21)
* If this behaviour is changed, should it be considered an API change? I.e.,
should there then be a property to specify if the state change should be
synchronous or asynchronous?
* Is anyone willing to assist me to make it asynchronous?
* Or is this a bad idea?
* Or maybe I'm doing something completely wrong?
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: D206 D44B 5155 DF98 550D 3F2A 2213 88AA A1C7 C933
More information about the gstreamer-devel