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

Sašo Kiselkov skiselkov at gmail.com
Fri Jan 12 10:55:35 CET 2007


Thanks for the notes, that's a good idea.

One more problem I've found (and already integrated into the patch) is
that when muxing is enabled, then VLC doesn't read the remote port info
properly - when it starts streaming it sends it all to port 0, since the
i_port variable in the PLAY request isn't set up properly. I've added
code into SETUP which intercepts the port supplied by the client and
stores it in the vod_sys_t structure.

--
Saso

Jean-Paul Saman wrote:
> 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;
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlc-session-timeout-and-mux-port.patch
Type: text/x-patch
Size: 2505 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070112/d529d72e/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/d529d72e/attachment.sig>


More information about the vlc-devel mailing list