[gst-devel] Timeout in rtspsrc
Marco Ballesio
gibrovacco at gmail.com
Wed Feb 9 09:02:24 CET 2011
Hi,
On Wed, Feb 9, 2011 at 1:41 AM, Thierry Panthier
<thierry.devel at gmail.com> wrote:
> Hi Marco,
>
> Sorry I didn't make myself clear. You were right I'm actually looking
> for a way to handle the RTCP timeout for a specific SSRC.
>
>> as you're likely using UDP as transport layer, RTP packets cannot be
>> timed out (yes, it's an unreliable protocol). RTCP can help you here,
>> as you'd just need to enable it and listen for (missing) Sender
>> Reports, translated in "on-ssrc-active" signals from the session
>> element in the GstRtspSrc (which is usually a GstRtpBin).
>
> The problem is that the rtspsrc bin does not have this signal. And if
> I try to connect to it I get:
>
> TypeError: <__main__.GstRTSPSrc object (rtspsrc0) at
> 0x919beb4>: unknown signal name: on-ssrc-active
>
> The rtspsrc documentation says it is built on top of gstrtpbin but how
> do I get access to it?
it's not possible to get such a signal from the rtspsrc, which is just
a specialised bin (see here to believe:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-rtspsrc.html).
As you already suspect, it's instead possible to get such a signal
from the GstRtpBin used as a manager (I'm sorry I mistakenly wrote
"session" earlier, but it's actually possible to do the same with the
GstRtpSession element) inside the RtspSrc. You can get it through the
GstBin api:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBin.html
Basically, iterate through the children and get the one instantiating
a GstRtpBin. A more quick-and-dirty way would be to use
gst_bin_get_by_name and something like "rtpbin0" for the name.
Regards
>
> If could simply have access to the signals "on-ssrc-active" and
> "on-timeout" that would be great.
>
> However if the implementation does not allow me to do that then I
> would like to know if it is possible to add an element to my bin to
> detect a "frozen stream". I've gone through all the options given by
> gst-inspect but couldn't find anything useful.
>
>> RTCP packets are (usually) sent with intervals of 5s. If you want
>> something faster, you can install a data probe somewhere in the pipe
>> resetting a timeout each time a buffer transits through the pad. When
>> the timer triggers, then a timeout occurred and you can unilaterally
>> terminate the communication.
>
> 5s for me it's good enough for my application.
>
>
> Thanks in advance,
>
> Thierry
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
More information about the gstreamer-devel
mailing list