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

* modules/access/*: strings review + coding style fixes.
parent 82a67660
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cdda.c : CD digital audio input module for vlc * cdda.c : CD digital audio input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2003 VideoLAN * 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> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -48,8 +48,11 @@ static void DemuxClose ( vlc_object_t * ); ...@@ -48,8 +48,11 @@ static void DemuxClose ( vlc_object_t * );
vlc_module_begin(); vlc_module_begin();
set_description( _("Audio CD input") ); set_description( _("Audio CD input") );
add_integer( "cdda-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
CACHING_LONGTEXT, VLC_TRUE );
set_capability( "access", 70 ); set_capability( "access", 70 );
add_integer( "cdda-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
set_callbacks( AccessOpen, AccessClose ); set_callbacks( AccessOpen, AccessClose );
add_shortcut( "cdda" ); add_shortcut( "cdda" );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dshow.cpp : DirectShow access module for vlc * dshow.cpp : DirectShow access module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002, 2003 VideoLAN * 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> * Author: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -127,7 +127,7 @@ static char *ppsz_adev_text[] = { N_("Default"), N_("None") }; ...@@ -127,7 +127,7 @@ static char *ppsz_adev_text[] = { N_("Default"), N_("None") };
"(eg. I420 (default), RV24, etc.)") "(eg. I420 (default), RV24, etc.)")
#define CONFIG_TEXT N_("Device properties") #define CONFIG_TEXT N_("Device properties")
#define CONFIG_LONGTEXT N_( \ #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 int AccessOpen ( vlc_object_t * );
static void AccessClose( vlc_object_t * ); static void AccessClose( vlc_object_t * );
...@@ -137,7 +137,6 @@ static void DemuxClose ( vlc_object_t * ); ...@@ -137,7 +137,6 @@ static void DemuxClose ( vlc_object_t * );
vlc_module_begin(); vlc_module_begin();
set_description( _("DirectShow input") ); set_description( _("DirectShow input") );
add_category_hint( N_("dshow"), NULL, VLC_TRUE );
add_integer( "dshow-caching", (mtime_t)(0.2*CLOCK_FREQ) / 1000, NULL, add_integer( "dshow-caching", (mtime_t)(0.2*CLOCK_FREQ) / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE ); CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
......
/***************************************************************************** /*****************************************************************************
* qpsk.c : Satellite input module for vlc * qpsk.c : Satellite input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003-2004 VideoLAN
* *
* Authors: Sam Hocevar <sam@zoy.org> * Authors: Sam Hocevar <sam@zoy.org>
* Jean-Paul Saman <jpsaman@wxs.nl> * Jean-Paul Saman <jpsaman@wxs.nl>
...@@ -41,84 +41,97 @@ void E_(Close) ( vlc_object_t * ); ...@@ -41,84 +41,97 @@ void E_(Close) ( vlc_object_t * );
*****************************************************************************/ *****************************************************************************/
/* Satellite options */ /* Satellite options */
#define ADAPTER_TEXT N_("adapter card to tune") #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_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 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 FREQ_LONGTEXT ""
#define POL_TEXT N_("satellite default transponder polarization") #define POL_TEXT N_("Satellite transponder polarization")
#define POL_LONGTEXT "" #define POL_LONGTEXT ""
#define FEC_TEXT N_("satellite default transponder FEC") #define FEC_TEXT N_("Satellite transponder FEC")
#define FEC_LONGTEXT N_("FEC=Forward Error Correction mode") #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 SRATE_LONGTEXT ""
#define DISEQC_TEXT N_("use diseqc with antenna") #define DISEQC_TEXT N_("Use diseqc with antenna")
#define DISEQC_LONGTEXT "" #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_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_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 LNB_SLOF_LONGTEXT ""
#define PROBE_TEXT N_("probe the dvb card for capabilities (default disabled)") #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") #define PROBE_LONGTEXT N_("Some dvb cards do not like to be probed for their capabilities.")
/* Cable */ /* Cable */
#define MODULATION_TEXT N_("modulation type") #define MODULATION_TEXT N_("Modulation type")
#define MODULATION_LONGTEXT N_("modulation type for frontend device ") #define MODULATION_LONGTEXT N_("Modulation type for frontend device.")
/* Terrestrial */ /* 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_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 CODE_RATE_LP_LONGTEXT ""
#define BANDWIDTH_TEXT N_("terrestrial bandwidth") #define BANDWIDTH_TEXT N_("Terrestrial bandwidth")
#define BANDWIDTH_LONGTEXT N_("terrestrial bandwidth [0=auto,6,7,8 in MHz]") #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 GUARD_LONGTEXT ""
#define TRANSMISSION_TEXT N_("terrestrial transmission mode") #define TRANSMISSION_TEXT N_("Terrestrial transmission mode")
#define TRANSMISSION_LONGTEXT "" #define TRANSMISSION_LONGTEXT ""
#define HIERARCHY_TEXT N_("terrestrial hierarchy mode") #define HIERARCHY_TEXT N_("Terrestrial hierarchy mode")
#define HIERARCHY_LONGTEXT "" #define HIERARCHY_LONGTEXT ""
vlc_module_begin(); 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 ); 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( "qpsk" );
add_shortcut( "cable" ); add_shortcut( "cable" );
add_shortcut( "terrestrial" ); add_shortcut( "terrestrial" );
...@@ -126,4 +139,3 @@ vlc_module_begin(); ...@@ -126,4 +139,3 @@ vlc_module_begin();
add_shortcut( "satellite" ); add_shortcut( "satellite" );
set_callbacks( E_(Open), E_(Close) ); set_callbacks( E_(Open), E_(Close) );
vlc_module_end(); vlc_module_end();
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dvd.c : DVD input module for vlc * dvd.c : DVD input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * 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> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -62,7 +62,7 @@ static void UnprobeLibDVDCSS( void ); ...@@ -62,7 +62,7 @@ static void UnprobeLibDVDCSS( void );
/***************************************************************************** /*****************************************************************************
* Module descriptor * 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_( \ #define CSSMETHOD_LONGTEXT N_( \
"Set the method used by libdvdcss for key decryption.\n" \ "Set the method used by libdvdcss for key decryption.\n" \
"title: decrypted title key is guessed from the encrypted sectors of " \ "title: decrypted title key is guessed from the encrypted sectors of " \
...@@ -98,6 +98,7 @@ vlc_module_begin(); ...@@ -98,6 +98,7 @@ vlc_module_begin();
set_description( _("DVD input (uses libdvdcss)") ); set_description( _("DVD input (uses libdvdcss)") );
i = 100; i = 100;
#endif #endif
add_shortcut( "dvdold" ); add_shortcut( "dvdold" );
add_shortcut( "dvdsimple" ); add_shortcut( "dvdsimple" );
set_capability( "access", i ); set_capability( "access", i );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* file.c: file input (file: access plug-in) * file.c: file input (file: access plug-in)
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * 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> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -76,7 +76,6 @@ static ssize_t Read ( input_thread_t *, byte_t *, size_t ); ...@@ -76,7 +76,6 @@ static ssize_t Read ( input_thread_t *, byte_t *, size_t );
vlc_module_begin(); vlc_module_begin();
set_description( _("Standard filesystem file input") ); 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 ); add_integer( "file-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
set_capability( "access", 50 ); set_capability( "access", 50 );
add_shortcut( "file" ); add_shortcut( "file" );
......
/***************************************************************************** /*****************************************************************************
* ftp.c: * ftp.c: FTP input module
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2004 VideoLAN * 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> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -41,16 +41,27 @@ static void Close ( vlc_object_t * ); ...@@ -41,16 +41,27 @@ static void Close ( vlc_object_t * );
#define CACHING_LONGTEXT N_( \ #define CACHING_LONGTEXT N_( \
"Allows you to modify the default caching value for ftp streams. This " \ "Allows you to modify the default caching value for ftp streams. This " \
"value should be set in millisecond units." ) "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(); vlc_module_begin();
set_description( _("FTP input") ); set_description( _("FTP input") );
set_capability( "access", 0 ); set_capability( "access", 0 );
add_category_hint( "stream", NULL, VLC_FALSE ); add_integer( "ftp-caching", 2 * DEFAULT_PTS_DELAY / 1000, NULL,
add_integer( "ftp-caching", 2 * DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE ); add_string( "ftp-user", "anonymous", NULL, USER_TEXT, USER_LONGTEXT,
add_string( "ftp-user", "anonymous", NULL, "ftp user name", "ftp user name", VLC_FALSE ); VLC_FALSE );
add_string( "ftp-pwd", "anonymous@dummy.org", NULL, "ftp password", "ftp password, be careful with that option...", VLC_FALSE ); add_string( "ftp-pwd", "anonymous@dummy.org", NULL, PASS_TEXT,
add_string( "ftp-account", "anonymous", NULL, "ftp account", "ftp account", VLC_FALSE ); PASS_LONGTEXT, VLC_FALSE );
add_string( "ftp-account", "anonymous", NULL, ACCOUNT_TEXT,
ACCOUNT_LONGTEXT, VLC_FALSE );
add_shortcut( "ftp" ); add_shortcut( "ftp" );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
vlc_module_end(); vlc_module_end();
...@@ -115,7 +126,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -115,7 +126,8 @@ static int Open( vlc_object_t *p_this )
/* *** Open a TCP connection with server *** */ /* *** Open a TCP connection with server *** */
msg_Dbg( p_input, "waiting for connection..." ); 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 ) if( p_sys->fd_cmd < 0 )
{ {
msg_Err( p_input, "failed to connect with server" ); msg_Err( p_input, "failed to connect with server" );
...@@ -172,9 +184,11 @@ static int Open( vlc_object_t *p_this ) ...@@ -172,9 +184,11 @@ static int Open( vlc_object_t *p_this )
break; break;
case 3: case 3:
msg_Dbg( p_input, "account needed" ); 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 ); 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 ) ftp_ReadCommand( p_input, &i_answer, NULL ) < 0 )
{ {
if( val.psz_string ) free( val.psz_string ); if( val.psz_string ) free( val.psz_string );
...@@ -308,8 +322,8 @@ static void Seek( input_thread_t * p_input, off_t i_pos ) ...@@ -308,8 +322,8 @@ static void Seek( input_thread_t * p_input, off_t i_pos )
/***************************************************************************** /*****************************************************************************
* Read: * Read:
*****************************************************************************/ *****************************************************************************/
static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer, static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len ) size_t i_len )
{ {
access_sys_t *p_sys = p_input->p_access_data; 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, ...@@ -319,7 +333,7 @@ static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
/***************************************************************************** /*****************************************************************************
* ftp_*: * 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; access_sys_t *p_sys = p_input->p_access_data;
va_list args; va_list args;
...@@ -331,7 +345,8 @@ static int ftp_SendCommand( input_thread_t *p_input, char *psz_fmt, ... ) ...@@ -331,7 +345,8 @@ static int ftp_SendCommand( input_thread_t *p_input, char *psz_fmt, ... )
va_end( args ); va_end( args );
msg_Dbg( p_input, "ftp_SendCommand:\"%s\"", psz_cmd); 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" ); 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, ... ) ...@@ -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, These strings are not part of the requests, except in the case \377\377,
where the request contains one \377. */ where the request contains one \377. */
static int ftp_ReadCommand( input_thread_t *p_input, static int ftp_ReadCommand( input_thread_t *p_input,
int *pi_answer, char **ppsz_answer ) int *pi_answer, char **ppsz_answer )
{ {
access_sys_t *p_sys = p_input->p_access_data; access_sys_t *p_sys = p_input->p_access_data;
char *psz_line; char *psz_line;
...@@ -391,7 +406,7 @@ static int ftp_ReadCommand( input_thread_t *p_input, ...@@ -391,7 +406,7 @@ static int ftp_ReadCommand( input_thread_t *p_input,
return( i_answer / 100 ); 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; 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 ) ...@@ -410,7 +425,9 @@ static int ftp_StartStream( input_thread_t *p_input, off_t i_start )
} }
psz_parser = strchr( psz_arg, '(' ); 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 ); free( psz_arg );
msg_Err( p_input, "cannot get ip/port for passive transfert mode" ); 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 ) ...@@ -459,7 +476,7 @@ static int ftp_StartStream( input_thread_t *p_input, off_t i_start )
return VLC_SUCCESS; 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; access_sys_t *p_sys = p_input->p_access_data;
...@@ -477,4 +494,3 @@ static int ftp_StopStream ( input_thread_t *p_input) ...@@ -477,4 +494,3 @@ static int ftp_StopStream ( input_thread_t *p_input)
return VLC_SUCCESS; return VLC_SUCCESS;
} }
/***************************************************************************** /*****************************************************************************
* http.c: HTTP access plug-in * http.c: HTTP input module
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2004 VideoLAN * 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> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -39,9 +39,9 @@ ...@@ -39,9 +39,9 @@
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close( 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_( \ #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 " \ "http://myproxy.mydomain:myport/. If none is specified, the HTTP_PROXY " \
"environment variable will be tried." ) "environment variable will be tried." )
...@@ -50,15 +50,31 @@ static void Close( vlc_object_t * ); ...@@ -50,15 +50,31 @@ static void Close( vlc_object_t * );
"Allows you to modify the default caching value for http streams. This " \ "Allows you to modify the default caching value for http streams. This " \
"value should be set in millisecond units." ) "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(); vlc_module_begin();
set_description( _("HTTP input") ); set_description( _("HTTP input") );
set_capability( "access", 0 ); 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_string( "http-proxy", NULL, NULL, PROXY_TEXT, PROXY_LONGTEXT,
add_integer( "http-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE ); VLC_FALSE );
add_string( "http-user", NULL, NULL, "HTTP user name", "HTTP user name for Basic Authentification", VLC_FALSE ); add_integer( "http-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL,
add_string( "http-pwd", NULL , NULL, "HTTP password", "HTTP password for Basic Authentification", VLC_FALSE ); CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_string( "http-user-agent", COPYRIGHT_MESSAGE , NULL, "HTTP user agent", "HTTP user agent", VLC_FALSE ); 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( "http" );
add_shortcut( "http4" ); add_shortcut( "http4" );
add_shortcut( "http6" ); add_shortcut( "http6" );
...@@ -212,24 +228,29 @@ static int Open ( vlc_object_t *p_this ) ...@@ -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 ) 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 ) 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 */ /* 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 */ /* Retry with http 1.0 */
p_sys->i_version = 0; p_sys->i_version = 0;
if( p_input->b_die || 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; goto error;
} }
...@@ -281,7 +302,8 @@ static int Open ( vlc_object_t *p_this ) ...@@ -281,7 +302,8 @@ static int Open ( vlc_object_t *p_this )
{ {
p_input->psz_demux = strdup( "mp3" ); 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 */ /* 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 ) ...@@ -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; 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" ); msg_Err( p_input, "seek failed" );
} }
...@@ -435,7 +458,8 @@ static void ParseURL( access_sys_t *p_sys, char *psz_url ) ...@@ -435,7 +458,8 @@ static void ParseURL( access_sys_t *p_sys, char *psz_url )
/***************************************************************************** /*****************************************************************************
* Connect: * 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; access_sys_t *p_sys = p_input->p_access_data;
vlc_url_t srv = p_sys->b_proxy ? p_sys->proxy : p_sys->url; 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_ ...@@ -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, net_Printf( VLC_OBJECT(p_input), p_sys->fd,
"GET http://%s:%d/%s HTTP/1.%d\r\n", "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->url.psz_host, p_sys->url.i_port,
p_sys->i_version ); p_sys->url.psz_path, p_sys->i_version );
} }
else else
{ {
...@@ -474,12 +498,12 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_ ...@@ -474,12 +498,12 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
psz_path = "/"; psz_path = "/";
} }
net_Printf( VLC_OBJECT(p_input), p_sys->fd, net_Printf( VLC_OBJECT(p_input), p_sys->fd,
"GET %s HTTP/1.%d\r\n" "GET %s HTTP/1.%d\r\nHost: %s\r\n",
"Host: %s\r\n",
psz_path, p_sys->i_version, p_sys->url.psz_host ); psz_path, p_sys->i_version, p_sys->url.psz_host );
} }
/* User Agent */ /* 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 */ /* Offset */
if( p_sys->i_version == 1 ) 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_ ...@@ -497,14 +521,15 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
b64 = b64_encode( buf ); 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 ); free( b64 );
} }
net_Printf( VLC_OBJECT(p_input), p_sys->fd, "Connection: Close\r\n" ); 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 ) 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; net_Close( p_sys->fd ); p_sys->fd = -1;
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -516,7 +541,7 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_ ...@@ -516,7 +541,7 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
/* Read Answer */ /* Read Answer */
if( ( psz = net_Gets( VLC_OBJECT(p_input), p_sys->fd ) ) == NULL ) 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; goto error;
} }
if( !strncmp( psz, "HTTP/1.", 7 ) ) 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_ ...@@ -535,7 +560,8 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
free( psz ); free( psz );
goto error; 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" ) ) if( !strcmp( p_sys->psz_protocol, "ICY" ) )
{ {
*pb_seekable = VLC_FALSE; *pb_seekable = VLC_FALSE;
...@@ -559,7 +585,7 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_ ...@@ -559,7 +585,7 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
if( psz == NULL ) if( psz == NULL )
{ {
msg_Err( p_input, "Failed to read answer\n" ); msg_Err( p_input, "failed to read answer" );
goto error; goto error;
} }
......
/***************************************************************************** /*****************************************************************************
* mms.c: MMS over tcp, udp and http access plug-in * mms.c: MMS over tcp, udp and http access plug-in
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2002-2004 VideoLAN
* $Id: mms.c,v 1.35 2004/01/21 16:56:16 fenrir Exp $ * $Id: mms.c,v 1.36 2004/01/25 17:31:22 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -59,19 +59,23 @@ static void Close ( vlc_object_t * ); ...@@ -59,19 +59,23 @@ static void Close ( vlc_object_t * );
"Allows you to modify the default caching value for mms streams. This " \ "Allows you to modify the default caching value for mms streams. This " \
"value should be set in miliseconds units." ) "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(); vlc_module_begin();
set_description( _("Microsoft Media Server (MMS) input") ); set_description( _("Microsoft Media Server (MMS) input") );
set_capability( "access", 0 ); set_capability( "access", 0 );
add_category_hint( "stream", NULL, VLC_TRUE );
add_integer( "mms-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL, add_integer( "mms-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE ); CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_bool( "mms-all", 0, NULL, add_bool( "mms-all", 0, NULL, ALL_TEXT, "", VLC_TRUE );
"force selection of all streams", add_integer( "mms-maxbitrate", 0, NULL, BITRATE_TEXT, BITRATE_LONGTEXT ,
"force selection of all streams", VLC_TRUE ); VLC_FALSE );
add_integer( "mms-maxbitrate", 0, NULL,
"max bitrate",
"set max bitrate for auto streams selections", VLC_FALSE );
add_shortcut( "mms" ); add_shortcut( "mms" );
add_shortcut( "mmsu" ); add_shortcut( "mmsu" );
add_shortcut( "mmst" ); add_shortcut( "mmst" );
...@@ -79,7 +83,9 @@ vlc_module_begin(); ...@@ -79,7 +83,9 @@ vlc_module_begin();
set_callbacks( Open, Close ); set_callbacks( Open, Close );
vlc_module_end(); vlc_module_end();
/*****************************************************************************
* Open:
*****************************************************************************/
static int Open( vlc_object_t *p_this ) static int Open( vlc_object_t *p_this )
{ {
input_thread_t *p_input = (input_thread_t*)p_this; input_thread_t *p_input = (input_thread_t*)p_this;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pvr.c * pvr.c
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * 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> * Authors: Eric Petit <titer@videolan.org>
* *
...@@ -74,7 +74,7 @@ static ssize_t Read ( input_thread_t *, byte_t *, size_t ); ...@@ -74,7 +74,7 @@ static ssize_t Read ( input_thread_t *, byte_t *, size_t );
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
vlc_module_begin(); 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 ); set_capability( "access", 0 );
add_shortcut( "pvr" ); add_shortcut( "pvr" );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
......
...@@ -69,26 +69,23 @@ void E_(Close) ( vlc_object_t * ); ...@@ -69,26 +69,23 @@ void E_(Close) ( vlc_object_t * );
#define LNB_SLOF_LONGTEXT "" #define LNB_SLOF_LONGTEXT ""
vlc_module_begin(); vlc_module_begin();
add_category_hint( N_("Input"), NULL, VLC_FALSE ); set_description( _("Satellite input") );
add_integer( "dvb-dmx", 0, NULL, DEMUX_TEXT, DEMUX_LONGTEXT,
VLC_FALSE ); add_integer( "dvb-dmx", 0, NULL, DEMUX_TEXT, DEMUX_LONGTEXT, VLC_FALSE );
add_integer( "dvb-tuner", 0, NULL, TUNER_TEXT, TUNER_LONGTEXT, add_integer( "dvb-tuner", 0, NULL, TUNER_TEXT, TUNER_LONGTEXT, VLC_FALSE );
VLC_FALSE ); add_integer( "frequency", 0, NULL, FREQ_TEXT, FREQ_LONGTEXT, VLC_FALSE );
add_integer( "frequency", 0, NULL, FREQ_TEXT, FREQ_LONGTEXT, add_integer( "polarization", 0, NULL, POL_TEXT, POL_LONGTEXT, VLC_FALSE );
VLC_FALSE ); add_integer( "fec", 3, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_FALSE );
add_integer( "polarization", 0, NULL, POL_TEXT, POL_LONGTEXT, add_integer( "symbol-rate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT,
VLC_FALSE ); VLC_FALSE );
add_integer( "fec", 3, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_FALSE ); add_bool( "diseqc", 0, NULL, DISEQC_TEXT, DISEQC_LONGTEXT, VLC_TRUE );
add_integer( "symbol-rate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT, add_integer( "lnb-lof1", 10000000, NULL,
VLC_FALSE ); LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT, VLC_TRUE );
add_bool( "diseqc", 0, NULL, DISEQC_TEXT, DISEQC_LONGTEXT, VLC_FALSE ); add_integer( "lnb-lof2", 10000000, NULL,
add_integer( "lnb-lof1", 10000000, NULL, LNB_LOF2_TEXT, LNB_LOF2_LONGTEXT, VLC_TRUE );
LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT, VLC_FALSE ); add_integer( "lnb-slof", 11700000, NULL,
add_integer( "lnb-lof2", 10000000, NULL, LNB_SLOF_TEXT, LNB_SLOF_LONGTEXT, VLC_TRUE );
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_capability( "access", 0 ); set_capability( "access", 0 );
add_shortcut( "sat" ); add_shortcut( "sat" );
set_callbacks( E_(Open), E_(Close) ); set_callbacks( E_(Open), E_(Close) );
......
/***************************************************************************** /*****************************************************************************
* slp.c: SLP access plugin * slp.c: SLP access plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2002-2004 VideoLAN
* $Id: slp.c,v 1.19 2004/01/17 12:28:56 gbazin Exp $ * $Id: slp.c,v 1.20 2004/01/25 17:31:22 gbazin Exp $
* *
* Authors: Loc Minier <lool@videolan.org> * Authors: Loc Minier <lool@videolan.org>
* *
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
*****************************************************************************/ *****************************************************************************/
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close ( 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 int Init ( vlc_object_t * );
static void End ( vlc_object_t * ); static void End ( vlc_object_t * );
...@@ -50,42 +50,51 @@ int i_group; ...@@ -50,42 +50,51 @@ int i_group;
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
#define SRVTYPE_TEXT "SLP service type" #if 0
#define SRVTYPE_LONGTEXT "The service type string for SLP queries, " \ #define SRVTYPE_TEXT /*N_*/("SLP service type")
"including the authority string (if any) for the " \ #define SRVTYPE_LONGTEXT /*N_*/( \
"request. May not be empty" "The service type string for SLP queries, including the authority " \
#define ATTRIDS_TEXT "SLP attribute identifiers" "string (if any) for the request. May not be empty." )
#define ATTRIDS_LONGTEXT "This string is a comma separated list of " \ #endif
"attribute identifiers to search for a playlist "\
"title or empty to use all attributes" #define ATTRIDS_TEXT N_("SLP attribute identifiers")
#define SCOPELIST_TEXT "SLP scopes list" #define ATTRIDS_LONGTEXT N_( \
#define SCOPELIST_LONGTEXT "This string is a comma separated list of scope " \ "This string is a comma separated list of attribute identifiers to " \
"names or empty if you want to use the default " \ "search for a playlist title or empty to use all attributes." )
"scopes; it is used in all SLP queries"
#define NAMINGAUTHORITY_TEXT "SLP naming authority" #define SCOPELIST_TEXT N_("SLP scopes list")
#define NAMINGAUTHORITY_LONGTEXT "This string is a list of naming " \ #define SCOPELIST_LONGTEXT N_( \
"authorities to search. Use \"*\" for all " \ "This string is a comma separated list of scope names or empty if you " \
"and the empty string for the default of " \ "want to use the default scopes. It is used in all SLP queries." )
"IANA"
#define FILTER_TEXT "SLP LDAP filter" #define NAMINGAUTHORITY_TEXT N_("SLP naming authority")
#define FILTER_LONGTEXT "This is a query formulated of attribute pattern " \ #define NAMINGAUTHORITY_LONGTEXT N_( \
"matching expressions in the form of an LDAPv3 " \ "This string is a list of naming authorities to search. " \
"search filter or empty for all answers" "Use \"*\" for all and the empty string for the default of IANA." )
#define LANG_TEXT "Language requested in SLP requests"
#define LANG_LONGTEXT "RFC 1766 Language Tag for the natural language " \ #define FILTER_TEXT N_("SLP LDAP filter")
"locale of requests, leave empty to use the " \ #define FILTER_LONGTEXT N_( \
"default locale; it is used in all SLP queries" "This is a query formulated of attribute pattern matching expressions " \
"in the form of an LDAPv3 search filter or empty for all answers." )
#define LANG_TEXT N_("Language requested in SLP requests")
#define LANG_LONGTEXT N_( \
"RFC 1766 Language tag for the natural language locale of requests, " \
"leave empty to use the default locale. It is used in all SLP queries." )
vlc_module_begin(); vlc_module_begin();
set_description( _("SLP input") ); set_description( _("SLP input") );
add_category_hint( N_("slp"), NULL, VLC_TRUE );
add_string( "slp-attrids", "", NULL, ATTRIDS_TEXT, ATTRIDS_LONGTEXT, VLC_TRUE ); add_string( "slp-attrids", "", NULL, ATTRIDS_TEXT, ATTRIDS_LONGTEXT,
VLC_TRUE );
add_string( "slp-scopelist", "", NULL, SCOPELIST_TEXT, add_string( "slp-scopelist", "", NULL, SCOPELIST_TEXT,
SCOPELIST_LONGTEXT, VLC_TRUE ); SCOPELIST_LONGTEXT, VLC_TRUE );
add_string( "slp-namingauthority", "*", NULL, NAMINGAUTHORITY_TEXT, add_string( "slp-namingauthority", "*", NULL, NAMINGAUTHORITY_TEXT,
NAMINGAUTHORITY_LONGTEXT, VLC_TRUE ); NAMINGAUTHORITY_LONGTEXT, VLC_TRUE );
add_string( "slp-filter", "", NULL, FILTER_TEXT, FILTER_LONGTEXT, VLC_TRUE ); add_string( "slp-filter", "", NULL, FILTER_TEXT, FILTER_LONGTEXT,
VLC_TRUE );
add_string( "slp-lang", "", NULL, LANG_TEXT, LANG_LONGTEXT, VLC_TRUE ); add_string( "slp-lang", "", NULL, LANG_TEXT, LANG_LONGTEXT, VLC_TRUE );
set_capability( "access", 0 ); set_capability( "access", 0 );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
...@@ -155,10 +164,8 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp, ...@@ -155,10 +164,8 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp,
/* or there was a problem with getting the data we requested */ /* or there was a problem with getting the data we requested */
if( (slpe_errcode != SLP_OK) ) if( (slpe_errcode != SLP_OK) )
{ {
msg_Err( p_input, msg_Err( p_input, "SrvUrlCallback got an error %i with URL %s",
"SrvUrlCallback got an error %i with URL %s", slpe_errcode, psz_srvurl );
slpe_errcode,
psz_srvurl );
return SLP_TRUE; return SLP_TRUE;
} }
...@@ -234,9 +241,8 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp, ...@@ -234,9 +241,8 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp,
vlc_object_release( (vlc_object_t *)p_playlist ); vlc_object_release( (vlc_object_t *)p_playlist );
msg_Info( (input_thread_t *)p_input, msg_Info( (input_thread_t *)p_input,
"added %s (lifetime %i) to playlist", "added %s (lifetime %i) to playlist",
psz_srvurl, psz_srvurl, i_lifetime );
i_lifetime );
return SLP_TRUE; return SLP_TRUE;
} }
...@@ -255,22 +261,20 @@ static SLPBoolean SrvTypeCallback( SLPHandle slph_slp, ...@@ -255,22 +261,20 @@ static SLPBoolean SrvTypeCallback( SLPHandle slph_slp,
char *psz_eos; char *psz_eos;
char *psz_service; char *psz_service;
msg_Dbg(p_input,"Services: %s",psz_srvurl); msg_Dbg( p_input, "services: %s", psz_srvurl );
/* our callback was only called to tell us there's nothing more to read */ /* our callback was only called to tell us there's nothing more to read */
if( slpe_errcode == SLP_LAST_CALL ) if( slpe_errcode == SLP_LAST_CALL )
{ {
return SLP_TRUE; return SLP_TRUE;
} }
msg_Dbg(p_input,"Services: %s",psz_srvurl); msg_Dbg( p_input, "services: %s", psz_srvurl );
/* or there was a problem with getting the data we requested */ /* or there was a problem with getting the data we requested */
if( slpe_errcode != SLP_OK ) if( slpe_errcode != SLP_OK )
{ {
msg_Err( p_input, msg_Err( p_input, "SrvTypeCallback got an error %i with URL %s",
"SrvTypeCallback got an error %i with URL %s", slpe_errcode, psz_srvurl );
slpe_errcode,
psz_srvurl );
return SLP_TRUE; return SLP_TRUE;
} }
...@@ -298,7 +302,7 @@ static SLPBoolean SrvTypeCallback( SLPHandle slph_slp, ...@@ -298,7 +302,7 @@ static SLPBoolean SrvTypeCallback( SLPHandle slph_slp,
psz_service = strdup( psz_srvurl); psz_service = strdup( psz_srvurl);
msg_Dbg(p_input,"Getting details for %s",psz_service); msg_Dbg( p_input, "getting details for %s", psz_service );
slpe_result = SLPFindSrvs( slph_slp2, slpe_result = SLPFindSrvs( slph_slp2,
psz_service, psz_service,
...@@ -317,8 +321,7 @@ static SLPBoolean SrvTypeCallback( SLPHandle slph_slp, ...@@ -317,8 +321,7 @@ static SLPBoolean SrvTypeCallback( SLPHandle slph_slp,
{ {
msg_Err( p_input, msg_Err( p_input,
"SLPFindSrvs error %i finding servers of type %s", "SLPFindSrvs error %i finding servers of type %s",
slpe_result, slpe_result, psz_service );
psz_service );
} }
} }
psz_srvurl++; psz_srvurl++;
...@@ -443,4 +446,3 @@ static void End ( vlc_object_t *p_this ) ...@@ -443,4 +446,3 @@ static void End ( vlc_object_t *p_this )
{ {
return; return;
} }
/***************************************************************************** /*****************************************************************************
* tcp.c: TCP access plug-in * tcp.c: TCP input module
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003-2004 VideoLAN
* $Id: tcp.c,v 1.3 2004/01/05 15:07:16 fenrir Exp $ * $Id: tcp.c,v 1.4 2004/01/25 17:31:22 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
#define CACHING_TEXT N_("caching value in ms") #define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \ #define CACHING_LONGTEXT N_( \
"Allows you to modify the default caching value for udp streams. This " \ "Allows you to modify the default caching value for udp streams. This " \
"value should be set in miliseconds units." ) "value should be set in miliseconds units." )
...@@ -44,14 +44,15 @@ static void Close( vlc_object_t * ); ...@@ -44,14 +44,15 @@ static void Close( vlc_object_t * );
vlc_module_begin(); vlc_module_begin();
set_description( _("TCP input") ); set_description( _("TCP input") );
add_category_hint( N_("TCP"), NULL , VLC_TRUE );
add_integer( "tcp-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE ); add_integer( "tcp-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
CACHING_LONGTEXT, VLC_TRUE );
set_capability( "access", 0 ); set_capability( "access", 0 );
add_shortcut( "tcp" ); add_shortcut( "tcp" );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
vlc_module_end(); vlc_module_end();
/***************************************************************************** /*****************************************************************************
* Local prototypes * Local prototypes
*****************************************************************************/ *****************************************************************************/
...@@ -60,7 +61,7 @@ struct access_sys_t ...@@ -60,7 +61,7 @@ struct access_sys_t
int fd; int fd;
}; };
static ssize_t Read ( input_thread_t *, byte_t *, size_t ); static ssize_t Read ( input_thread_t *, byte_t *, size_t );
/***************************************************************************** /*****************************************************************************
* Open: open the socket * Open: open the socket
...@@ -158,4 +159,3 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ) ...@@ -158,4 +159,3 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, size_t i_len )
return net_Read( p_input, p_sys->fd, p_buffer, i_len, VLC_FALSE ); return net_Read( p_input, p_sys->fd, p_buffer, i_len, VLC_FALSE );
} }
/***************************************************************************** /*****************************************************************************
* udp.c: raw UDP & RTP access plug-in * udp.c: raw UDP & RTP input module
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001-2004 VideoLAN
* $Id: udp.c,v 1.27 2004/01/21 10:22:31 fenrir Exp $ * $Id: udp.c,v 1.28 2004/01/25 17:31:22 gbazin Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Tristan Leteurtre <tooney@via.ecp.fr> * Tristan Leteurtre <tooney@via.ecp.fr>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
#define CACHING_TEXT N_("caching value in ms") #define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \ #define CACHING_LONGTEXT N_( \
"Allows you to modify the default caching value for udp streams. This " \ "Allows you to modify the default caching value for udp streams. This " \
"value should be set in miliseconds units." ) "value should be set in miliseconds units." )
...@@ -48,8 +48,10 @@ static void Close( vlc_object_t * ); ...@@ -48,8 +48,10 @@ static void Close( vlc_object_t * );
vlc_module_begin(); vlc_module_begin();
set_description( _("UDP/RTP input") ); set_description( _("UDP/RTP input") );
add_category_hint( N_("UDP"), NULL , VLC_TRUE );
add_integer( "udp-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE ); add_integer( "udp-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
CACHING_LONGTEXT, VLC_TRUE );
set_capability( "access", 0 ); set_capability( "access", 0 );
add_shortcut( "udp" ); add_shortcut( "udp" );
add_shortcut( "udpstream" ); add_shortcut( "udpstream" );
...@@ -100,7 +102,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -100,7 +102,8 @@ static int Open( vlc_object_t *p_this )
if( *p_input->psz_access ) if( *p_input->psz_access )
{ {
/* Find out which shortcut was used */ /* Find out which shortcut was used */
if( !strncmp( p_input->psz_access, "udp4", 6 ) || !strncmp( p_input->psz_access, "rtp4", 6 )) if( !strncmp( p_input->psz_access, "udp4", 6 ) ||
!strncmp( p_input->psz_access, "rtp4", 6 ))
{ {
val.b_bool = VLC_TRUE; val.b_bool = VLC_TRUE;
var_Set( p_input, "ipv4", val ); var_Set( p_input, "ipv4", val );
...@@ -108,7 +111,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -108,7 +111,8 @@ static int Open( vlc_object_t *p_this )
val.b_bool = VLC_FALSE; val.b_bool = VLC_FALSE;
var_Set( p_input, "ipv6", val ); var_Set( p_input, "ipv6", val );
} }
else if( !strncmp( p_input->psz_access, "udp6", 6 ) || !strncmp( p_input->psz_access, "rtp6", 6 ) ) else if( !strncmp( p_input->psz_access, "udp6", 6 ) ||
!strncmp( p_input->psz_access, "rtp6", 6 ) )
{ {
val.b_bool = VLC_TRUE; val.b_bool = VLC_TRUE;
var_Set( p_input, "ipv6", val ); var_Set( p_input, "ipv6", val );
...@@ -307,7 +311,8 @@ static ssize_t RTPRead( input_thread_t * p_input, byte_t * p_buffer, ...@@ -307,7 +311,8 @@ static ssize_t RTPRead( input_thread_t * p_input, byte_t * p_buffer,
} }
else if( i_payload_type != 33 && i_payload_type != 32 ) else if( i_payload_type != 33 && i_payload_type != 32 )
{ {
msg_Dbg( p_input, "unsupported RTP payload type (%u)", i_payload_type ); msg_Dbg( p_input, "unsupported RTP payload type (%u)",
i_payload_type );
} }
i_skip += RTP_HEADER_LEN + 4*i_CSRC_count; i_skip += RTP_HEADER_LEN + 4*i_CSRC_count;
...@@ -425,7 +430,9 @@ static ssize_t RTPChoose( input_thread_t * p_input, byte_t * p_buffer, ...@@ -425,7 +430,9 @@ static ssize_t RTPChoose( input_thread_t * p_input, byte_t * p_buffer,
i_ret = i_len; i_ret = i_len;
} }
p_input->p_vlc->pf_memcpy( p_buffer, &p_tmp_buffer[RTP_HEADER_LEN + 4*i_CSRC_count], i_ret ); p_input->p_vlc->pf_memcpy( p_buffer,
&p_tmp_buffer[RTP_HEADER_LEN + 4*i_CSRC_count],
i_ret );
return i_ret; return i_ret;
} }
/***************************************************************************** /*****************************************************************************
* v4l.c : Video4Linux input module for vlc * v4l.c : Video4Linux input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002-2004 VideoLAN
* $Id: v4l.c,v 1.38 2004/01/03 18:41:36 rocky Exp $ * $Id: v4l.c,v 1.39 2004/01/25 17:31:22 gbazin Exp $
* *
* Author: Laurent Aimar <fenrir@via.ecp.fr> * Author: Laurent Aimar <fenrir@via.ecp.fr>
* Paul Forgey <paulf at aphrodite dot com> * Paul Forgey <paulf at aphrodite dot com>
...@@ -91,13 +91,9 @@ static void DemuxClose ( vlc_object_t * ); ...@@ -91,13 +91,9 @@ static void DemuxClose ( vlc_object_t * );
vlc_module_begin(); vlc_module_begin();
set_description( _("Video4Linux input") ); set_description( _("Video4Linux input") );
add_category_hint( N_("v4l"), NULL, VLC_TRUE );
add_integer( "v4l-caching", DEFAULT_PTS_DELAY / 1000, NULL, add_integer( "v4l-caching", DEFAULT_PTS_DELAY / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE ); CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_shortcut( "v4l" );
set_capability( "access", 10 );
set_callbacks( AccessOpen, AccessClose );
add_string( "v4l-vdev", "/dev/video", 0, VDEV_TEXT, VDEV_LONGTEXT, add_string( "v4l-vdev", "/dev/video", 0, VDEV_TEXT, VDEV_LONGTEXT,
VLC_FALSE ); VLC_FALSE );
add_string( "v4l-adev", "/dev/dsp", 0, ADEV_TEXT, ADEV_LONGTEXT, add_string( "v4l-adev", "/dev/dsp", 0, ADEV_TEXT, ADEV_LONGTEXT,
...@@ -105,6 +101,10 @@ vlc_module_begin(); ...@@ -105,6 +101,10 @@ vlc_module_begin();
add_string( "v4l-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT, add_string( "v4l-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
VLC_TRUE ); VLC_TRUE );
add_shortcut( "v4l" );
set_capability( "access", 10 );
set_callbacks( AccessOpen, AccessClose );
add_submodule(); add_submodule();
set_description( _("Video4Linux demuxer") ); set_description( _("Video4Linux demuxer") );
add_shortcut( "v4l" ); add_shortcut( "v4l" );
......
/***************************************************************************** /*****************************************************************************
* vcd.c : VCD input module for vlc * vcd.c : VCD input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000-2004 VideoLAN
* $Id: vcd.c,v 1.24 2003/08/10 13:35:03 gbazin Exp $ * $Id: vcd.c,v 1.25 2004/01/25 17:31:22 gbazin Exp $
* *
* Author: Johan Bilien <jobi@via.ecp.fr> * Author: Johan Bilien <jobi@via.ecp.fr>
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vcd.c : VCD input module for vlc * vcd.c : VCD input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000,2003 VideoLAN * Copyright (C) 2000,2003 VideoLAN
* $Id: vcd.c,v 1.14 2004/01/25 14:42:18 rocky Exp $ * $Id: vcd.c,v 1.15 2004/01/25 17:31:22 gbazin Exp $
* *
* Authors: Rocky Bernstein <rocky@panix.com> * Authors: Rocky Bernstein <rocky@panix.com>
* *
...@@ -96,8 +96,6 @@ vlc_module_begin(); ...@@ -96,8 +96,6 @@ vlc_module_begin();
add_shortcut( "vcdx" ); add_shortcut( "vcdx" );
/* Configuration options */ /* Configuration options */
add_category_hint( N_("VCDX"), NULL, VLC_TRUE );
add_integer ( MODULE_STRING "-debug", 0, E_(DebugCallback), add_integer ( MODULE_STRING "-debug", 0, E_(DebugCallback),
N_("If nonzero, this gives additional debug information."), N_("If nonzero, this gives additional debug information."),
DEBUG_LONGTEXT, VLC_TRUE ); DEBUG_LONGTEXT, VLC_TRUE );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment