Changeset e3ae397810727ed58dc03df54170e0f6cb51af84

Show
Ignore:
Timestamp:
08/07/04 01:26:35 (4 years ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1089242795 +0000
git-parent:

[55d256144048009b317a2b00c1cf4f2241fc7633]

git-author:
Laurent Aimar <fenrir@videolan.org> 1089242795 +0000
Message:
  • http: added a mime option.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access_output/http.c

    r4b9f4ff re3ae397  
    5050#define PASS_LONGTEXT N_("Allows you to give a password that will be " \ 
    5151                         "requested to access the stream." ) 
    52  
     52#define MIME_TEXT N_("Mime") 
     53#define MIME_LONGTEXT N_("Allows you to give the mime returned by the server." ) 
    5354 
    5455vlc_module_begin(); 
     
    5758    add_shortcut( "http" ); 
    5859    add_shortcut( "mmsh" ); 
    59     add_string( SOUT_CFG_PREFIX "user", "", NULL, "User", "", VLC_TRUE ); 
    60     add_string( SOUT_CFG_PREFIX "pwd", "", NULL, "Password", "", VLC_TRUE ); 
     60    add_string( SOUT_CFG_PREFIX "user", "", NULL, USER_TEXT, USER_LONGTEXT, VLC_TRUE ); 
     61    add_string( SOUT_CFG_PREFIX "pwd", "", NULL, PASS_TEXT, PASS_LONGTEXT, VLC_TRUE ); 
     62    add_string( SOUT_CFG_PREFIX "mime", "", NULL, MIME_TEXT, MIME_LONGTEXT, VLC_TRUE ); 
    6163    set_callbacks( Open, Close ); 
    6264vlc_module_end(); 
     
    6769 *****************************************************************************/ 
    6870static const char *ppsz_sout_options[] = { 
    69     "user", "pwd", NULL 
     71    "user", "pwd", "mime", NULL 
    7072}; 
    7173 
     
    181183    if( p_access->psz_access && !strcmp( p_access->psz_access, "mmsh" ) ) 
    182184    { 
    183         psz_mime = "video/x-ms-asf-stream"; 
     185        psz_mime = strdup( "video/x-ms-asf-stream" ); 
     186    } 
     187    else 
     188    { 
     189        var_Get( p_access, SOUT_CFG_PREFIX "mime", &val ); 
     190        if( *val.psz_string ) 
     191            psz_mime = val.psz_string; 
     192        else 
     193            free( val.psz_string ); 
    184194    } 
    185195 
    186196    var_Get( p_access, SOUT_CFG_PREFIX "user", &val ); 
    187     if( val.psz_string && *val.psz_string ) 
     197    if( *val.psz_string ) 
    188198        psz_user = val.psz_string; 
    189     else if( val.psz_string ) 
     199    else 
    190200        free( val.psz_string ); 
    191201 
    192202    var_Get( p_access, SOUT_CFG_PREFIX "pwd", &val ); 
    193     if( val.psz_string && *val.psz_string ) 
     203    if( *val.psz_string ) 
    194204        psz_pwd = val.psz_string; 
    195     else if( val.psz_string ) 
     205    else 
    196206        free( val.psz_string ); 
    197207 
     
    201211    if( psz_user ) free( psz_user ); 
    202212    if( psz_pwd ) free( psz_pwd ); 
     213    if( psz_mime ) free( psz_mime ); 
    203214 
    204215    if( p_sys->p_httpd_stream == NULL )