Detecting Network Failure on RtpSrc (RtpBin)

Federico Zamperini fzamperini at tiscali.it
Tue Jan 29 02:48:36 PST 2013


Il 29/01/2013 10:31, Paddy ha scritto:
> What I haven't quite worked out is how to detect when the camera comes back
> online

I did that using an auxiliary thread that:
- starts the pipeline
- stops it in case of connection error
- waits a few seconds before trying to start the pipeline again
- terminates in case of successful connection
This thread is then started again every time an EOS message is posted on 
the bus by the rtspsrc element.

My experience with a rtspsrc is as follows:
- if you disconnect (e.g. unplug the network cable) the RTSP src 
(camera, gst_rtsp_server, etc.) and reconnect it after about 25 secs the 
rtspsrc element posts an EOS message on the bus and stops receiving data 
(I can't recall if it changes state, but IIRC I had to stop it to make 
it working back again, so I guess it stays in the PLAYING state -- live 
sources never go to the PAUSED state, right?); you have to stop it and 
start it again to (try to) restore the connection
- if the connection with the server is restored in < 25sec then the 
rtspsrc starts receiveing data again without any explicit external action

Cheers

Federico


More information about the gstreamer-devel mailing list