[gst-devel] Problem about rtp and rtcp ports allocation
Demon Deng
dxssx.dxssx at gmail.com
Mon Feb 22 04:56:47 CET 2010
rtspsrc and rtsp-server allocate two udp ports for rtp, the even for rtp,
the odd for rtcp.
The allocation in gstreamer works well for only one stream, but fails for
more than two streams when the first auto allocated port is odd.
We assume the first auto allocated port is 5001.
For the first stream, we will try 5002 and get 5002/5003 for rtp/rtcp
successfully.
For the second stream, we get auto allocated port 5001 again!!
Then we will try 5002 for rtp again.
Finally, we get 5002/5003 for rtp/rtcp of the second stream successfully
again, which are the same as the fisrt stream.
This will make rtp not working.
We can allocate the same ports for both stream, because the udpsrc using
SO_REUSEADDR.
Is there any good reason for using SO_REUSEADDR in udpsrc?
We can avoid the problem by setting SO_REUSEADDR to 0.
Or.. is there any other way to solve this problem?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100222/cb9dcc7c/attachment.htm>
More information about the gstreamer-devel
mailing list