relaxing rtp packet probation

Aleix Conchillo Flaqué aconchillo at gmail.com
Tue Aug 21 14:50:59 PDT 2012


Hi,

I am streaming (via rtp) jpeg images every 4 seconds and everything
worked fine until network latency jitter was setup (using tc command).
The server is implemented with gst-rtsp-server and the client simply
uses rtsprc element.

Digging around rtp code I found out that
gst-plugins-good/gst/rtpmanager/rtpsource.c does a probation to
determine if we have a valid RTP stream. Until that probation succeeds
no packets are pushed to other elements.

The current probation algorithm expects receiving a couple of sets of
2 packets with consecutive sequence numbers. The problem with my jpeg
stream and network configuration is that it sends few packets every
time and none of the packets have consecutive sequence numbers. This
means that the probation will always fail. Setting a higher latency
does not help as the probation is done even before the
gstrtpjitterbuffer receives the packets.

Attached, there's a patch that relaxes that probation a bit by adding
a threshold. So, it expects a couple of sets of 2 packets with
consecutive numbers considering a threshold of 2, thus receiving a
packet with sequence number 3 and then a packet with sequence number 5
is considered valid.

I am new to this code, but the patch actually works. I am probably
missing lots of things here. So any help would be appreciated.

Thanks in advance,

Aleix
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gst-plugins-good-0.10.30-rtp-porbation-relax.patch
Type: application/octet-stream
Size: 2408 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120821/99c027d4/attachment.obj>


More information about the gstreamer-devel mailing list