Commit 630d42d5 authored by Gildas Bazin's avatar Gildas Bazin

* modules/access/*: strings review + coding style fixes.

parent 82a67660
......@@ -2,7 +2,7 @@
* cdda.c : CD digital audio input module for vlc
*****************************************************************************
* Copyright (C) 2000, 2003 VideoLAN
* $Id: cdda.c,v 1.11 2003/12/22 02:24:51 sam Exp $
* $Id: cdda.c,v 1.12 2004/01/25 17:31:22 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
......@@ -48,8 +48,11 @@ static void DemuxClose ( vlc_object_t * );
vlc_module_begin();
set_description( _("Audio CD input") );
add_integer( "cdda-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
CACHING_LONGTEXT, VLC_TRUE );
set_capability( "access", 70 );
add_integer( "cdda-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
set_callbacks( AccessOpen, AccessClose );
add_shortcut( "cdda" );
......
......@@ -2,7 +2,7 @@
* dshow.cpp : DirectShow access module for vlc
*****************************************************************************
* Copyright (C) 2002, 2003 VideoLAN
* $Id: dshow.cpp,v 1.24 2003/12/22 17:44:58 gbazin Exp $
* $Id: dshow.cpp,v 1.25 2004/01/25 17:31:22 gbazin Exp $
*
* Author: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -127,7 +127,7 @@ static char *ppsz_adev_text[] = { N_("Default"), N_("None") };
"(eg. I420 (default), RV24, etc.)")
#define CONFIG_TEXT N_("Device properties")
#define CONFIG_LONGTEXT N_( \
"Show the properties dialog of the selected device")
"Show the properties dialog of the selected device.")
static int AccessOpen ( vlc_object_t * );
static void AccessClose( vlc_object_t * );
......@@ -137,7 +137,6 @@ static void DemuxClose ( vlc_object_t * );
vlc_module_begin();
set_description( _("DirectShow input") );
add_category_hint( N_("dshow"), NULL, VLC_TRUE );
add_integer( "dshow-caching", (mtime_t)(0.2*CLOCK_FREQ) / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
......
/*****************************************************************************
* qpsk.c : Satellite input module for vlc
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003-2004 VideoLAN
*
* Authors: Sam Hocevar <sam@zoy.org>
* Jean-Paul Saman <jpsaman@wxs.nl>
......@@ -41,84 +41,97 @@ void E_(Close) ( vlc_object_t * );
*****************************************************************************/
/* Satellite options */
#define ADAPTER_TEXT N_("adapter card to tune")
#define ADAPTER_LONGTEXT N_("adapter cards have a device file in directory named /dev/dvb/adapter[n] with n>=0")
#define ADAPTER_TEXT N_("Adapter card to tune")
#define ADAPTER_LONGTEXT N_("Adapter cards have a device file in directory named /dev/dvb/adapter[n] with n>=0.")
#define DEVICE_TEXT N_("device number to use on adapter")
#define DEVICE_TEXT N_("Device number to use on adapter")
#define DEVICE_LONGTEXT ""
#define FREQ_TEXT N_("satellite default transponder frequency in kHz")
#define FREQ_TEXT N_("Satellite transponder frequency in kHz")
#define FREQ_LONGTEXT ""
#define POL_TEXT N_("satellite default transponder polarization")
#define POL_TEXT N_("Satellite transponder polarization")
#define POL_LONGTEXT ""
#define FEC_TEXT N_("satellite default transponder FEC")
#define FEC_LONGTEXT N_("FEC=Forward Error Correction mode")
#define FEC_TEXT N_("Satellite transponder FEC")
#define FEC_LONGTEXT N_("FEC=Forward Error Correction mode.")
#define SRATE_TEXT N_("satellite default transponder symbol rate in kHz")
#define SRATE_TEXT N_("Satellite transponder symbol rate in kHz")
#define SRATE_LONGTEXT ""
#define DISEQC_TEXT N_("use diseqc with antenna")
#define DISEQC_TEXT N_("Use diseqc with antenna")
#define DISEQC_LONGTEXT ""
#define LNB_LOF1_TEXT N_("antenna lnb_lof1 (kHz)")
#define LNB_LOF1_TEXT N_("Antenna lnb_lof1 (kHz)")
#define LNB_LOF1_LONGTEXT ""
#define LNB_LOF2_TEXT N_("antenna lnb_lof2 (kHz)")
#define LNB_LOF2_TEXT N_("Antenna lnb_lof2 (kHz)")
#define LNB_LOF2_LONGTEXT ""
#define LNB_SLOF_TEXT N_("antenna lnb_slof (kHz)")
#define LNB_SLOF_TEXT N_("Antenna lnb_slof (kHz)")
#define LNB_SLOF_LONGTEXT ""
#define PROBE_TEXT N_("probe the dvb card for capabilities (default disabled)")
#define PROBE_LONGTEXT N_("some dvb cards do not like to be probed for their capabilities")
#define PROBE_TEXT N_("Probe dvb card for capabilities")
#define PROBE_LONGTEXT N_("Some dvb cards do not like to be probed for their capabilities.")
/* Cable */
#define MODULATION_TEXT N_("modulation type")
#define MODULATION_LONGTEXT N_("modulation type for frontend device ")
#define MODULATION_TEXT N_("Modulation type")
#define MODULATION_LONGTEXT N_("Modulation type for frontend device.")
/* Terrestrial */
#define CODE_RATE_HP_TEXT N_("terrestrial high priority stream code rate (FEC)")
#define CODE_RATE_HP_TEXT N_("Terrestrial high priority stream code rate (FEC)")
#define CODE_RATE_HP_LONGTEXT ""
#define CODE_RATE_LP_TEXT N_("terrestrial low priority stream code rate (FEC)")
#define CODE_RATE_LP_TEXT N_("Terrestrial low priority stream code rate (FEC)")
#define CODE_RATE_LP_LONGTEXT ""
#define BANDWIDTH_TEXT N_("terrestrial bandwidth")
#define BANDWIDTH_LONGTEXT N_("terrestrial bandwidth [0=auto,6,7,8 in MHz]")
#define BANDWIDTH_TEXT N_("Terrestrial bandwidth")
#define BANDWIDTH_LONGTEXT N_("Terrestrial bandwidth [0=auto,6,7,8 in MHz]")
#define GUARD_TEXT N_("terrestrial guard interval")
#define GUARD_TEXT N_("Terrestrial guard interval")
#define GUARD_LONGTEXT ""
#define TRANSMISSION_TEXT N_("terrestrial transmission mode")
#define TRANSMISSION_TEXT N_("Terrestrial transmission mode")
#define TRANSMISSION_LONGTEXT ""
#define HIERARCHY_TEXT N_("terrestrial hierarchy mode")
#define HIERARCHY_TEXT N_("Terrestrial hierarchy mode")
#define HIERARCHY_LONGTEXT ""
vlc_module_begin();
set_description( _("DVB input module with v4l2 support") );
set_description( _("DVB input with v4l2 support") );
add_integer( "adapter", 0, NULL, ADAPTER_TEXT, ADAPTER_LONGTEXT,
VLC_FALSE );
add_integer( "device", 0, NULL, DEVICE_TEXT, DEVICE_LONGTEXT, VLC_FALSE );
add_integer( "frequency", 11954000, NULL, FREQ_TEXT, FREQ_LONGTEXT,
VLC_FALSE );
add_integer( "polarization", 0, NULL, POL_TEXT, POL_LONGTEXT, VLC_FALSE );
add_integer( "fec", 3, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_FALSE );
add_integer( "symbol-rate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT,
VLC_FALSE );
add_bool( "diseqc", 0, NULL, DISEQC_TEXT, DISEQC_LONGTEXT, VLC_TRUE );
add_integer( "lnb-lof1", 9750000, NULL, LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT,
VLC_TRUE );
add_integer( "lnb-lof2", 12999000, NULL, LNB_LOF2_TEXT, LNB_LOF2_LONGTEXT,
VLC_TRUE );
add_integer( "lnb-slof", 11700000, NULL, LNB_SLOF_TEXT, LNB_SLOF_LONGTEXT,
VLC_TRUE );
add_bool( "probe", 0, NULL, PROBE_TEXT, PROBE_LONGTEXT, VLC_FALSE );
add_integer( "code-rate-hp", 9, NULL, CODE_RATE_HP_TEXT,
CODE_RATE_HP_LONGTEXT, VLC_TRUE );
add_integer( "code-rate-lp", 9, NULL, CODE_RATE_LP_TEXT,
CODE_RATE_LP_LONGTEXT, VLC_TRUE );
add_integer( "bandwidth", 0, NULL, BANDWIDTH_TEXT, BANDWIDTH_LONGTEXT,
VLC_TRUE );
add_integer( "modulation", 0, NULL, MODULATION_TEXT, MODULATION_LONGTEXT,
VLC_TRUE );
add_integer( "guard", 0, NULL, GUARD_TEXT, GUARD_LONGTEXT, VLC_TRUE );
add_integer( "transmission", 0, NULL, TRANSMISSION_TEXT,
TRANSMISSION_LONGTEXT, VLC_TRUE );
add_integer( "hierarchy", 0, NULL, HIERARCHY_TEXT, HIERARCHY_LONGTEXT,
VLC_TRUE );
set_capability( "access", 0 );
add_category_hint( N_("Input"), NULL, VLC_FALSE );
add_integer( "adapter", 0, NULL, ADAPTER_TEXT, ADAPTER_LONGTEXT, VLC_FALSE );
add_integer( "device", 0, NULL, DEVICE_TEXT, DEVICE_LONGTEXT, VLC_FALSE );
add_integer( "frequency", 11954000, NULL, FREQ_TEXT, FREQ_LONGTEXT, VLC_FALSE );
add_integer( "polarization", 0, NULL, POL_TEXT, POL_LONGTEXT, VLC_FALSE );
add_integer( "fec", 3, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_FALSE );
add_integer( "symbol-rate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT, VLC_FALSE );
add_bool( "diseqc", 0, NULL, DISEQC_TEXT, DISEQC_LONGTEXT, VLC_FALSE );
add_integer( "lnb-lof1", 9750000, NULL, LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT, VLC_FALSE );
add_integer( "lnb-lof2", 12999000, NULL, LNB_LOF2_TEXT, LNB_LOF2_LONGTEXT, VLC_FALSE );
add_integer( "lnb-slof", 11700000, NULL, LNB_SLOF_TEXT, LNB_SLOF_LONGTEXT, VLC_FALSE );
add_bool( "probe", 0, NULL, PROBE_TEXT, PROBE_LONGTEXT, VLC_FALSE );
add_integer( "code-rate-hp", 9, NULL, CODE_RATE_HP_TEXT, CODE_RATE_HP_LONGTEXT, VLC_FALSE );
add_integer( "code-rate-lp", 9, NULL, CODE_RATE_LP_TEXT, CODE_RATE_LP_LONGTEXT, VLC_FALSE );
add_integer( "bandwidth", 0, NULL, BANDWIDTH_TEXT, BANDWIDTH_LONGTEXT, VLC_FALSE );
add_integer( "modulation", 0, NULL, MODULATION_TEXT, MODULATION_LONGTEXT, VLC_FALSE );
add_integer( "guard", 0, NULL, GUARD_TEXT, GUARD_LONGTEXT, VLC_TRUE );
add_integer( "transmission", 0, NULL, TRANSMISSION_TEXT, TRANSMISSION_LONGTEXT, VLC_TRUE );
add_integer( "hierarchy", 0, NULL, HIERARCHY_TEXT, HIERARCHY_LONGTEXT, VLC_TRUE );
add_shortcut( "qpsk" );
add_shortcut( "cable" );
add_shortcut( "terrestrial" );
......@@ -126,4 +139,3 @@ vlc_module_begin();
add_shortcut( "satellite" );
set_callbacks( E_(Open), E_(Close) );
vlc_module_end();
......@@ -2,7 +2,7 @@
* dvd.c : DVD input module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: dvd.c,v 1.9 2003/11/05 00:39:16 gbazin Exp $
* $Id: dvd.c,v 1.10 2004/01/25 17:31:22 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -62,7 +62,7 @@ static void UnprobeLibDVDCSS( void );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define CSSMETHOD_TEXT N_("Method to use by libdvdcss for key decryption")
#define CSSMETHOD_TEXT N_("Method used by libdvdcss for decryption")
#define CSSMETHOD_LONGTEXT N_( \
"Set the method used by libdvdcss for key decryption.\n" \
"title: decrypted title key is guessed from the encrypted sectors of " \
......@@ -98,6 +98,7 @@ vlc_module_begin();
set_description( _("DVD input (uses libdvdcss)") );
i = 100;
#endif
add_shortcut( "dvdold" );
add_shortcut( "dvdsimple" );
set_capability( "access", i );
......
......@@ -2,7 +2,7 @@
* file.c: file input (file: access plug-in)
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: file.c,v 1.21 2003/06/09 09:29:12 massiot Exp $
* $Id: file.c,v 1.22 2004/01/25 17:31:22 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -76,7 +76,6 @@ static ssize_t Read ( input_thread_t *, byte_t *, size_t );
vlc_module_begin();
set_description( _("Standard filesystem file input") );
add_category_hint( N_("file"), NULL, VLC_TRUE );
add_integer( "file-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
set_capability( "access", 50 );
add_shortcut( "file" );
......
/*****************************************************************************
* ftp.c:
* ftp.c: FTP input module
*****************************************************************************
* Copyright (C) 2001-2004 VideoLAN
* $Id: ftp.c,v 1.24 2004/01/08 00:37:18 fenrir Exp $
* $Id: ftp.c,v 1.25 2004/01/25 17:31:22 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -41,16 +41,27 @@ static void Close ( vlc_object_t * );
#define CACHING_LONGTEXT N_( \
"Allows you to modify the default caching value for ftp streams. This " \
"value should be set in millisecond units." )
#define USER_TEXT N_("FTP user name")
#define USER_LONGTEXT N_("Allows you to modify the user name that will " \
"be used for the connection.")
#define PASS_TEXT N_("FTP password")
#define PASS_LONGTEXT N_("Allows you to modify the password that will be " \
"used for the connection.")
#define ACCOUNT_TEXT N_("FTP account")
#define ACCOUNT_LONGTEXT N_("Allows you to modify the account that will be " \
"used for the connection.")
vlc_module_begin();
set_description( _("FTP input") );
set_capability( "access", 0 );
add_category_hint( "stream", NULL, VLC_FALSE );
add_integer( "ftp-caching", 2 * DEFAULT_PTS_DELAY / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_string( "ftp-user", "anonymous", NULL, "ftp user name", "ftp user name", VLC_FALSE );
add_string( "ftp-pwd", "anonymous@dummy.org", NULL, "ftp password", "ftp password, be careful with that option...", VLC_FALSE );
add_string( "ftp-account", "anonymous", NULL, "ftp account", "ftp account", VLC_FALSE );
add_integer( "ftp-caching", 2 * DEFAULT_PTS_DELAY / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_string( "ftp-user", "anonymous", NULL, USER_TEXT, USER_LONGTEXT,
VLC_FALSE );
add_string( "ftp-pwd", "anonymous@dummy.org", NULL, PASS_TEXT,
PASS_LONGTEXT, VLC_FALSE );
add_string( "ftp-account", "anonymous", NULL, ACCOUNT_TEXT,
ACCOUNT_LONGTEXT, VLC_FALSE );
add_shortcut( "ftp" );
set_callbacks( Open, Close );
vlc_module_end();
......@@ -115,7 +126,8 @@ static int Open( vlc_object_t *p_this )
/* *** Open a TCP connection with server *** */
msg_Dbg( p_input, "waiting for connection..." );
p_sys->fd_cmd = net_OpenTCP( p_input, p_sys->url.psz_host, p_sys->url.i_port );
p_sys->fd_cmd = net_OpenTCP( p_input, p_sys->url.psz_host,
p_sys->url.i_port );
if( p_sys->fd_cmd < 0 )
{
msg_Err( p_input, "failed to connect with server" );
......@@ -172,9 +184,11 @@ static int Open( vlc_object_t *p_this )
break;
case 3:
msg_Dbg( p_input, "account needed" );
var_Create( p_input, "ftp-account", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
var_Create( p_input, "ftp-account",
VLC_VAR_STRING | VLC_VAR_DOINHERIT );
var_Get( p_input, "ftp-account", &val );
if( ftp_SendCommand( p_input, "ACCT %s", val.psz_string ) < 0 ||
if( ftp_SendCommand( p_input, "ACCT %s",
val.psz_string ) < 0 ||
ftp_ReadCommand( p_input, &i_answer, NULL ) < 0 )
{
if( val.psz_string ) free( val.psz_string );
......@@ -308,8 +322,8 @@ static void Seek( input_thread_t * p_input, off_t i_pos )
/*****************************************************************************
* Read:
*****************************************************************************/
static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len )
static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len )
{
access_sys_t *p_sys = p_input->p_access_data;
......@@ -319,7 +333,7 @@ static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
/*****************************************************************************
* ftp_*:
*****************************************************************************/
static int ftp_SendCommand( input_thread_t *p_input, char *psz_fmt, ... )
static int ftp_SendCommand( input_thread_t *p_input, char *psz_fmt, ... )
{
access_sys_t *p_sys = p_input->p_access_data;
va_list args;
......@@ -331,7 +345,8 @@ static int ftp_SendCommand( input_thread_t *p_input, char *psz_fmt, ... )
va_end( args );
msg_Dbg( p_input, "ftp_SendCommand:\"%s\"", psz_cmd);
if( ( i_ret = net_Printf( VLC_OBJECT(p_input), p_sys->fd_cmd, "%s", psz_cmd ) ) > 0 )
if( ( i_ret = net_Printf( VLC_OBJECT(p_input), p_sys->fd_cmd,
"%s", psz_cmd ) ) > 0 )
{
i_ret = net_Printf( VLC_OBJECT(p_input), p_sys->fd_cmd, "\n" );
}
......@@ -359,8 +374,8 @@ static int ftp_SendCommand( input_thread_t *p_input, char *psz_fmt, ... )
These strings are not part of the requests, except in the case \377\377,
where the request contains one \377. */
static int ftp_ReadCommand( input_thread_t *p_input,
int *pi_answer, char **ppsz_answer )
static int ftp_ReadCommand( input_thread_t *p_input,
int *pi_answer, char **ppsz_answer )
{
access_sys_t *p_sys = p_input->p_access_data;
char *psz_line;
......@@ -391,7 +406,7 @@ static int ftp_ReadCommand( input_thread_t *p_input,
return( i_answer / 100 );
}
static int ftp_StartStream( input_thread_t *p_input, off_t i_start )
static int ftp_StartStream( input_thread_t *p_input, off_t i_start )
{
access_sys_t *p_sys = p_input->p_access_data;
......@@ -410,7 +425,9 @@ static int ftp_StartStream( input_thread_t *p_input, off_t i_start )
}
psz_parser = strchr( psz_arg, '(' );
if( !psz_parser || sscanf( psz_parser, "(%d,%d,%d,%d,%d,%d", &a1, &a2, &a3, &a4, &p1, &p2 ) < 6 )
if( !psz_parser ||
sscanf( psz_parser, "(%d,%d,%d,%d,%d,%d", &a1, &a2, &a3,
&a4, &p1, &p2 ) < 6 )
{
free( psz_arg );
msg_Err( p_input, "cannot get ip/port for passive transfert mode" );
......@@ -459,7 +476,7 @@ static int ftp_StartStream( input_thread_t *p_input, off_t i_start )
return VLC_SUCCESS;
}
static int ftp_StopStream ( input_thread_t *p_input)
static int ftp_StopStream ( input_thread_t *p_input)
{
access_sys_t *p_sys = p_input->p_access_data;
......@@ -477,4 +494,3 @@ static int ftp_StopStream ( input_thread_t *p_input)
return VLC_SUCCESS;
}
/*****************************************************************************
* http.c: HTTP access plug-in
* http.c: HTTP input module
*****************************************************************************
* Copyright (C) 2001-2004 VideoLAN
* $Id: http.c,v 1.56 2004/01/15 13:45:27 fenrir Exp $
* $Id: http.c,v 1.57 2004/01/25 17:31:22 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -39,9 +39,9 @@
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
#define PROXY_TEXT N_("Specify an HTTP proxy")
#define PROXY_TEXT N_("HTTP proxy")
#define PROXY_LONGTEXT N_( \
"Specify an HTTP proxy to use. It must be in the form " \
"You can specify an HTTP proxy to use. It must be of the form " \
"http://myproxy.mydomain:myport/. If none is specified, the HTTP_PROXY " \
"environment variable will be tried." )
......@@ -50,15 +50,31 @@ static void Close( vlc_object_t * );
"Allows you to modify the default caching value for http streams. This " \
"value should be set in millisecond units." )
#define USER_TEXT N_("HTTP user name")
#define USER_LONGTEXT N_("Allows you to modify the user name that will " \
"be used for the connection (Basic authentification only).")
#define PASS_TEXT N_("HTTP password")
#define PASS_LONGTEXT N_("Allows you to modify the password that will be " \
"used for the connection.")
#define AGENT_TEXT N_("HTTP user agent")
#define AGENT_LONGTEXT N_("Allows you to modify the user agent that will be " \
"used for the connection.")
vlc_module_begin();
set_description( _("HTTP input") );
set_capability( "access", 0 );
add_category_hint( N_("http"), NULL, VLC_FALSE );
add_string( "http-proxy", NULL, NULL, PROXY_TEXT, PROXY_LONGTEXT, VLC_FALSE );
add_integer( "http-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_string( "http-user", NULL, NULL, "HTTP user name", "HTTP user name for Basic Authentification", VLC_FALSE );
add_string( "http-pwd", NULL , NULL, "HTTP password", "HTTP password for Basic Authentification", VLC_FALSE );
add_string( "http-user-agent", COPYRIGHT_MESSAGE , NULL, "HTTP user agent", "HTTP user agent", VLC_FALSE );
add_string( "http-proxy", NULL, NULL, PROXY_TEXT, PROXY_LONGTEXT,
VLC_FALSE );
add_integer( "http-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_string( "http-user", NULL, NULL, USER_TEXT, USER_LONGTEXT, VLC_FALSE );
add_string( "http-pwd", NULL , NULL, PASS_TEXT, PASS_LONGTEXT, VLC_FALSE );
add_string( "http-user-agent", COPYRIGHT_MESSAGE , NULL, AGENT_TEXT,
AGENT_LONGTEXT, VLC_FALSE );
add_shortcut( "http" );
add_shortcut( "http4" );
add_shortcut( "http6" );
......@@ -212,24 +228,29 @@ static int Open ( vlc_object_t *p_this )
}
}
msg_Dbg( p_input, "http: server='%s' port=%d file='%s", p_sys->url.psz_host, p_sys->url.i_port, p_sys->url.psz_path );
msg_Dbg( p_input, "http: server='%s' port=%d file='%s",
p_sys->url.psz_host, p_sys->url.i_port, p_sys->url.psz_path );
if( p_sys->b_proxy )
{
msg_Dbg( p_input, " proxy %s:%d", p_sys->proxy.psz_host, p_sys->proxy.i_port );
msg_Dbg( p_input, " proxy %s:%d", p_sys->proxy.psz_host,
p_sys->proxy.i_port );
}
if( p_sys->psz_user && *p_sys->psz_user )
{
msg_Dbg( p_input, " user='%s', pwd='%s'", p_sys->psz_user, p_sys->psz_passwd );
msg_Dbg( p_input, " user='%s', pwd='%s'",
p_sys->psz_user, p_sys->psz_passwd );
}
/* Connect */
if( Connect( p_input, &p_input->stream.b_seekable, &p_input->stream.p_selected_area->i_size, 0 ) )
if( Connect( p_input, &p_input->stream.b_seekable,
&p_input->stream.p_selected_area->i_size, 0 ) )
{
/* Retry with http 1.0 */
p_sys->i_version = 0;
if( p_input->b_die ||
Connect( p_input, &p_input->stream.b_seekable, &p_input->stream.p_selected_area->i_size, 0 ) )
Connect( p_input, &p_input->stream.b_seekable,
&p_input->stream.p_selected_area->i_size, 0 ) )
{
goto error;
}
......@@ -281,7 +302,8 @@ static int Open ( vlc_object_t *p_this )
{
p_input->psz_demux = strdup( "mp3" );
}
msg_Info( p_input, "ICY server found, %s demuxer selected", p_input->psz_demux );
msg_Info( p_input, "ICY server found, %s demuxer selected",
p_input->psz_demux );
}
/* Update default_pts to a suitable value for http access */
......@@ -345,7 +367,8 @@ static void Seek( input_thread_t * p_input, off_t i_pos )
net_Close( p_sys->fd ); p_sys->fd = -1;
if( Connect( p_input, &p_input->stream.b_seekable, &p_input->stream.p_selected_area->i_size, i_pos ) )
if( Connect( p_input, &p_input->stream.b_seekable,
&p_input->stream.p_selected_area->i_size, i_pos ) )
{
msg_Err( p_input, "seek failed" );
}
......@@ -435,7 +458,8 @@ static void ParseURL( access_sys_t *p_sys, char *psz_url )
/*****************************************************************************
* Connect:
*****************************************************************************/
static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_size, off_t i_tell )
static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable,
off_t *pi_size, off_t i_tell )
{
access_sys_t *p_sys = p_input->p_access_data;
vlc_url_t srv = p_sys->b_proxy ? p_sys->proxy : p_sys->url;
......@@ -463,8 +487,8 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
{
net_Printf( VLC_OBJECT(p_input), p_sys->fd,
"GET http://%s:%d/%s HTTP/1.%d\r\n",
p_sys->url.psz_host, p_sys->url.i_port, p_sys->url.psz_path,
p_sys->i_version );
p_sys->url.psz_host, p_sys->url.i_port,
p_sys->url.psz_path, p_sys->i_version );
}
else
{
......@@ -474,12 +498,12 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
psz_path = "/";
}
net_Printf( VLC_OBJECT(p_input), p_sys->fd,
"GET %s HTTP/1.%d\r\n"
"Host: %s\r\n",
"GET %s HTTP/1.%d\r\nHost: %s\r\n",
psz_path, p_sys->i_version, p_sys->url.psz_host );
}
/* User Agent */
net_Printf( VLC_OBJECT(p_input), p_sys->fd, "User-Agent: %s\r\n", p_sys->psz_user_agent );
net_Printf( VLC_OBJECT(p_input), p_sys->fd, "User-Agent: %s\r\n",
p_sys->psz_user_agent );
/* Offset */
if( p_sys->i_version == 1 )
{
......@@ -497,14 +521,15 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
b64 = b64_encode( buf );
net_Printf( VLC_OBJECT(p_input), p_sys->fd, "Authorization: Basic %s", b64 );
net_Printf( VLC_OBJECT(p_input), p_sys->fd,
"Authorization: Basic %s", b64 );
free( b64 );
}
net_Printf( VLC_OBJECT(p_input), p_sys->fd, "Connection: Close\r\n" );
if( net_Printf( VLC_OBJECT(p_input), p_sys->fd, "\r\n" ) < 0 )
{
msg_Err( p_input, "Failed to send request\n" );
msg_Err( p_input, "failed to send request" );
net_Close( p_sys->fd ); p_sys->fd = -1;
return VLC_EGENERIC;
}
......@@ -516,7 +541,7 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
/* Read Answer */
if( ( psz = net_Gets( VLC_OBJECT(p_input), p_sys->fd ) ) == NULL )
{
msg_Err( p_input, "Failed to read answer\n" );
msg_Err( p_input, "failed to read answer" );
goto error;
}
if( !strncmp( psz, "HTTP/1.", 7 ) )
......@@ -535,7 +560,8 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
free( psz );
goto error;
}
msg_Dbg( p_input, "Protocol '%s' answer code %d", p_sys->psz_protocol, p_sys->i_code );
msg_Dbg( p_input, "protocol '%s' answer code %d",
p_sys->psz_protocol, p_sys->i_code );
if( !strcmp( p_sys->psz_protocol, "ICY" ) )
{
*pb_seekable = VLC_FALSE;
......@@ -559,7 +585,7 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
if( psz == NULL )
{
msg_Err( p_input, "Failed to read answer\n" );
msg_Err( p_input, "failed to read answer" );
goto error;
}
......
/*****************************************************************************
* mms.c: MMS over tcp, udp and http access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mms.c,v 1.35 2004/01/21 16:56:16 fenrir Exp $
* Copyright (C) 2002-2004 VideoLAN
* $Id: mms.c,v 1.36 2004/01/25 17:31:22 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -59,19 +59,23 @@ static void Close ( vlc_object_t * );
"Allows you to modify the default caching value for mms streams. This " \
"value should be set in miliseconds units." )
#define ALL_TEXT N_("Force selection of all streams")
#define BITRATE_TEXT N_("Selct maximum bitrate stream")
#define BITRATE_LONGTEXT N_( \
"Always select the stream with the maximum bitrate." )
vlc_module_begin();
set_description( _("Microsoft Media Server (MMS) input") );
set_capability( "access", 0 );
add_category_hint( "stream", NULL, VLC_TRUE );
add_integer( "mms-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_bool( "mms-all", 0, NULL,
"force selection of all streams",
"force selection of all streams", VLC_TRUE );
add_integer( "mms-maxbitrate", 0, NULL,
"max bitrate",
"set max bitrate for auto streams selections", VLC_FALSE );
add_integer( "mms-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_bool( "mms-all", 0, NULL, ALL_TEXT, "", VLC_TRUE );
add_integer( "mms-maxbitrate", 0, NULL, BITRATE_TEXT, BITRATE_LONGTEXT ,
VLC_FALSE );
add_shortcut( "mms" );
add_shortcut( "mmsu" );
add_shortcut( "mmst" );
......@@ -79,7 +83,9 @@ vlc_module_begin();
set_callbacks( Open, Close );
vlc_module_end();
/*****************************************************************************
* Open:
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
input_thread_t *p_input = (input_thread_t*)p_this;
......
......@@ -2,7 +2,7 @@
* pvr.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: pvr.c,v 1.10 2003/11/23 18:31:54 alexis Exp $
* $Id: pvr.c,v 1.11 2004/01/25 17:31:22 gbazin Exp $
*
* Authors: Eric Petit <titer@videolan.org>
*
......@@ -74,7 +74,7 @@ static ssize_t Read ( input_thread_t *, byte_t *, size_t );
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("input for encoding cards supported by the ivtv drivers") );
set_description( _("MPEG Encoding cards input (with ivtv drivers)") );
set_capability( "access", 0 );
add_shortcut( "pvr" );
set_callbacks( Open, Close );
......
......@@ -69,26 +69,23 @@ void E_(Close) ( vlc_object_t * );
#define LNB_SLOF_LONGTEXT ""
vlc_module_begin();
add_category_hint( N_("Input"), NULL, VLC_FALSE );
add_integer( "dvb-dmx", 0, NULL, DEMUX_TEXT, DEMUX_LONGTEXT,
VLC_FALSE );
add_integer( "dvb-tuner", 0, NULL, TUNER_TEXT, TUNER_LONGTEXT,
VLC_FALSE );
add_integer( "frequency", 0, NULL, FREQ_TEXT, FREQ_LONGTEXT,
VLC_FALSE );
add_integer( "polarization", 0, NULL, POL_TEXT, POL_LONGTEXT,
VLC_FALSE );
add_integer( "fec", 3, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_FALSE );
add_integer( "symbol-rate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT,
VLC_FALSE );
add_bool( "diseqc", 0, NULL, DISEQC_TEXT, DISEQC_LONGTEXT, VLC_FALSE );
add_integer( "lnb-lof1", 10000000, NULL,
LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT, VLC_FALSE );
add_integer( "lnb-lof2", 10000000, NULL,
LNB_LOF2_TEXT, LNB_LOF2_LONGTEXT, VLC_FALSE );
add_integer( "lnb-slof", 11700000, NULL,
LNB_SLOF_TEXT, LNB_SLOF_LONGTEXT, VLC_FALSE );
set_description( _("satellite input") );
set_description( _("Satellite input") );
add_integer( "dvb-dmx", 0, NULL, DEMUX_TEXT, DEMUX_LONGTEXT, VLC_FALSE );
add_integer( "dvb-tuner", 0, NULL, TUNER_TEXT, TUNER_LONGTEXT, VLC_FALSE );
add_integer( "frequency", 0, NULL, FREQ_TEXT, FREQ_LONGTEXT, VLC_FALSE );
add_integer( "polarization", 0, NULL, POL_TEXT, POL_LONGTEXT, VLC_FALSE );
add_integer( "fec", 3, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_FALSE );
add_integer( "symbol-rate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT,
VLC_FALSE );
add_bool( "diseqc", 0, NULL, DISEQC_TEXT, DISEQC_LONGTEXT, VLC_TRUE );
add_integer( "lnb-lof1", 10000000, NULL,
LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT, VLC_TRUE );
add_integer( "lnb-lof2", 10000000, NULL,
LNB_LOF2_TEXT, LNB_LOF2_LONGTEXT, VLC_TRUE );
add_integer( "lnb-slof", 11700000, NULL,
LNB_SLOF_TEXT, LNB_SLOF_LONGTEXT, VLC_TRUE );
set_capability( "access", 0 );
add_shortcut( "sat" );
set_callbacks( E_(Open), E_(Close) );
......
/*****************************************************************************
* slp.c: SLP access plugin
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: slp.c,v 1.19 2004/01/17 12:28:56 gbazin Exp $
* Copyright (C) 2002-2004 VideoLAN
* $Id: slp.c,v 1.20 2004/01/25 17:31:22 gbazin Exp $
*
* Authors: Loc Minier <lool@videolan.org>
*
......@@ -38,7 +38,7 @@
*****************************************************************************/
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
static ssize_t Read ( input_thread_t *, byte_t *, size_t );
static ssize_t Read( input_thread_t *, byte_t *, size_t );
static int Init ( vlc_object_t * );
static void End ( vlc_object_t * );
......@@ -50,42 +50,51 @@ int i_group;
* Module descriptor
*****************************************************************************/
#define SRVTYPE_TEXT "SLP service type"
#define SRVTYPE_LONGTEXT "The service type string for SLP queries, " \
"including the authority string (if any) for the " \
"request. May not be empty"
#define ATTRIDS_TEXT "SLP attribute identifiers"
#define ATTRIDS_LONGTEXT "This string is a comma separated list of " \
"attribute identifiers to search for a playlist "\
"title or empty to use all attributes"
#define SCOPELIST_TEXT "SLP scopes list"
#define SCOPELIST_LONGTEXT "This string is a comma separated list of scope " \
"names or empty if you want to use the default " \
"scopes; it is used in all SLP queries"
#define NAMINGAUTHORITY_TEXT "SLP naming authority"
#define NAMINGAUTHORITY_LONGTEXT "This string is a list of naming " \
"authorities to search. Use \"*\" for all " \
"and the empty string for the default of " \
"IANA"