* modules/access_out/http.c
authorBenjamin Pracht <bigben@videolan.org>
Thu, 31 Jul 2003 19:10:14 +0000 (19:10 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Thu, 31 Jul 2003 19:10:14 +0000 (19:10 +0000)
       - httpd.c has support for Basic Authentification, so use it !
         --sout-http-user user --sout-http-pwd password

modules/access_output/http.c

index bbeb2a0..6b2f972 100644 (file)
@@ -2,7 +2,7 @@
  * http.c
  *****************************************************************************
  * Copyright (C) 2001-2003 VideoLAN
- * $Id: http.c,v 1.3 2003/03/06 11:15:55 fenrir Exp $
+ * $Id: http.c,v 1.4 2003/07/31 19:10:14 bigben Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -55,6 +55,8 @@ vlc_module_begin();
     set_capability( "sout access", 0 );
     add_shortcut( "http" );
     set_callbacks( Open, Close );
+    add_string( "sout-http-user", NULL, NULL, "HTTP Stream Ouput user name", "User name for Basic Authentification on HTTP Stream Output module", VLC_TRUE );
+    add_string( "sout-http-pwd", NULL, NULL, "HTTP Stream Ouput password", "Password for Basic Authentification on HTTP Stream Output module", VLC_TRUE );
 vlc_module_end();
 
 struct sout_access_out_sys_t
@@ -218,7 +220,8 @@ static int Open( vlc_object_t *p_this )
         p_sys->p_httpd->pf_register_stream( p_sys->p_httpd,
                                             psz_file_name,
                                             GetMime( psz_file_name ),
-                                            NULL, NULL );
+                                            config_GetPsz( p_access, "sout-http-user" ), 
+                                            config_GetPsz( p_access, "sout-http-pwd" ) );
 
     if( !p_sys->p_httpd_stream )
     {