Changeset e3ae397810727ed58dc03df54170e0f6cb51af84
- 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
| r4b9f4ff |
re3ae397 |
|
| 50 | 50 | #define PASS_LONGTEXT N_("Allows you to give a password that will be " \ |
|---|
| 51 | 51 | "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." ) |
|---|
| 53 | 54 | |
|---|
| 54 | 55 | vlc_module_begin(); |
|---|
| … | … | |
| 57 | 58 | add_shortcut( "http" ); |
|---|
| 58 | 59 | 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 ); |
|---|
| 61 | 63 | set_callbacks( Open, Close ); |
|---|
| 62 | 64 | vlc_module_end(); |
|---|
| … | … | |
| 67 | 69 | *****************************************************************************/ |
|---|
| 68 | 70 | static const char *ppsz_sout_options[] = { |
|---|
| 69 | | "user", "pwd", NULL |
|---|
| | 71 | "user", "pwd", "mime", NULL |
|---|
| 70 | 72 | }; |
|---|
| 71 | 73 | |
|---|
| … | … | |
| 181 | 183 | if( p_access->psz_access && !strcmp( p_access->psz_access, "mmsh" ) ) |
|---|
| 182 | 184 | { |
|---|
| 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 ); |
|---|
| 184 | 194 | } |
|---|
| 185 | 195 | |
|---|
| 186 | 196 | var_Get( p_access, SOUT_CFG_PREFIX "user", &val ); |
|---|
| 187 | | if( val.psz_string && *val.psz_string ) |
|---|
| | 197 | if( *val.psz_string ) |
|---|
| 188 | 198 | psz_user = val.psz_string; |
|---|
| 189 | | else if( val.psz_string ) |
|---|
| | 199 | else |
|---|
| 190 | 200 | free( val.psz_string ); |
|---|
| 191 | 201 | |
|---|
| 192 | 202 | var_Get( p_access, SOUT_CFG_PREFIX "pwd", &val ); |
|---|
| 193 | | if( val.psz_string && *val.psz_string ) |
|---|
| | 203 | if( *val.psz_string ) |
|---|
| 194 | 204 | psz_pwd = val.psz_string; |
|---|
| 195 | | else if( val.psz_string ) |
|---|
| | 205 | else |
|---|
| 196 | 206 | free( val.psz_string ); |
|---|
| 197 | 207 | |
|---|
| … | … | |
| 201 | 211 | if( psz_user ) free( psz_user ); |
|---|
| 202 | 212 | if( psz_pwd ) free( psz_pwd ); |
|---|
| | 213 | if( psz_mime ) free( psz_mime ); |
|---|
| 203 | 214 | |
|---|
| 204 | 215 | if( p_sys->p_httpd_stream == NULL ) |
|---|