Changeset 175310ff6066991ee45e2a839f8c53e12b75e6d4

Show
Ignore:
Timestamp:
06/12/08 20:12:21 (3 months ago)
Author:
Rémi Denis-Courmont <rdenis@simphalempin.com>
git-committer:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1213294341 +0300
git-parent:

[64a03d2cb62dbeef8455883b0b5db99a7a777625]

git-author:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1213294341 +0300
Message:

live: add --rtsp-mcast to force multicast

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/live555.cpp

    r64a03d2 r175310f  
    111111                  N_("Client port"), 
    112112                  N_("Port to use for the RTP source of the session"), true ); 
     113        add_bool( "rtsp-mcast", false, NULL, 
     114                  N_("Force multicast RTP via RTSP"), 
     115                  N_("Force multicast RTP via RTSP"), true ); 
    113116        add_bool( "rtsp-http", 0, NULL, 
    114117                  N_("Tunnel RTSP and RTP over HTTP"), 
     
    197200 
    198201    /* */ 
    199     bool       b_multicast;   /* true if one of the tracks is multicasted */ 
    200     bool       b_no_data;     /* true if we never receive any data */ 
     202    bool             b_force_mcast; 
     203    bool             b_multicast;   /* if one of the tracks is multicasted */ 
     204    bool             b_no_data;     /* if we never received any data */ 
    201205    int              i_no_data_ti;  /* consecutive number of TaskInterrupt */ 
    202206 
     
    280284    p_sys->b_real = false; 
    281285    p_sys->psz_path = strdup( p_demux->psz_path ); 
     286    p_sys->b_force_mcast = var_CreateGetBool( p_demux, "rtsp-mcast" ); 
    282287 
    283288    /* parse URL for rtsp://[user:[passwd]@]serverip:port/options */ 
     
    721726            if( p_sys->rtsp ) 
    722727            { 
    723                 if( !( p_sys->rtsp->setupMediaSubsession( *sub, False, 
    724                                                    b_rtsp_tcp ? True : False ) ) ) 
    725                 { 
     728                bool tcp = b_rtsp_tcp; 
     729                bool mcast = p_sys->b_force_mcast; 
     730                if( !p_sys->rtsp->setupMediaSubsession( *sub, False, 
     731                                           tcp ? True : False, 
     732                                           ( mcast && !tcp ) ? True : False ) ) 
     733                { 
     734                    tcp = !tcp; 
    726735                    /* if we get an unsupported transport error, toggle TCP use and try again */ 
    727736                    if( !strstr(p_sys->env->getResultMsg(), "461 Unsupported Transport") 
    728                      || !( p_sys->rtsp->setupMediaSubsession( *sub, False, 
    729                                                    b_rtsp_tcp ? False : True ) ) ) 
     737                     || !p_sys->rtsp->setupMediaSubsession( *sub, False, 
     738                                           tcp ? False : True, 
     739                                           ( mcast && !tcp ) ? True : False ) ) 
    730740                    { 
    731741                        msg_Err( p_demux, "SETUP of'%s/%s' failed %s", sub->mediumName(),