[vlc-devel] Re: Fix to make VoD work with HansunTech STBs

Jean-Paul Saman jean-paul.saman at planet.nl
Fri Jan 12 10:22:02 CET 2007


Sašo Kiselkov wrote:
> Here's the exact patch.
> 
> --
> Saso

Thanks for the patch. I have one more request ;-) could you make the 
timeout value configurable. By making the rtsp-session-timeout accept a 
value instead of being a boolean.

0 would mean disabled
1  and greater would set the timeout in seconds

and let the helptext reflect this.

Thanks,
Jean-Paul Saman.
> ------------------------------------------------------------------------
> 
> --- vlc-0.8.6-old/modules/misc/rtsp.c	2006-12-09 02:12:16.000000000 +0100
> +++ vlc-0.8.6/modules/misc/rtsp.c	2007-01-12 00:31:22.000000000 +0100
> @@ -58,4 +58,10 @@
>      "that can connect to the RTSP VOD. 0 means no limit."  )
>  
> +#define SESSION_TIMEOUT_TEXT N_( "Add a timeout option to the RTSP session " \
> +    "ID string" )
> +#define SESSION_TIMEOUT_LONGTEXT N_( "Adds a timeout option to RTSP session " \
> +    "ID string. Needed by some STBs and confuses some other STBs (such as " \
> +    "those made by HansunTech)." ) 
> +
>  vlc_module_begin();
>      set_shortname( _("RTSP VoD" ) );
> @@ -69,4 +75,6 @@
>      add_integer( "rtsp-throttle-users", 0, NULL, THROTLE_TEXT,
>                                             THROTLE_LONGTEXT, VLC_TRUE );
> +    add_bool( "rtsp-session-timeout", VLC_TRUE, NULL, SESSION_TIMEOUT_TEXT,
> +              SESSION_TIMEOUT_LONGTEXT, VLC_TRUE );
>  vlc_module_end();
>  
> @@ -167,4 +175,6 @@
>      int i_connections;
>  
> +    vlc_bool_t b_session_timeout;
> +
>      /* List of media */
>      int i_media;
> @@ -221,4 +231,6 @@
>      p_sys->p_rtsp_host = 0;
>  
> +    p_sys->b_session_timeout = var_GetBool( p_this, "rtsp-session-timeout" );
> +
>      var_Create( p_this, "rtsp-throttle-users", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
>      p_sys->i_throttle_users = var_GetInteger( p_this, "rtsp-throtle-users" );
> @@ -932,6 +944,9 @@
>      if( psz_session )
>      {
> -        httpd_MsgAdd( answer, "Session", "%s;timeout=5", psz_session );
> -    }
> +         if( p_media->p_vod->p_sys->b_session_timeout )
> +             httpd_MsgAdd( answer, "Session", "%s;timeout=5", psz_session );
> +         else
> +              httpd_MsgAdd( answer, "Session", "%s", psz_session );
> +    } 
>  
>      return VLC_SUCCESS;

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list