[MPlayer-dev-eng] Re: mplayer UDP port number

Ross Finlayson finlayson at live.com
Sat Mar 6 08:23:16 CET 2004


>I'm a master student and for my thesis I have to manage the QoS of a
>multimedia streamig service. My application reserve an amount of bandwtidth
>for an rtsp session and  needs to know in advance on which port the player
>will receive the flow.
>I'd like to know if it's possible to set the host UDP port number for an
>incoming flow in the command line.  Is there a way to tell mplayer which port
>to use?

You will have to modify MPlayer to add a new command-line argument for 
this.  Once you've done this, though, you can set the desired client port 
number by modifying "libmpdemux/demux_rtp.cpp" as follows:

Just before the line
         if (!subsession->initiate()) {
(currently, line 203 in "libmpdemux/demux_rtp.cpp")
add the following:
         subsession->setClientPortNum(yourDesiredPortNum);
         yourDesiredPortNum += 2;

(The second statement ensures that each subsession (in a RTSP/RTP stream 
that contains multiple (audio+video) subsessions) is given a different port 
number.)

Note also that 'yourDesiredPortNum' must be even (because the next (odd) 
port number is used for RTCP).


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>




More information about the MPlayer-dev-eng mailing list