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

Sašo Kiselkov skiselkov at gmail.com
Fri Jan 12 00:33:46 CET 2007


Here's the exact patch.

--
Saso

Jean-Paul Saman wrote:
> Sašo Kiselkov wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: RIPEMD160
>>
>> The only problem which remains is the RTSP session specification - VLC
>> appends ";timeout=5" to it, which confuses the STB - it thinks that this
>> is the whole Session ID and when it replies with the string to VLC, VLC
>> can't find the session. How do I work around that?
> 
> Make an option that don't add the timeout to the rtsp response. Some
> STB's require the timeout option. Or fix the STB ;-)
> 
> Something along these lines. Please, do a manual apply because the patch
> below won't apply at all. It is merely some code to get you on your way
> for producing a proper patch for this.
> 
> --- 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-11 16:49:44.000000000 +0100
> @@ -57,6 +57,13 @@
>  #define THROTLE_LONGTEXT N_( "This limits the maximum number of clients
> " \
>      "that can connect to the RTSP VOD. 0 means no limit."  )
> 
> +#define SESSION_TIMEOUT_TEXT N_( "Add timeout option to session string" )
> +#define SESSION_TIMEOUT__LONGTEXT N_( "Adds timeout option to session
> string. Needed by some STB's." )
> 
>  vlc_module_begin();
>      set_shortname( _("RTSP VoD" ) );
>      set_description( _("RTSP VoD server") );
> @@ -68,6 +75,7 @@
>      add_string ( "rtsp-host", NULL, NULL, HOST_TEXT, HOST_LONGTEXT,
> VLC_TRUE );
>      add_integer( "rtsp-throttle-users", 0, NULL, THROTLE_TEXT,
>                                             THROTLE_LONGTEXT, VLC_TRUE );
> +    add_bool( "rtsp-session-timeout", NULL, NULL,
> SESSION_TIMEOUT__TEXT, SESSION_TIMEOUT_LONGTEXT, VLC_TRUE );
>  vlc_module_end();
> 
> @@ @@ struct sys_thread_t
> 
> + vlc_bool_t b_session_timeout;
> 
> @@ @@ Open( ... )
> 
> + p_sys->b_session_timeout = var_GetBool( p_this, "rtsp-session-timeout" );
> 
> @@ -931,7 +964,7 @@
> 
>      if( psz_session )
>      {
> +     if( 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;
> 
> 
> 
> Gtz,
> Jean-Paul Saman.
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlc-session-timeout.patch
Type: text/x-patch
Size: 1699 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070112/2d386cf7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070112/2d386cf7/attachment.sig>


More information about the vlc-devel mailing list