[Live-devel] Setting an upper limit on ports available for RTP use

Matt Schuckmann matt at schuckmannacres.com
Tue Sep 25 16:05:00 PDT 2012


Ross,

As part of upgrading our version of LiveMedia I'm reminded of a 
modification that we put in our code and suggested to you but apparently 
never made it into the code.

We put in a way to set an upper limit on the ports available for 
RTP/RTCP use. We did this for servers that are behind a NAT or firewall 
where only a limited number of ports are forwarded through to the server 
and we didn't want the server to assign ports outside that range.

We simply added a number of ports parameter to RTSPServer and 
OnDemandServerMediaSubsession (where it's really used in 
getStreamParameters()).
Do you think this feature could be added to the code?

FYI in looking at the current code for 
OnDemandServerMediaSubsession::getStreamParameters() the 2 for loops 
that attempt get the next available port could loop indefinitely if no 
ports were available (I know unlikely but possible), implementing an 
upper bound on the port range could prevent this from happening.

Thanks,
Matt S.


More information about the live-devel mailing list