Commit 7f583e05 authored by Gildas Bazin's avatar Gildas Bazin


* New GTK configuration interface. This interface is generated dynamically
  at run-time from the configuration data contained in each plugin.
* config_PutPszVariable and config_GetPszVariable are now thread safe.
* Few modifications/optimizations to the config module.
* Got rid of all the _VAR macros in config.h

This is the first version of the GTK configuration interface. There are still
a few raw corners and a fews things left to do, but it basically does what
I wanted.
Constructive comments like it sucks or it smells rotten fish are of course
very welcome. And if there are GTK gurus out there, please don't hesitate to
add your touch.

I also started to add usefull comments to the configuration options but I'm not
really good at this kind of thing so if people want to help, they can finish
the job. For this look at all the *_LONGTEXT macros at the top of main.c

(PS: Translations will also be appreciated but not right now as the interface
will likely change again in the few coming days)
parent e7608d4b
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.84 2002/03/04 23:56:37 massiot Exp $
* $Id: common.h,v 1.85 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -463,6 +463,7 @@ typedef __int64 off_t;
typedef struct module_symbols_s
{
struct main_s* p_main;
struct module_bank_s* p_module_bank;
struct input_bank_s* p_input_bank;
struct aout_bank_s* p_aout_bank;
struct vout_bank_s* p_vout_bank;
......@@ -472,8 +473,7 @@ typedef struct module_symbols_s
void ( * config_PutIntVariable ) ( const char *, int );
void ( * config_PutPszVariable ) ( const char *, char * );
struct module_config_s * ( * config_FindConfig ) ( const char * );
struct module_config_s * ( * config_Duplicate ) ( struct module_config_s *,
int );
struct module_config_s * ( * config_Duplicate ) ( struct module_s * );
struct intf_subscription_s * ( * intf_MsgSub ) ( void );
void ( * intf_MsgUnsub ) ( struct intf_subscription_s * );
......
......@@ -114,7 +114,7 @@
/* #define AOUT_FORMAT_DEFAULT AOUT_FMT_U16_LE */
/* Volume */
#define VOLUME_DEFAULT 512
#define VOLUME_DEFAULT 256
#define VOLUME_STEP 128
#define VOLUME_MAX 1024
......@@ -253,138 +253,3 @@
/* Maximal size of the message queue - in case of overflow, all messages in the
* queue are printed, but not sent to the threads */
#define INTF_MSG_QSIZE 256
/****************************************************************************
* Macros for the names of the main options
* Instead of directly manipulating the option names, we define macros for
* them. This makes sense only for the main options (ie. only the ones defined
* in main.c) because they are widely used.
* We won't bother doing this for plugins as plugin specific options should
* by definition be restricted in useage to the plugin that defines them.
*
****************************************************************************/
/*
* Interface option names
*/
/* Variable containing the display method */
#define INTF_METHOD_VAR "intf"
/* Variable used to store startup script */
#define INTF_INIT_SCRIPT_VAR "vlcrc"
/* Default search path for interface file browser */
#define INTF_PATH_VAR "search_path"
/* Interface warnig message level */
#define INTF_WARNING_VAR "warning"
/* Variable to enable stats mode */
#define INTF_STATS_VAR "stats"
/*
* Audio output option names
*/
/* Variable to disable the audio output */
#define AOUT_NOAUDIO_VAR "noaudio"
/* Variable containing the audio output method */
#define AOUT_METHOD_VAR "aout"
/* Variable for spdif mode */
#define AOUT_SPDIF_VAR "spdif"
/* Variable for volume */
#define AOUT_VOLUME_VAR "volume"
/* Variable for mono */
#define AOUT_MONO_VAR "audio_mono"
/* Variable for output rate */
#define AOUT_RATE_VAR "audio_rate"
/* Variable for output rate */
#define AOUT_DESYNC_VAR "audio_desync"
/*
* Video output option names
*/
/* Variable to disable the video output */
#define VOUT_NOVIDEO_VAR "novideo"
/* Variable containing the display method */
#define VOUT_METHOD_VAR "vout"
/* Variable used in place of DISPLAY if available */
#define VOUT_DISPLAY_VAR "display"
/* Dimensions for display window */
#define VOUT_WIDTH_VAR "width"
#define VOUT_HEIGHT_VAR "height"
/* Variable for grayscale output mode */
#define VOUT_GRAYSCALE_VAR "grayscale"
/* Variable for fullscreen mode */
#define VOUT_FULLSCREEN_VAR "fullscreen"
/* Variable for overlay mode */
#define VOUT_NOOVERLAY_VAR "nooverlay"
/* Variable containing the filter method */
#define VOUT_FILTER_VAR "filter"
/* Variable containing the SPU margin */
#define VOUT_SPUMARGIN_VAR "spumargin"
/*
* Input option names
*/
/* Variable containing the input method */
#define INPUT_METHOD_VAR "input"
/* Input port */
#define INPUT_PORT_VAR "server_port"
/* Channels mode */
#define INPUT_NETWORK_CHANNEL_VAR "network_channel"
/* Variable containing channel server and port */
#define INPUT_CHANNEL_SERVER_VAR "channel_server"
#define INPUT_CHANNEL_PORT_VAR "channel_port"
/* Variable containing network interface */
#define INPUT_IFACE_VAR "iface"
#define INPUT_AUDIO_VAR "input_audio"
#define INPUT_CHANNEL_VAR "input_channel"
#define INPUT_SUBTITLE_VAR "input_subtitle"
/* DVD defaults */
#define INPUT_DVD_DEVICE_VAR "dvd_device"
/* VCD defaults */
#define INPUT_VCD_DEVICE_VAR "vcd_device"
/* IPv6, IPv4 */
#define INPUT_IPV6_VAR "6"
#define INPUT_IPV4_VAR "4"
/*
* Decoders option names
*/
/* Variables for audio decoders */
#define ADEC_MPEG_VAR "mpeg_adec"
#define ADEC_AC3_VAR "ac3_adec"
/* The synchro variable name */
#define VPAR_SYNCHRO_VAR "vpar_synchro"
/* Variable containing the SMP value */
#define VDEC_SMP_VAR "vdec_smp"
/*
* Playlist option names
*/
/* Launch on start-up */
#define PLAYLIST_STARTUP_VAR "playlist_on_startup"
/* Enqueue drag'n dropped item */
#define PLAYLIST_ENQUEUE_VAR "playlist_enqueue"
/* Loop on playlist end */
#define PLAYLIST_LOOP_VAR "playlist_loop"
/*
* CPU options
*/
#define NOMMX_VAR "nommx"
#define NO3DN_VAR "no3dn"
#define NOMMXEXT_VAR "nommxext"
#define NOSSE_VAR "nosse"
#define NOALTIVEC_VAR "noaltivec"
/*
* Misc option names
*/
/* Variable containing the memcpy method */
#define MEMCPY_METHOD_VAR "memcpy"
......@@ -4,7 +4,7 @@
* It includes functions allowing to declare, get or set configuration options.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: configuration.h,v 1.1 2002/02/24 20:51:09 gbazin Exp $
* $Id: configuration.h,v 1.2 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -27,29 +27,34 @@
* Macros used to build the configuration structure.
*****************************************************************************/
/* Mandatory last part of the structure */
#define MODULE_CONFIG_ITEM_END 0x000 /* End of config */
/* Configuration hint types */
#define MODULE_CONFIG_HINT_END 0x0001 /* End of config */
#define MODULE_CONFIG_HINT_CATEGORY 0x0002 /* Start of new category */
#define MODULE_CONFIG_HINT_SUBCATEGORY 0x0003 /* Start of sub-category */
#define MODULE_CONFIG_HINT_SUBCATEGORY_END 0x0004 /* End of sub-category */
/* Configuration widgets */
#define MODULE_CONFIG_ITEM_CATEGORY 0x0001 /* Start of new category */
#define MODULE_CONFIG_ITEM_SUBCATEGORY 0x0002 /* Start of sub-category */
#define MODULE_CONFIG_ITEM_SUBCATEGORY_END 0x0003 /* End of sub-category */
#define MODULE_CONFIG_ITEM_STRING 0x0004 /* String option */
#define MODULE_CONFIG_ITEM_FILE 0x0005 /* File option */
#define MODULE_CONFIG_ITEM_PLUGIN 0x0006 /* Plugin option */
#define MODULE_CONFIG_ITEM_INTEGER 0x0007 /* Integer option */
#define MODULE_CONFIG_ITEM_BOOL 0x0008 /* Bool option */
#define MODULE_CONFIG_ITEM_ALIAS 0x0009 /* Alias option */
#define MODULE_CONFIG_HINT 0x000F
/* Configuration item types */
#define MODULE_CONFIG_ITEM_STRING 0x0010 /* String option */
#define MODULE_CONFIG_ITEM_FILE 0x0020 /* File option */
#define MODULE_CONFIG_ITEM_PLUGIN 0x0030 /* Plugin option */
#define MODULE_CONFIG_ITEM_INTEGER 0x0040 /* Integer option */
#define MODULE_CONFIG_ITEM_BOOL 0x0050 /* Bool option */
#define MODULE_CONFIG_ITEM_ALIAS 0x0060 /* Alias option */
#define MODULE_CONFIG_ITEM 0x00F0
typedef struct module_config_s
{
int i_type; /* Configuration type */
char * psz_name; /* Option name */
char * psz_text; /* Short comment on the configuration option */
char * psz_longtext; /* Long comment on the configuration option */
char * psz_value; /* Option value */
char *psz_name; /* Option name */
char *psz_text; /* Short comment on the configuration option */
char *psz_longtext; /* Long comment on the configuration option */
char *psz_value; /* Option value */
int i_value; /* Option value */
void * p_callback; /* Function to call when commiting a change */
void *p_callback; /* Function to call when commiting a change */
vlc_mutex_t *p_lock; /* lock to use when modifying the config */
boolean_t b_dirty; /* Dirty flag to indicate a config change */
} module_config_t;
......@@ -65,8 +70,7 @@ void config_PutIntVariable( const char *psz_name, int i_value );
void config_PutPszVariable( const char *psz_name, char *psz_value );
module_config_t *config_FindConfig( const char *psz_name );
module_config_t *config_Duplicate ( module_config_t *p_config_orig,
int i_config_options );
module_config_t *config_Duplicate ( module_t *p_module );
#else
# define config_GetIntVariable p_symbols->config_GetIntVariable
# define config_PutIntVariable p_symbols->config_PutIntVariable
......@@ -92,25 +96,29 @@ module_config_t *config_Duplicate ( module_config_t *p_config_orig,
static module_config_t p_config[] = {
#define MODULE_CONFIG_STOP \
{ MODULE_CONFIG_ITEM_END, NULL, NULL, NULL, NULL, 0, NULL, 0 } };
{ MODULE_CONFIG_HINT_END, NULL, NULL, NULL, NULL, 0, NULL, 0 } };
#define ADD_CATEGORY_HINT( text, longtext ) \
{ MODULE_CONFIG_ITEM_CATEGORY, NULL, text, longtext, NULL, 0, NULL, 0 },
{ MODULE_CONFIG_HINT_CATEGORY, NULL, text, longtext, NULL, 0, NULL, \
NULL, 0 },
#define ADD_SUBCATEGORY_HINT( text, longtext ) \
{ MODULE_CONFIG_ITEM_SUBCATEGORY, NULL, text, longtext, NULL, 0, NULL, 0 },
{ MODULE_CONFIG_HINT_SUBCATEGORY, NULL, text, longtext, NULL, 0, NULL, \
NULL, 0 },
#define END_SUBCATEGORY_HINT \
{ MODULE_CONFIG_ITEM_SUBCATEGORY_END, NULL, NULL, NULL, NULL, 0, NULL, 0 },
{ MODULE_CONFIG_HINT_SUBCATEGORY_END, NULL, NULL, NULL, NULL, 0, NULL, \
NULL, 0 },
#define ADD_STRING( name, value, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_STRING, name, text, longtext, value, 0, \
p_callback, 0 },
p_callback, NULL, 0 },
#define ADD_FILE( name, psz_value, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_FILE, name, text, longtext, psz_value, 0, \
p_callback, 0 },
p_callback, NULL, 0 },
#define ADD_PLUGIN( name, i_capability, psz_value, p_callback, text, longtext)\
{ MODULE_CONFIG_ITEM_PLUGIN, name, text, longtext, psz_value, \
i_capability, p_callback, 0 },
i_capability, p_callback, NULL, 0 },
#define ADD_INTEGER( name, i_value, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_INTEGER, name, text, longtext, NULL, i_value, \
p_callback, 0 },
p_callback, NULL, 0 },
#define ADD_BOOL( name, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_BOOL, name, text, longtext, NULL, 0, p_callback, 0 },
{ MODULE_CONFIG_ITEM_BOOL, name, text, longtext, NULL, 0, p_callback, \
NULL, 0 },
......@@ -2,7 +2,7 @@
* modules.h : Module management functions.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.h,v 1.44 2002/03/01 00:33:18 massiot Exp $
* $Id: modules.h,v 1.45 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -87,7 +87,7 @@ static __inline__ char *GetCapabilityName( unsigned int i_capa )
*****************************************************************************
* This global variable is accessed by any function using modules.
*****************************************************************************/
typedef struct
typedef struct module_bank_s
{
struct module_s * first; /* First module in the bank */
int i_count; /* Number of allocated modules */
......@@ -96,7 +96,11 @@ typedef struct
it is to design thread-safe linked lists */
} module_bank_t;
#ifndef PLUGIN
extern module_bank_t *p_module_bank;
#else
# define p_module_bank (p_symbols->p_module_bank)
#endif
/*****************************************************************************
* Module description structure
......@@ -121,8 +125,15 @@ typedef struct module_s
u32 i_cpu_capabilities; /* Required CPU capabilities */
struct module_functions_s *p_functions; /* Capability functions */
struct module_config_s *p_config; /* Module configuration structure */
int i_config_options; /* number of configuration options */
/*
* Variables set by the module to store its config options
*/
struct module_config_s *p_config; /* Module configuration structure */
struct module_config_s *p_config_orig; /* original module config data */
vlc_mutex_t config_lock; /* lock used to modify the config */
int i_config_lines; /* number of configuration lines */
int i_config_items; /* number of configuration items */
/*
* Variables used internally by the module manager
......
......@@ -2,7 +2,7 @@
* modules_inner.h : Macros used from within a module.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules_inner.h,v 1.12 2002/02/24 20:51:09 gbazin Exp $
* $Id: modules_inner.h,v 1.13 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -90,9 +90,19 @@
#define MODULE_INIT_STOP \
STORE_SYMBOLS; \
p_module->pp_shortcuts[ i_shortcut ] = NULL; \
p_module->i_config_options = sizeof(p_config)/sizeof(module_config_t);\
p_module->p_config = config_Duplicate( p_config, \
p_module->i_config_options ); \
p_module->i_config_items = 0; \
for( p_module->i_config_lines = 0; \
p_module->i_config_lines < (sizeof(p_config)/ \
sizeof(module_config_t)); \
p_module->i_config_lines++ ) \
{ \
if( p_config[p_module->i_config_lines].i_type & \
MODULE_CONFIG_ITEM ) \
p_module->i_config_items++; \
} \
vlc_mutex_init( &p_module->config_lock ); \
p_module->p_config_orig = p_config; \
p_module->p_config = config_Duplicate( p_module ); \
if( p_module->p_config == NULL ) \
{ \
intf_ErrMsg( MODULE_STRING \
......@@ -130,6 +140,7 @@
{ \
p_module->p_functions = \
( module_functions_t * )malloc( sizeof( module_functions_t ) ); \
p_module->p_config_orig = p_config; \
if( p_module->p_functions == NULL ) \
{ \
return( -1 ); \
......@@ -148,6 +159,7 @@
#define MODULE_DEACTIVATE_START \
int __VLC_SYMBOL( DeactivateModule )( module_t *p_module ) \
{ \
p_module->p_config_orig = NULL; \
free( p_module->p_functions );
#define MODULE_DEACTIVATE_STOP \
......
......@@ -2,7 +2,7 @@
* ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ac3_spdif.c,v 1.18 2002/03/04 01:53:56 stef Exp $
* $Id: ac3_spdif.c,v 1.19 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
......@@ -70,7 +70,7 @@ void _M( adec_getfunctions )( function_list_t * p_function_list )
*****************************************************************************/
MODULE_CONFIG_START
ADD_CATEGORY_HINT( "Misc Options", NULL )
ADD_BOOL( AOUT_SPDIF_VAR, NULL, "enable AC3 pass-through mode", NULL )
ADD_BOOL( "spdif", NULL, "enable AC3 pass-through mode", NULL )
MODULE_CONFIG_STOP
MODULE_INIT_START
......@@ -93,7 +93,7 @@ MODULE_DEACTIVATE_STOP
*****************************************************************************/
static int decoder_Probe( u8 *pi_type )
{
return( ( config_GetIntVariable( AOUT_SPDIF_VAR )
return( ( config_GetIntVariable( "spdif" )
&& *pi_type == AC3_AUDIO_ES ) ? 0 : -1 );
}
......
......@@ -2,7 +2,7 @@
* http.c: HTTP access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: http.c,v 1.2 2002/03/04 23:56:37 massiot Exp $
* $Id: http.c,v 1.3 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -230,11 +230,11 @@ static int HTTPOpen( input_thread_t * p_input )
}
p_access_data->psz_network = NULL;
if( config_GetIntVariable( INPUT_IPV4_VAR ) )
if( config_GetIntVariable( "ipv4" ) )
{
p_access_data->psz_network = "ipv4";
}
if( config_GetIntVariable( INPUT_IPV6_VAR ) )
if( config_GetIntVariable( "ipv6" ) )
{
p_access_data->psz_network = "ipv6";
}
......
......@@ -2,7 +2,7 @@
* udp.c: raw UDP access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: udp.c,v 1.2 2002/03/04 23:56:37 massiot Exp $
* $Id: udp.c,v 1.3 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -107,11 +107,11 @@ static int UDPOpen( input_thread_t * p_input )
int i_bind_port = 0, i_server_port = 0;
network_socket_t socket_desc;
if( config_GetIntVariable( INPUT_IPV4_VAR ) )
if( config_GetIntVariable( "ipv4" ) )
{
psz_network = "ipv4";
}
if( config_GetIntVariable( INPUT_IPV6_VAR ) )
if( config_GetIntVariable( "ipv6" ) )
{
psz_network = "ipv6";
}
......
......@@ -2,7 +2,7 @@
* vout_directx.c: Windows DirectX video output display method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: vout_directx.c,v 1.23 2002/02/24 20:51:09 gbazin Exp $
* $Id: vout_directx.c,v 1.24 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -134,7 +134,7 @@ static int vout_Create( vout_thread_t *p_vout )
p_vout->p_sys->b_caps_overlay_clipping = 0;
SetRectEmpty( &p_vout->p_sys->rect_display );
p_vout->p_sys->b_using_overlay =
!config_GetIntVariable( VOUT_NOOVERLAY_VAR );
!config_GetIntVariable( "nooverlay" );
p_vout->p_sys->b_cursor = 1;
......@@ -157,8 +157,8 @@ static int vout_Create( vout_thread_t *p_vout )
}
#if 0
p_vout->p_sys->i_window_width = config_GetIntVariable( VOUT_WIDTH_VAR );
p_vout->p_sys->i_window_height = config_GetIntVariable( VOUT_HEIGHT_VAR );
p_vout->p_sys->i_window_width = config_GetIntVariable( "width" );
p_vout->p_sys->i_window_height = config_GetIntVariable( "height" );
#endif
/* Set locks and condition variables */
......
......@@ -2,7 +2,7 @@
* aout_dsp.c : dsp functions library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: aout_dsp.c,v 1.25 2002/02/27 18:19:21 sam Exp $
* $Id: aout_dsp.c,v 1.26 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -236,7 +236,11 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
{
if( p_aout->b_active )
{
write( p_aout->p_sys->i_fd, buffer, i_size );
int i_tmp;
i_tmp = write( p_aout->p_sys->i_fd, buffer, i_size );
if( i_tmp < 0 )
intf_ErrMsg("aout error: %s", strerror(ENOMEM) );
}
}
......
......@@ -8,7 +8,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_access.c,v 1.5 2002/03/09 16:48:33 stef Exp $
* $Id: dvd_access.c,v 1.6 2002/03/11 07:23:09 gbazin Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -781,7 +781,7 @@ static char * DVDParse( input_thread_t * p_input )
/* no device and no access specified: we probably don't want DVD */
return NULL;
}
psz_device = config_GetPszVariable( INPUT_DVD_DEVICE_VAR );
psz_device = config_GetPszVariable( "dvd_device" );
}
/* check block device */
......
/* dvd_es.c: functions to find and select ES
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_es.c,v 1.2 2002/03/08 22:58:12 stef Exp $
* $Id: dvd_es.c,v 1.3 2002/03/11 07:23:09 gbazin Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -245,15 +245,15 @@ void DVDLaunchDecoders( input_thread_t * p_input )
if( p_main->b_audio && p_dvd->i_audio_nb > 0 )
{
/* For audio: first one if none or a not existing one specified */
i_audio = config_GetIntVariable( INPUT_CHANNEL_VAR );
i_audio = config_GetIntVariable( "input_channel" );
if( i_audio <= 0 || i_audio > p_dvd->i_audio_nb )
{
config_PutIntVariable( INPUT_CHANNEL_VAR, 1 );
config_PutIntVariable( "input_channel", 1 );
i_audio = 1;
}
if( config_GetIntVariable( AOUT_SPDIF_VAR ) ||
( config_GetIntVariable( INPUT_AUDIO_VAR ) ==
if( config_GetIntVariable( "spdif" ) ||
( config_GetIntVariable( "input_audio" ) ==
REQUESTED_AC3 ) )
{
int i_ac3 = i_audio;
......@@ -280,10 +280,10 @@ void DVDLaunchDecoders( input_thread_t * p_input )
if( p_main->b_video && p_dvd->i_spu_nb > 0 )
{
/* for spu, default is none */
i_spu = config_GetIntVariable( INPUT_SUBTITLE_VAR );
i_spu = config_GetIntVariable( "input_subtitle" );
if( i_spu < 0 || i_spu > p_dvd->i_spu_nb )
{
config_PutIntVariable( INPUT_SUBTITLE_VAR, 0 );
config_PutIntVariable( "input_subtitle", 0 );
i_spu = 0;
}
if( i_spu > 0 )
......
......@@ -6,7 +6,7 @@
* It depends on: libdvdread for ifo files and block reading.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: input_dvdread.c,v 1.31 2002/03/06 16:39:37 stef Exp $
* $Id: input_dvdread.c,v 1.32 2002/03/11 07:23:09 gbazin Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -284,7 +284,7 @@ static int DvdReadOpen( struct input_thread_s *p_input )
free( psz_orig );
return -1;
}
psz_source = config_GetPszVariable( INPUT_DVD_DEVICE_VAR );
psz_source = config_GetPszVariable( "dvd_device" );
}
if( stat( psz_source, &stat_info ) == -1 )
......@@ -1208,16 +1208,16 @@ static void DvdReadLauchDecoders( input_thread_t * p_input )
if( p_main->b_audio )
{
/* For audio: first one if none or a not existing one specified */
int i_audio = config_GetIntVariable( INPUT_CHANNEL_VAR );
int i_audio = config_GetIntVariable( "input_channel" );
if( i_audio < 0 /*|| i_audio > i_audio_nb*/ )
{
config_PutIntVariable( INPUT_CHANNEL_VAR, 1 );
config_PutIntVariable( "input_channel", 1 );
i_audio = 1;
}
if( i_audio > 0/* && i_audio_nb > 0*/ )
{
if( config_GetIntVariable( AOUT_SPDIF_VAR ) ||
( config_GetIntVariable( INPUT_AUDIO_VAR ) ==
if( config_GetIntVariable( "spdif" ) ||
( config_GetIntVariable( "input_audio" ) ==
REQUESTED_AC3 ) )
{
int i_ac3 = i_audio;
......@@ -1244,10 +1244,10 @@ static void DvdReadLauchDecoders( input_thread_t * p_input )
if( p_main->b_video )
{
/* for spu, default is none */
int i_spu = config_GetIntVariable( INPUT_SUBTITLE_VAR );
int i_spu = config_GetIntVariable( "input_subtitle" );
if( i_spu < 0 /*|| i_spu > i_spu_nb*/ )
{
config_PutIntVariable( INPUT_SUBTITLE_VAR, 0 );
config_PutIntVariable( "input_subtitle", 0 );
i_spu = 0;
}
if( i_spu > 0 /*&& i_spu_nb > 0*/ )
......
......@@ -2,7 +2,7 @@
* deinterlace.c : deinterlacer plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: deinterlace.c,v 1.6 2002/02/24 20:51:09 gbazin Exp $
* $Id: deinterlace.c,v 1.7 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -125,10 +125,10 @@ static int vout_Create( vout_thread_t *p_vout )
/* Look what method was requested */
if( !(psz_method = psz_method_tmp
= config_GetPszVariable( VOUT_FILTER_VAR )) )
= config_GetPszVariable( "filter" )) )
{
intf_ErrMsg( "vout error: configuration variable %s empty",
VOUT_FILTER_VAR );
"filter" );
return( 1 );
}
......@@ -188,8 +188,8 @@ static int vout_Init( vout_thread_t *p_vout )
}
/* Try to open the real video output, with half the height our images */
psz_filter = config_GetPszVariable( VOUT_FILTER_VAR );
config_PutPszVariable( VOUT_FILTER_VAR, NULL );
psz_filter = config_GetPszVariable( "filter" );
config_PutPszVariable( "filter", NULL );
intf_WarnMsg( 1, "filter: spawning the real video output" );
......@@ -227,7 +227,7 @@ static int vout_Init( vout_thread_t *p_vout )
break;
}
config_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
config_PutPszVariable( "filter", psz_filter );
if( psz_filter ) free( psz_filter );
/* Everything failed */
......
......@@ -2,7 +2,7 @@
* distort.c : Misc video effects plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: distort.c,v 1.8 2002/02/24 20:51:09 gbazin Exp $
* $Id: distort.c,v 1.9 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -133,10 +133,10 @@ static int vout_Create( vout_thread_t *p_vout )
/* Look what method was requested */
if( !(psz_method = psz_method_tmp
= config_GetPszVariable( VOUT_FILTER_VAR )) )
= config_GetPszVariable( "filter" )) )
{
intf_ErrMsg( "vout error: configuration variable %s empty",
VOUT_FILTER_VAR );
"filter" );
return( 1 );
}
......@@ -183,8 +183,8 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->output.i_aspect = p_vout->render.i_aspect;
/* Try to open the real video output */
psz_filter = config_GetPszVariable( VOUT_FILTER_VAR );
config_PutPszVariable( VOUT_FILTER_VAR, NULL );
psz_filter = config_GetPszVariable( "filter" );
config_PutPszVariable( "filter", NULL );
intf_WarnMsg( 1, "filter: spawning the real video output" );
......@@ -193,7 +193,7 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma, p_vout->render.i_aspect );
config_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
config_PutPszVariable( "filter", psz_filter );
if( psz_filter ) free( psz_filter );
/* Everything failed */
......
......@@ -2,7 +2,7 @@
* invert.c : Invert video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: invert.c,v 1.8 2002/02/24 20:51:09 gbazin Exp $
* $Id: invert.c,v 1.9 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -135,8 +135,8 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->output.i_aspect = p_vout->render.i_aspect;
/* Try to open the real video output */
psz_filter = config_GetPszVariable( VOUT_FILTER_VAR );
config_PutPszVariable( VOUT_FILTER_VAR, NULL );
psz_filter = config_GetPszVariable( "filter" );
config_PutPszVariable( "filter", NULL );
intf_WarnMsg( 1, "filter: spawning the real video output" );
......@@ -145,7 +145,7 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma, p_vout->render.i_aspect );
config_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
config_PutPszVariable( "filter", psz_filter );
if( psz_filter ) free( psz_filter );
/* Everything failed */
......
......@@ -2,7 +2,7 @@
* transform.c : transform image plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: transform.c,v 1.7 2002/02/24 20:51:09 gbazin Exp $
* $Id: transform.c,v 1.8 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -126,10 +126,10 @@ static int vout_Create( vout_thread_t *p_vout )
/* Look what method was requested */
if( !(psz_method = psz_method_tmp
= config_GetPszVariable( VOUT_FILTER_VAR )) )
= config_GetPszVariable( "filter" )) )
{
intf_ErrMsg( "vout error: configuration variable %s empty",
VOUT_FILTER_VAR );
"filter" );
return( 1 );
}
......@@ -194,8 +194,8 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->output.i_aspect = p_vout->render.i_aspect;
/* Try to open the real video output */
psz_filter = config_GetPszVariable( VOUT_FILTER_VAR );
config_PutPszVariable( VOUT_FILTER_VAR, NULL );
psz_filter = config_GetPszVariable( "filter" );
config_PutPszVariable( "filter", NULL );
intf_WarnMsg( 1, "filter: spawning the real video output" );
......@@ -216,7 +216,7 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->render.i_chroma, p_vout->render.i_aspect );
}
config_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
config_PutPszVariable( "filter", psz_filter );
if( psz_filter ) free( psz_filter );
/* Everything failed */
......
......@@ -2,7 +2,7 @@
* wall.c : Wall video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: wall.c,v 1.14 2002/02/27 03:47:56 sam Exp $
* $Id: wall.c,v 1.15 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -130,10 +130,10 @@ static int vout_Create( vout_thread_t *p_vout )
/* Look what method was requested */
if( !(psz_method = psz_method_tmp
= config_GetPszVariable( VOUT_FILTER_VAR )) )
= config_GetPszVariable( "filter" )) )
{
intf_ErrMsg( "vout error: configuration variable %s empty",
VOUT_FILTER_VAR );
"filter" );
return( 1 );
}
......@@ -283,8 +283,8 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->output.i_aspect = p_vout->render.i_aspect;
/* Try to open the real video output */
psz_filter = config_GetPszVariable( VOUT_FILTER_VAR );
config_PutPszVariable( VOUT_FILTER_VAR, NULL );
psz_filter = config_GetPszVariable( "filter" );
config_PutPszVariable( "filter", NULL );
intf_WarnMsg( 1, "filter: spawning the real video outputs" );
......@@ -339,7 +339,7 @@ static int vout_Init( vout_thread_t *p_vout )
intf_ErrMsg( "vout error: failed to get %ix%i vout threads",
p_vout->p_sys->i_col, p_vout->p_sys->i_row );
RemoveAllVout( p_vout );
config_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
config_PutPszVariable( "filter", psz_filter );
if( psz_filter ) free( psz_filter );
return 0;
}
......@@ -348,7 +348,7 @@ static int vout_Init( vout_thread_t *p_vout )
}
}
config_PutPszVariable( VOUT_FILTER_VAR, psz_filter );
config_PutPszVariable( "filter", psz_filter );
if( psz_filter ) free( psz_filter );
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
......
......@@ -2,7 +2,7 @@
* ggi.c : GGI plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: ggi.c,v 1.15 2002/02/24 20:51:09 gbazin Exp $
* $Id: ggi.c,v 1.16 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -396,7 +396,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
}
/* Open display */
psz_display = config_GetPszVariable( VOUT_DISPLAY_VAR );
psz_display = config_GetPszVariable( "display" );
p_vout->p_sys->p_display = ggiOpen( psz_display, NULL );
if( psz_display ) free( psz_display );
......@@ -410,8 +410,8 @@ static int OpenDisplay( vout_thread_t *p_vout )
/* Find most appropriate mode */
p_vout->p_sys->mode.frames = 2; /* 2 buffers */
p_vout->p_sys->mode.visible.x = config_GetIntVariable( VOUT_WIDTH_VAR );
p_vout->p_sys->mode.visible.y = config_GetIntVariable( VOUT_HEIGHT_VAR );
p_vout->p_sys->mode.visible.x = config_GetIntVariable( "width" );
p_vout->p_sys->mode.visible.y = config_GetIntVariable( "height" );
p_vout->p_sys->mode.virt.x = GGI_AUTO;
p_vout->p_sys->mode.virt.y = GGI_AUTO;
p_vout->p_sys->mode.size.x = GGI_AUTO;
......
This diff is collapsed.
......@@ -87,7 +87,7 @@ void
GnomeMenubarPreferencesActivate (GtkMenuItem *menuitem,
gpointer user_data)
{
GtkPreferencesShow( GTK_WIDGET( menuitem ), NULL, "intf_window" );
GtkPreferencesActivate( menuitem, "intf_window" );
}
......
This diff is collapsed.
......@@ -11,6 +11,5 @@ GtkWidget* create_intf_disc (void);
GtkWidget* create_intf_network (void);
GtkWidget* create_intf_playlist (void);
GtkWidget* create_intf_jump (void);
GtkWidget* create_intf_preferences (void);
GtkWidget* create_intf_open (void);
GtkWidget* create_intf_messages (void);
This diff is collapsed.
......@@ -2,7 +2,7 @@
* gtk_display.c: Gtk+ tools for main interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_display.c,v 1.18 2002/03/06 01:20:56 stef Exp $
* $Id: gtk_display.c,v 1.19 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -147,7 +147,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
p_input_bank->pp_input[0]->psz_source );
p_channel = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ), "network_channel_box" ) );
if( config_GetIntVariable( INPUT_NETWORK_CHANNEL_VAR ) )
if( config_GetIntVariable( "network_channel" ) )
{
gtk_widget_show( GTK_WIDGET( p_channel ) );
}
......@@ -193,7 +193,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
}
else
{
if( config_GetIntVariable( INPUT_NETWORK_CHANNEL_VAR ) )
if( config_GetIntVariable( "network_channel" ) )
{
gtk_widget_show( GTK_WIDGET( p_network_box ) );
......
This diff is collapsed.
......@@ -10,5 +10,4 @@ GtkWidget* create_intf_disc (void);
GtkWidget* create_intf_network (void);
GtkWidget* create_intf_jump (void);
GtkWidget* create_intf_playlist (void);
GtkWidget* create_intf_preferences (void);
GtkWidget* create_intf_messages (void);
......@@ -2,7 +2,7 @@
* gtk_open.c : functions to handle file/disc/network open widgets.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_open.c,v 1.18 2002/03/04 02:26:23 stef Exp $
* $Id: gtk_open.c,v 1.19 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -72,7 +72,7 @@ gboolean GtkFileOpenShow( GtkWidget *widget,
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_fileopen ),
"p_intf", p_intf );
if( (psz_path = config_GetPszVariable( INTF_PATH_VAR )) )
if( (psz_path = config_GetPszVariable( "search_path" )) )
gtk_file_selection_set_filename( GTK_FILE_SELECTION(
p_intf->p_sys->p_fileopen ), psz_path );
if( psz_path ) free( psz_path );
......@@ -153,7 +153,7 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data )
{
char *psz_dvd_device;
if( (psz_dvd_device = config_GetPszVariable( INPUT_DVD_DEVICE_VAR )) )
if( (psz_dvd_device = config_GetPszVariable( "dvd_device" )) )
gtk_entry_set_text(
GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton),
"disc_name" ) ), psz_dvd_device );
......@@ -167,7 +167,7 @@ void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data )
{
char *psz_vcd_device;
if( (psz_vcd_device = config_GetPszVariable( INPUT_VCD_DEVICE_VAR )) )
if( (psz_vcd_device = config_GetPszVariable( "vcd_device" )) )
gtk_entry_set_text(
GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton),
"disc_name" ) ), psz_vcd_device );
......@@ -272,9 +272,9 @@ gboolean GtkNetworkOpenShow( GtkWidget *widget,
gtk_spin_button_set_value( GTK_SPIN_BUTTON( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_network ), "network_port" ) ),
config_GetIntVariable( INPUT_PORT_VAR ) );
config_GetIntVariable( "server_port" ) );
psz_channel_server = config_GetPszVariable( INPUT_CHANNEL_SERVER_VAR );
psz_channel_server = config_GetPszVariable( "channel_server" );
if( psz_channel_server )
gtk_entry_set_text( GTK_ENTRY( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_network ), "network_channel" ) ),
......@@ -283,11 +283,11 @@ gboolean GtkNetworkOpenShow( GtkWidget *widget,
gtk_spin_button_set_value( GTK_SPIN_BUTTON( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_network ), "network_channel_port" ) ),
config_GetIntVariable( INPUT_CHANNEL_PORT_VAR ) );
config_GetIntVariable( "channel_port" ) );
gtk_toggle_button_set_active( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_network ), "network_channel_check" ),
config_GetIntVariable( INPUT_NETWORK_CHANNEL_VAR ) );
config_GetIntVariable( "network_channel" ) );
}
gtk_widget_show( p_intf->p_sys->p_network );
......@@ -337,7 +337,7 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data )
/* Manage channel server */
b_channel = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(
lookup_widget( GTK_WIDGET(button), "network_channel_check" ) ) );
config_PutIntVariable( INPUT_NETWORK_CHANNEL_VAR, b_channel );
config_PutIntVariable( "network_channel", b_channel );
if( b_channel )
{
char * psz_channel;
......@@ -353,10 +353,10 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data )
i_channel_port = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(
lookup_widget( GTK_WIDGET(button), "network_channel_port" ) ) );
config_PutPszVariable( INPUT_CHANNEL_SERVER_VAR, psz_channel );
config_PutPszVariable( "channel_server", psz_channel );
if( i_channel_port < 65536 )
{
config_PutIntVariable( INPUT_CHANNEL_PORT_VAR, i_channel_port );
config_PutIntVariable( "channel_port", i_channel_port );
}
p_intf->p_sys->b_playing = 1;
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* gtk_control.h: prototypes for control functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_preferences.h,v 1.2 2001/05/15 14:49:48 stef Exp $
* $Id: gtk_preferences.h,v 1.3 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
......@@ -22,8 +22,4 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
gboolean GtkPreferencesShow ( GtkWidget *, GdkEventButton *, gpointer );
void GtkPreferencesOk ( GtkButton *, gpointer );
void GtkPreferencesApply ( GtkButton *, gpointer );
void GtkPreferencesCancel ( GtkButton *, gpointer );
void GtkPreferencesActivate( GtkMenuItem *, gpointer );
void GtkPreferencesActivate( GtkMenuItem *, gpointer );
......@@ -2,7 +2,7 @@
* xmga.c : X11 MGA plugin for vlc
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: xmga.c,v 1.6 2002/02/24 20:51:10 gbazin Exp $
* $Id: xmga.c,v 1.7 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -267,9 +267,9 @@ static int vout_Create( vout_thread_t *p_vout )
return( 1 );
}
/* Open display, unsing the VOUT_DISPLAY_VAR config variable or the DISPLAY
/* Open display, unsing the "display" config variable or the DISPLAY
* environment variable */
psz_display = config_GetPszVariable( VOUT_DISPLAY_VAR );
psz_display = config_GetPszVariable( "display" );
p_vout->p_sys->p_display = XOpenDisplay( psz_display );
if( p_vout->p_sys->p_display == NULL ) /* error */
......
......@@ -2,7 +2,7 @@
* mpeg_ps.c : Program Stream input module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: mpeg_ps.c,v 1.5 2002/03/04 23:56:37 massiot Exp $
* $Id: mpeg_ps.c,v 1.6 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -216,11 +216,11 @@ static int PSInit( input_thread_t * p_input )
case MPEG1_AUDIO_ES:
case MPEG2_AUDIO_ES:
if( config_GetIntVariable( INPUT_CHANNEL_VAR )
if( config_GetIntVariable( "input_channel" )
== (p_es->i_id & 0x1F) ||
( config_GetIntVariable( INPUT_CHANNEL_VAR ) < 0
( config_GetIntVariable( "input_channel" ) < 0
&& !(p_es->i_id & 0x1F) ) )
switch( config_GetIntVariable( INPUT_AUDIO_VAR ) )
switch( config_GetIntVariable( "input_audio" ) )
{
case -1:
case REQUESTED_MPEG:
......@@ -229,11 +229,11 @@ static int PSInit( input_thread_t * p_input )
break;
case AC3_AUDIO_ES:
if( config_GetIntVariable( INPUT_CHANNEL_VAR )
if( config_GetIntVariable( "input_channel" )
== ((p_es->i_id & 0xF00) >> 8) ||
( config_GetIntVariable( INPUT_CHANNEL_VAR ) < 0
( config_GetIntVariable( "input_channel" ) < 0
&& !((p_es->i_id & 0xF00) >> 8) ) )
switch( config_GetIntVariable( INPUT_AUDIO_VAR ) )
switch( config_GetIntVariable( "input_audio" ) )
{
case -1:
case REQUESTED_AC3:
......@@ -242,7 +242,7 @@ static int PSInit( input_thread_t * p_input )
break;
case DVD_SPU_ES:
if( config_GetIntVariable( INPUT_SUBTITLE_VAR )
if( config_GetIntVariable( "input_subtitle" )
== ((p_es->i_id & 0x1F00) >> 8) )
{
input_SelectES( p_input, p_es );
......@@ -250,11 +250,11 @@ static int PSInit( input_thread_t * p_input )
break;
case LPCM_AUDIO_ES:
if( config_GetIntVariable( INPUT_CHANNEL_VAR )
if( config_GetIntVariable( "input_channel" )
== ((p_es->i_id & 0x1F00) >> 8) ||
( config_GetIntVariable( INPUT_CHANNEL_VAR ) < 0
( config_GetIntVariable( "input_channel" ) < 0
&& !((p_es->i_id & 0x1F00) >> 8) ) )
switch( config_GetIntVariable( INPUT_AUDIO_VAR ) )
switch( config_GetIntVariable( "input_audio" ) )
{
case -1:
case REQUESTED_LPCM:
......
......@@ -2,7 +2,7 @@
* vpar_synchro.c : frame dropping routines
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: vpar_synchro.c,v 1.7 2002/02/24 20:51:10 gbazin Exp $
* $Id: vpar_synchro.c,v 1.8 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -534,7 +534,7 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type,
static int SynchroType( void )
{
char psz_synchro_tmp[5];
char * psz_synchro = config_GetPszVariable( VPAR_SYNCHRO_VAR );
char * psz_synchro = config_GetPszVariable( "vpar_synchro" );
if( psz_synchro == NULL )
{
......
......@@ -2,7 +2,7 @@
* ipv4.c: IPv4 network abstraction layer
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: ipv4.c,v 1.4 2002/03/04 23:56:37 massiot Exp $
* $Id: ipv4.c,v 1.5 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Mathias Kretschmer <mathias@research.att.com>
......@@ -163,7 +163,7 @@ static int OpenUDP( network_socket_t * p_socket )
if( i_bind_port == 0 )
{
i_bind_port = config_GetIntVariable( INPUT_PORT_VAR );
i_bind_port = config_GetIntVariable( "server_port" );
}
/* Open a SOCK_DGRAM (UDP) socket, in the AF_INET domain, automatic (0)
......
......@@ -2,7 +2,7 @@
* ipv6.c: IPv6 network abstraction layer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: ipv6.c,v 1.1 2002/03/04 23:56:37 massiot Exp $
* $Id: ipv6.c,v 1.2 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Alexis Guillard <alexis.guillard@bt.com>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -148,7 +148,7 @@ static int OpenUDP( network_socket_t * p_socket )
if( i_bind_port == 0 )
{
i_bind_port = config_GetIntVariable( INPUT_PORT_VAR );
i_bind_port = config_GetIntVariable( "server_port" );
}
/* Open a SOCK_DGRAM (UDP) socket, in the AF_INET6 domain, automatic (0)
......
......@@ -142,14 +142,14 @@ static int vout_Create( vout_thread_t *p_vout )
memset( p_vout->p_sys, 0, sizeof( vout_sys_t ) );
p_vout->b_fullscreen =
config_GetIntVariable( VOUT_FULLSCREEN_VAR );
config_GetIntVariable( "fullscreen" );
p_vout->p_sys->i_mode =
config_GetIntVariable( VOUT_NOOVERLAY_VAR ) ?
config_GetIntVariable( "nooverlay" ) ?
MODE_NORMAL_MEM : MODE_VIDEO_OVERLAY;
p_vout->p_sys->dim.w =
config_GetIntVariable( VOUT_WIDTH_VAR );
config_GetIntVariable( "width" );
p_vout->p_sys->dim.h =
config_GetIntVariable( VOUT_HEIGHT_VAR );
config_GetIntVariable( "height" );
/* init display and create window */
if( QNXInitDisplay( p_vout ) || QNXCreateWnd( p_vout ) )
......
......@@ -2,7 +2,7 @@
* logger.c : file logging plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: logger.c,v 1.4 2002/02/24 20:51:10 gbazin Exp $
* $Id: logger.c,v 1.5 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -103,10 +103,9 @@ static int intf_Open( intf_thread_t *p_intf )
}
if( !(psz_filename = psz_filename_tmp
= config_GetPszVariable( INTF_METHOD_VAR )) )
= config_GetPszVariable( "intf" )) )
{
intf_ErrMsg( "intf error: configuration variable %s empty",
INTF_METHOD_VAR );
intf_ErrMsg( "intf error: configuration variable intf empty" );
return -1;
}
......
......@@ -164,7 +164,7 @@ static int VCDOpen( struct input_thread_s *p_input )
free( psz_orig );
return -1;
}
psz_source = config_GetPszVariable( INPUT_VCD_DEVICE_VAR );
psz_source = config_GetPszVariable( "vcd_device" );
}
/* test the type of file given */
......
......@@ -2,7 +2,7 @@
* xcommon.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: xcommon.c,v 1.20 2002/03/03 20:42:21 gbazin Exp $
* $Id: xcommon.c,v 1.21 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -295,9 +295,9 @@ static int vout_Create( vout_thread_t *p_vout )
return( 1 );
}
/* Open display, unsing the VOUT_DISPLAY_VAR config variable or the DISPLAY
/* Open display, unsing the "display" config variable or the DISPLAY
* environment variable */
psz_display = config_GetPszVariable( VOUT_DISPLAY_VAR );
psz_display = config_GetPszVariable( "display" );
p_vout->p_sys->p_display = XOpenDisplay( psz_display );
if( p_vout->p_sys->p_display == NULL ) /* error */
......
......@@ -2,7 +2,7 @@
* audio_output.c : audio output thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: audio_output.c,v 1.81 2002/03/04 22:18:25 gbazin Exp $
* $Id: audio_output.c,v 1.82 2002/03/11 07:23:09 gbazin Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
......@@ -96,15 +96,15 @@ aout_thread_t *aout_CreateThread( int *pi_status, int i_channels, int i_rate )
}
p_aout->i_latency = 0;
p_aout->i_rate = config_GetIntVariable( AOUT_RATE_VAR );
p_aout->i_channels = config_GetIntVariable( AOUT_MONO_VAR ) ? 1 : 2;
p_aout->i_rate = config_GetIntVariable( "rate" );
p_aout->i_channels = config_GetIntVariable( "mono" ) ? 1 : 2;
/* Maybe we should pass this setting in argument */
p_aout->i_format = AOUT_FORMAT_DEFAULT;
/* special setting for ac3 pass-through mode */
/* FIXME is it necessary ? (cf ac3_adec.c) */
if( config_GetIntVariable( AOUT_SPDIF_VAR ) && p_main->b_ac3 )
if( config_GetIntVariable( "spdif" ) && p_main->b_ac3 )
{
intf_WarnMsg( 4, "aout info: setting ac3 spdif" );
p_aout->i_format = AOUT_FMT_AC3;
......@@ -118,7 +118,7 @@ aout_thread_t *aout_CreateThread( int *pi_status, int i_channels, int i_rate )
}
/* Choose the best module */
psz_name = config_GetPszVariable( AOUT_METHOD_VAR );
psz_name = config_GetPszVariable( "aout" );
p_aout->p_module = module_Need( MODULE_CAPABILITY_AOUT, psz_name,
(void *)p_aout );
if( psz_name ) free( psz_name );
......@@ -149,7 +149,7 @@ aout_thread_t *aout_CreateThread( int *pi_status, int i_channels, int i_rate )
}
/* Initialize the volume level */
p_aout->i_volume = config_GetIntVariable( AOUT_VOLUME_VAR );
p_aout->i_volume = config_GetIntVariable( "volume" );
p_aout->i_savedvolume = 0;
/* FIXME: maybe it would be cleaner to change SpawnThread prototype
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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