[vlc-devel] --rtp-client-port when playing an SDP file

David R. Robison davidro at q-free.com
Tue Jun 30 15:25:05 CEST 2015


I understand and I would if I could. However, because we are embedding 
the player in our software we need to reuse the players as much as 
possible to avoid issues with resource allocation (we are embedding VLC 
in a Java application). Unfortunately I can only set the client port 
when the medial player is created not when the media file is played. 
Once the client port is set and the media player created then it cannot 
be used with SDP sources. That being said, I think I understand what is 
happening.

In the live555.cpp source in the SessionsSetup( demux_t *p_demux ) 
function, the code sends a setup command if we are using RTSP:

             /* Issue the SETUP */
             if( p_sys->rtsp )
             {
                 p_sys->rtsp->sendSetupCommand( *sub, 
default_live555_callback, False,
                                                toBool( b_rtsp_tcp ),
                                                toBool( 
p_sys->b_force_mcast && !b_rtsp_tcp ) );
                 if( !wait_Live555_response( p_demux ) )

However, the client port is set before this code and after the SDP is 
parsed:

         if( i_client_port != -1 )
         {
             sub->setClientPortNum( i_client_port );
             i_client_port += 2;
         }

It seems to me that the setting of the client port should only be done 
if we intend to send a RTSP SETUP command (inside the conditional). 
Otherwise we should accept what was parsed from the SDP. Does this sound 
correct? If so, I will go ahead and test a patch to do just this.

Thoughts? David


----------------------------------------------------------------------------

*David R Robison*

/Principal Systems Engineer/

O. +1 757 546 3401

M. +1 757 286 0022

david.robison at q-free.com <mailto:david.robison at q-free.com>

www.q-free.com/openroads

----------------------------------------------------------------------------

Q-Free Open Roads

103 Watson Road

Chesapeake VA 23320

On 6/30/2015 9:14 AM, Ross Finlayson wrote:
>>  I have made repeated tests and have verified that if I set a client 
>> port on the command line then I cannot play a SDP file that is 
>> defining multicast streaming from the camera.
>
> Patient: “Doctor, it hurts when I do this.”
> Doctor: “Then, don’t do it!”
>
> If you’re asking to play a multicast stream, then you’re asking to 
> join a stream that has a given IP multicast address *and port number* 
> (both of which are specified in the SDP description).  It makes no 
> sense to try to change your port number to be something else.  So, 
> don’t do that!
>
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150630/5fda6e10/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: orci-qfree.png
Type: image/png
Size: 4603 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150630/5fda6e10/attachment.png>


More information about the vlc-devel mailing list