After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 545710 - [rtspsrc] : create rtp/rtcp socket pair + same port for different tracks problem
[rtspsrc] : create rtp/rtcp socket pair + same port for different tracks problem
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-31 16:04 UTC by Aurelien Grimaud
Modified: 2008-08-22 16:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
socket pair creation enhancement (4.73 KB, patch)
2008-07-31 16:05 UTC, Aurelien Grimaud
committed Details | Review
dot of problem shooting pipeline (21.06 KB, text/plain)
2008-07-31 16:07 UTC, Aurelien Grimaud
  Details
Log file associated (208.91 KB, text/plain)
2008-07-31 16:08 UTC, Aurelien Grimaud
  Details

Description Aurelien Grimaud 2008-07-31 16:04:48 UTC
Here is a patch to enhance rtp/rtcp socket pair.

Before : the RTP port was always the result of an anonymous bind.
if RTP port + 1 was busy, rtspsrc creation fails.

After : the first RTP port is an anonymous bind.
if not even, try RTP + 1 and whil it fails try RTP + 2
when ok, set RTCP to RTP+1. if it fails, go again with RTP+1

But, There might be a problem. (in fact there is in my application).
udpsrc sets the flag SO_REUSEADDR, so RTP/RTCP ports for tw different RTSP tracks may be the same.
It seems a bit confusing for rtpbin following.
Here is a .dot and .log file to illustrate.
rtsp stream contains audio AMR (pt=97) and video H263 (pt=96)
Both streams goes to same rtpssrcdemux, then different jitterbuffer and rtpdemux.
This could be ok if caps (except pt) whene not the same on both streams

Is this method for allocating RTP pair a mistake ?
Should we set a "no_reuse" property on udpsrc to be use in rtspsrc ?
Comment 1 Aurelien Grimaud 2008-07-31 16:05:54 UTC
Created attachment 115628 [details] [review]
socket pair creation enhancement
Comment 2 Aurelien Grimaud 2008-07-31 16:07:21 UTC
Created attachment 115630 [details]
dot of problem shooting pipeline
Comment 3 Aurelien Grimaud 2008-07-31 16:08:20 UTC
Created attachment 115631 [details]
Log file associated
Comment 4 Wim Taymans 2008-08-05 13:58:08 UTC
        Patch by: Aurelien Grimaud <gstelzz at yahoo dot fr>

        * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_alloc_udp_ports):
        Improve udp port setup. Fixes #545710.