Commit 169ecd7a authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

live555: check for support of GET_PARAMETER

if allowed, launch a timeout keep-a-live thread
parent fe82c45f
...@@ -205,6 +205,8 @@ struct demux_sys_t ...@@ -205,6 +205,8 @@ struct demux_sys_t
int i_no_data_ti; /* consecutive number of TaskInterrupt */ int i_no_data_ti; /* consecutive number of TaskInterrupt */
char event; char event;
bool b_get_param; /* Does the server support GET_PARAMETER */
}; };
static int Demux ( demux_t * ); static int Demux ( demux_t * );
...@@ -284,6 +286,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -284,6 +286,7 @@ static int Open ( vlc_object_t *p_this )
p_sys->b_real = false; p_sys->b_real = false;
p_sys->psz_path = strdup( p_demux->psz_path ); p_sys->psz_path = strdup( p_demux->psz_path );
p_sys->b_force_mcast = var_CreateGetBool( p_demux, "rtsp-mcast" ); p_sys->b_force_mcast = var_CreateGetBool( p_demux, "rtsp-mcast" );
p_sys->b_get_param = false;
/* parse URL for rtsp://[user:[passwd]@]serverip:port/options */ /* parse URL for rtsp://[user:[passwd]@]serverip:port/options */
vlc_UrlParse( &p_sys->url, p_sys->psz_path, 0 ); vlc_UrlParse( &p_sys->url, p_sys->psz_path, 0 );
...@@ -548,6 +551,7 @@ describe: ...@@ -548,6 +551,7 @@ describe:
psz_options = p_sys->rtsp->sendOptionsCmd( psz_url, psz_user, psz_pwd, psz_options = p_sys->rtsp->sendOptionsCmd( psz_url, psz_user, psz_pwd,
&authenticator ); &authenticator );
p_sys->b_get_param = strstr( psz_options, "GET_PARAMETER" ) ? true : false ;
delete [] psz_options; delete [] psz_options;
p_sdp = p_sys->rtsp->describeURL( psz_url, &authenticator, p_sdp = p_sys->rtsp->describeURL( psz_url, &authenticator,
...@@ -1035,10 +1039,8 @@ static int Play( demux_t *p_demux ) ...@@ -1035,10 +1039,8 @@ static int Play( demux_t *p_demux )
if( p_sys->i_timeout <= 0 ) if( p_sys->i_timeout <= 0 )
p_sys->i_timeout = 60; /* default value from RFC2326 */ p_sys->i_timeout = 60; /* default value from RFC2326 */
/* start timeout-thread only on x-asf streams (wms), it has rtcp support but doesn't /* start timeout-thread only if GET_PARAMETER is supported by the server */
* seem to use it for liveness/keep-alive, get_parameter seems to work for it. get_parameter if( !p_sys->p_timeout && p_sys->b_get_param )
* doesn't work with dss 5.5.4 & 5.5.5, they seems to work with rtcp */
if( !p_sys->p_timeout && p_sys->p_out_asf )
{ {
msg_Dbg( p_demux, "We have a timeout of %d seconds", p_sys->i_timeout ); msg_Dbg( p_demux, "We have a timeout of %d seconds", p_sys->i_timeout );
p_sys->p_timeout = (timeout_thread_t *)vlc_object_create( p_demux, sizeof(timeout_thread_t) ); p_sys->p_timeout = (timeout_thread_t *)vlc_object_create( p_demux, sizeof(timeout_thread_t) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment