Any method for checking if rtspsrc is actually connected?

Tim Müller tim at centricular.com
Sun Jan 4 04:14:32 PST 2015


On Wed, 2014-12-31 at 12:19 -0800, scottyMo220 wrote:

Hi,

> So I have a pipeline that starts with an rtspsrc to connect to a video feed
> from a router. However, the service running the pipeline may be started
> before the device I'm getting video from is actually booted up. I've found
> that in this case, my pipeline would still appear to be working normally,
> except with no video (I'd see a black screen on my video frame, but all the
> element and pad states would appear normal). Furthermore, the rtspsrc would
> not get video even after the the target device was booted. 
> 
> Currently I am getting around this by checking if the rtspsrc itself has any
> pads. I've noticed that the rtspsrc will only have pads attached to it in
> cases where it was able to successfully get video from the provided url. I
> routinely capture the pipeline state, delete it and recreate, and finally
> start the new pipeline until the rtspsrc is created with the pads. However,
> this seems like a pretty roundabout way of handing this, and I was wondering
> if there might be a more straightforward method of checking if an rtspsrc is
> actually getting video? Also if there might be another easier way to have
> the source reconnect automatically as soon the router actually comes up on
> the network.

You should get a GST_MESSAGE_ERROR on the pipeline's GstBus from rtspsrc
if it fails to connect to the server. Does that not happen in your case?

rtspsrc also posts GST_MESSAGE_PROGRESS messages on the bus I believe.

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list