Detecting Network Failure on RtpSrc (RtpBin)

Engin Yüce enginy88 at gmail.com
Mon Apr 9 05:35:10 PDT 2012


First of all this is my first question in the list and i wanna say hi to
everyone:)

Let's get into my question.

I'm writing an application that shows multiple rtsp streams (h264) in part
of a gtk window. My problem is i can't detect network failure of streams. Here
are the symptoms:

Program starts and works perfectly. But when i unplug a network cable of
one of the source, program hangs and freezes about 1-1,5 minutes. Then the
unplugged source's last frame dropped from the window and program continues
to run again. There is no warning or error message in the bus until now. If
i plug the cable again, i can get an error message from bus but only in
this way. (To be clear, if i plug the cable during freeze, after 15-20
seconds the streams continues, i mean i plug the cable after program
responding again.)

******ERR:Could not read from resource.
******ERR:gstrtspsrc.c(3878): gst_rtspsrc_loop_udp ():
/GstPipeline:my_pipeline/GstRTSPSrc:Source1: Could not receive message.
(Network error: Resolver Error 0 (no error))
******ERR:Internal data flow error.
******ERR:gstrtspsrc.c(3988): gst_rtspsrc_loop ():
/GstPipeline:my_pipeline/GstRTSPSrc:Source1: streaming task paused, reason
error (-5)

I try to set timeout tcp-timeout retry parameters to "0" of rtspsrc but the
freeze time won't decrease. (that's actually another question i can't
figure out)

Finally i read about reaching rtpbin element inside of the rtspsrc element
and connect signals of this internal rtpbin element. I tried it also. I
found the rtpbin element by iterating childs and checking
gst_object_get_name and connect all signals like on-bye-ssrc on-bye-timeout
signal of rtpbin but no callback function called once.

Is there anythink that i miss? Your advices?

My pipeline is like that:

rtspsrc --> rtph264depay --> ffdec_h264 --> ffmpegcolorspace --> videobox
--> videorate --> videomixer
rtspsrc --> rtph264depay --> ffdec_h264 --> ffmpegcolorspace --> videobox
--> videorate --> videomixer
rtspsrc --> rtph264depay --> ffdec_h264 --> ffmpegcolorspace --> videobox
--> videorate --> videomixer
rtspsrc --> rtph264depay --> ffdec_h264 --> ffmpegcolorspace --> videobox
--> videorate --> videomixer --> colorspace --> ximagesink

My simplified source code is here:

http://pastebin.com/jPrwaN5M

Thank you in advance for the replies.
-engin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120409/adcfcaeb/attachment.html>


More information about the gstreamer-devel mailing list