Commit c40571df authored by Gildas Bazin's avatar Gildas Bazin

This is the first part of the new configuration architecture for vlc.
Two other parts will follow soon:
- config file implementation
- gtk configuration interface.

This part won't change much for end-users as these changes are mostly
internal, you will however notice that the command line interface has
changed. It will maybe be less user-friendly as I almost removed the
short options but it shouldn't a big problem when the config file is
implemented.

What as changed is that it is really easy now to add configuration
options to vlc. Plugins can also implement configuration options. All
you have to do is to declare a MODULE_CONFIG section in your plugin.
If you want to know more about this look at configuration.h and for some
example: main.c, dsp.c or xvideo.c

It would be nice if every developper could now start using configuration
options in there plugins and also enhance old plugins.

That's it, now let's hope I didn't break too many things ;-)
parent d9d659fc
......@@ -137,7 +137,7 @@ INTERFACE := main interface intf_msg intf_playlist intf_eject
INPUT := input input_ext-dec input_ext-intf input_dec input_programs input_clock mpeg_system
VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures
AUDIO_OUTPUT := audio_output aout_common aout_ext-dec aout_spdif
MISC := mtime modules netutils iso_lang
MISC := mtime modules configuration netutils iso_lang
C_OBJ := $(INTERFACE:%=src/interface/%.o) \
$(INPUT:%=src/input/%.o) \
......
......@@ -2,7 +2,7 @@
* audio_output.h : audio output thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: audio_output.h,v 1.41 2002/01/14 12:15:10 asmax Exp $
* $Id: audio_output.h,v 1.42 2002/02/24 20:51:09 gbazin Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
......@@ -158,10 +158,6 @@ typedef struct aout_thread_s
* will be played */
mtime_t date;
/* Path to the audio output device (default is set to "/dev/dsp") */
char * psz_device;
int i_fd;
/* The current volume */
int i_volume;
int i_savedvolume;
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.75 2002/02/20 23:23:53 sam Exp $
* $Id: common.h,v 1.76 2002/02/24 20:51:09 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -98,9 +98,12 @@ typedef struct plugin_info_s * p_plugin_info_t;
struct playlist_s;
struct playlist_item_s;
struct module_s;
struct module_config_s;
typedef struct playlist_s * p_playlist_t;
typedef struct playlist_item_s * p_playlist_item_t;
typedef struct module_s * p_module_t;
typedef struct module_config_s * p_module_config_t;
/* Interface */
struct intf_thread_s;
......@@ -441,10 +444,13 @@ typedef struct module_symbols_s
struct aout_bank_s* p_aout_bank;
struct vout_bank_s* p_vout_bank;
int ( * main_GetIntVariable ) ( char *, int );
char * ( * main_GetPszVariable ) ( char *, char * );
void ( * main_PutIntVariable ) ( char *, int );
void ( * main_PutPszVariable ) ( char *, char * );
int ( * config_GetIntVariable ) ( const char * );
char * ( * config_GetPszVariable ) ( const char * );
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 intf_subscription_s * ( * intf_MsgSub ) ( void );
void ( * intf_MsgUnsub ) ( struct intf_subscription_s * );
......@@ -463,9 +469,9 @@ typedef struct module_symbols_s
void ( * intf_UrlDecode ) ( char * );
int ( * intf_Eject ) ( const char * );
void ( * msleep ) ( mtime_t );
mtime_t ( * mdate ) ( void );
char * ( * mstrtime ) ( char *, mtime_t );
void ( * msleep ) ( mtime_t );
mtime_t ( * mdate ) ( void );
char * ( * mstrtime ) ( char *, mtime_t );
int ( * network_ChannelCreate )( void );
int ( * network_ChannelJoin ) ( int );
......@@ -574,8 +580,8 @@ typedef struct module_symbols_s
char * ( * DecodeLanguage ) ( u16 );
struct module_s * ( * module_Need ) ( int, char *, void * );
void ( * module_Unneed ) ( struct module_s * );
struct module_s * ( * module_Need ) ( int, char *, void * );
void ( * module_Unneed ) ( struct module_s * );
} module_symbols_t;
......
......@@ -27,13 +27,6 @@
*
* - Symbols should begin with a prefix indicating in which module they are
* used, such as INTF_, VOUT_ or ADEC_.
*
* - Regarding environment variables, which are used as initialization
* parameters for threads :
* + variable names should end with '_VAR'
* + environment variable default value should end with '_DEFAULT'
* + values having a special meaning with '_VAL'
*
*/
/*****************************************************************************
......@@ -54,31 +47,10 @@
* outputting an error message (in second) */
#define THREAD_COND_TIMEOUT 5
/* Environment variable containing the memcpy method */
#define MEMCPY_METHOD_VAR "vlc_memcpy"
/*
* Paths
*/
#define MAX_PLUGIN_COUNT 32
/*****************************************************************************
* Interface configuration
*****************************************************************************/
/* Environment variable containing the display method */
#define INTF_METHOD_VAR "vlc_intf"
#define INTF_METHOD_DEFAULT "gtk"
/* Environment variable used to store startup script name and default value */
#define INTF_INIT_SCRIPT_VAR "vlcrc"
#define INTF_INIT_SCRIPT_DEFAULT ".vlcrc"
/* Environment variable used to store channels file and default value */
#define INTF_CHANNELS_VAR "vlc_channels"
#define INTF_CHANNELS_DEFAULT "vlc.channels"
/* Base delay in micro second for interface sleeps */
#define INTF_IDLE_SLEEP ((int)(0.050*CLOCK_FREQ))
......@@ -86,21 +58,10 @@
#define INTF_GAMMA_STEP .1
#define INTF_GAMMA_LIMIT 3
/* Maximum number of channels */
#define INTF_MAX_CHANNELS 10
/* Default search path for interface file browser */
#define INTF_PATH_VAR "vlc_search_path"
#define INTF_PATH_DEFAULT ""
/*****************************************************************************
* Input thread configuration
*****************************************************************************/
/* Environment variable containing the input method */
#define INPUT_METHOD_VAR "vlc_input"
#define INPUT_METHOD_DEFAULT "ps"
/* XXX?? */
#define INPUT_IDLE_SLEEP ((int)(0.100*CLOCK_FREQ))
......@@ -124,45 +85,10 @@
/* Maximum memory the input is allowed to use (20 MB) */
#define INPUT_MAX_ALLOCATION 20971520
/* Default network protocol */
#define INPUT_NETWORK_PROTOCOL_VAR "vlc_network_protocol"
#define INPUT_NETWORK_PROTOCOL_DEFAULT "ts"
/* Default input port */
#define INPUT_PORT_VAR "vlc_server_port"
#define INPUT_PORT_DEFAULT 1234
/* FIXME : Delete those ! */
/* Default remote server */
#define INPUT_SERVER_VAR "vlc_server"
#define INPUT_SERVER_DEFAULT "138.195.143.220"
/* Broadcast mode */
#define INPUT_BROADCAST_VAR "vlc_broadcast"
#define INPUT_BROADCAST_DEFAULT 0
/* Default broadcast address */
#define INPUT_BCAST_ADDR_VAR "vlc_broadcast_addr"
#define INPUT_BCAST_ADDR_DEFAULT "138.195.143.255"
/* Channels mode */
#define INPUT_NETWORK_CHANNEL_VAR "vlc_channel"
#define INPUT_NETWORK_CHANNEL_DEFAULT 0
/*
* Channel method
*/
/* Default network interface and environment variable */
#define INPUT_IFACE_VAR "vlc_iface"
#define INPUT_IFACE_DEFAULT "eth0"
/* Default server and port */
#define INPUT_CHANNEL_SERVER_VAR "vlc_channel_server"
#define INPUT_CHANNEL_SERVER_DEFAULT "138.195.143.120"
#define INPUT_CHANNEL_PORT_VAR "vlc_channel_port"
#define INPUT_CHANNEL_PORT_DEFAULT 6010
/* Delay between channel changes - this is required to avoid flooding the
* channel server */
#define INPUT_CHANNEL_CHANGE_DELAY (mtime_t)(5*CLOCK_FREQ)
......@@ -171,19 +97,6 @@
* mark it to be presented */
#define DEFAULT_PTS_DELAY (mtime_t)(.2*CLOCK_FREQ)
/* DVD defaults */
#define INPUT_DVD_DEVICE_VAR "vlc_dvd_device"
#define INPUT_TITLE_VAR "vlc_input_title"
#define INPUT_CHAPTER_VAR "vlc_input_chapter"
#define INPUT_ANGLE_VAR "vlc_input_angle"
#define INPUT_AUDIO_VAR "vlc_input_audio"
#define INPUT_CHANNEL_VAR "vlc_input_channel"
#define INPUT_SUBTITLE_VAR "vlc_input_subtitle"
/* VCD defaults */
#define INPUT_VCD_DEVICE_VAR "vlc_vcd_device"
/*****************************************************************************
* Audio configuration
*****************************************************************************/
......@@ -191,14 +104,6 @@
/* Maximum number of audio output threads */
#define AOUT_MAX_THREADS 10
/* Environment variable containing the audio output method */
#define AOUT_METHOD_VAR "vlc_aout"
#define AOUT_METHOD_DEFAULT "dsp"
/* Environment variable used to store dsp device name, and default value */
#define AOUT_DSP_VAR "vlc_dsp"
#define AOUT_DSP_DEFAULT "/dev/dsp"
/* Default audio output format (AOUT_FMT_S16_NE = Native Endianess) */
#define AOUT_FORMAT_DEFAULT AOUT_FMT_S16_NE
/* #define AOUT_FORMAT_DEFAULT AOUT_FMT_S8 */
......@@ -208,32 +113,11 @@
/* #define AOUT_FORMAT_DEFAULT AOUT_FMT_U16_BE */
/* #define AOUT_FORMAT_DEFAULT AOUT_FMT_U16_LE */
/* Environment variable for stereo, and default value */
#define AOUT_STEREO_VAR "vlc_stereo"
#define AOUT_STEREO_DEFAULT 1
/* Environment variable for spdif mode */
#define AOUT_SPDIF_VAR "vlc_spdif"
#define AOUT_SPDIF_DEFAULT 0
/* Environment variable containing the AC3 downmix method */
#define DOWNMIX_METHOD_VAR "vlc_downmix"
/* Environment variable containing the AC3 IMDCT method */
#define IMDCT_METHOD_VAR "vlc_imdct"
/* Volume */
#define VOLUME_DEFAULT 512
#define VOLUME_STEP 128
#define VOLUME_MAX 1024
/* Environment variable for volume */
#define AOUT_VOLUME_VAR "vlc_volume"
/* Environment variable for output rate, and default value */
#define AOUT_RATE_VAR "vlc_audio_rate"
#define AOUT_RATE_DEFAULT 44100
/* Number of audio output frames contained in an audio output fifo.
* (AOUT_FIFO_SIZE + 1) must be a power of 2, in order to optimise the
* %(AOUT_FIFO_SIZE + 1) operation with an &AOUT_FIFO_SIZE.
......@@ -251,10 +135,6 @@
* - long, in order to perform the buffer calculations as few as possible */
#define AOUT_BUFFER_DURATION 100000
/* Environment variable for audio decoders */
#define ADEC_MPEG_VAR "vlc_mpeg_adec"
#define ADEC_AC3_VAR "vlc_ac3_adec"
/*****************************************************************************
* Video configuration
*****************************************************************************/
......@@ -266,39 +146,6 @@
* Default settings for video output threads
*/
/* Environment variable containing the display method */
#define VOUT_METHOD_VAR "vlc_vout"
#define VOUT_METHOD_DEFAULT "x11"
/* Environment variable containing the display method */
#define VOUT_FILTER_VAR "vlc_filter"
#define VOUT_FILTER_DEFAULT "x11"
/* Environment variable containing the motion compensation method */
#define MOTION_METHOD_VAR "vlc_motion"
/* Environment variable containing the IDCT method */
#define IDCT_METHOD_VAR "vlc_idct"
/* Environment variable containing the YUV method */
#define YUV_METHOD_VAR "vlc_yuv"
/* Environment variable used in place of DISPLAY if available */
#define VOUT_DISPLAY_VAR "vlc_display"
/* Default dimensions for display window - these dimensions are enough for the
* standard width and height broadcasted MPEG-2 streams or DVDs */
#define VOUT_WIDTH_VAR "vlc_width"
#define VOUT_WIDTH_DEFAULT 720
#define VOUT_HEIGHT_VAR "vlc_height"
#define VOUT_HEIGHT_DEFAULT 576
#define VOUT_DEPTH_VAR "vlc_depth"
#define VOUT_DEPTH_DEFAULT 15
/* Default SPU margin is -1, which means we don't force their position */
#define VOUT_SPUMARGIN_VAR "vlc_spumargin"
#define VOUT_SPUMARGIN_DEFAULT -1
/* Multiplier value for aspect ratio calculation (2^7 * 3^3 * 5^3) */
#define VOUT_ASPECT_FACTOR 432000
......@@ -323,22 +170,6 @@
* joined. */
#define VOUT_MAX_AREAS 5
/* Environment variable for grayscale output mode, and default value */
#define VOUT_GRAYSCALE_VAR "vlc_grayscale"
#define VOUT_GRAYSCALE_DEFAULT 0
/* Environment variable for fullscreen mode, and default value */
#define VOUT_FULLSCREEN_VAR "vlc_fullscreen"
#define VOUT_FULLSCREEN_DEFAULT 0
/* Environment variable for overlay mode, and default value */
#define VOUT_NOOVERLAY_VAR "vlc_nooverlay"
#define VOUT_NOOVERLAY_DEFAULT 0
/* Default gamma */
#define VOUT_GAMMA_VAR "vlc_gamma"
#define VOUT_GAMMA_DEFAULT 0.
/* Default fonts */
#define VOUT_DEFAULT_FONT "default8x9.psf"
#define VOUT_LARGE_FONT "default8x16.psf"
......@@ -379,13 +210,6 @@
/* The default video output window title */
#define VOUT_TITLE "VideoLAN Client " VERSION
/* Environment variable for framebuffer device, and default value */
#define VOUT_FB_DEV_VAR "vlc_fb_dev"
#define VOUT_FB_DEV_DEFAULT "/dev/fb0"
/* Environment variable for XVideo adaptor, and default value */
#define VOUT_XVADAPTOR_VAR "vlc_xv_adaptor"
/*****************************************************************************
* Video parser configuration
*****************************************************************************/
......@@ -403,9 +227,6 @@
/* Maximum number of macroblocks in a picture. */
#define MAX_MB 2048
/* The synchro variable name */
#define VPAR_SYNCHRO_VAR "vlc_synchro"
/*****************************************************************************
* Video decoder configuration
*****************************************************************************/
......@@ -415,9 +236,6 @@
/* Maximum range of values out of the IDCT + motion compensation. */
#define VDEC_CROPRANGE 2048
/* Environment variable containing the SMP value. */
#define VDEC_SMP_VAR "vlc_smp"
/* No SMP by default, since it slows down things on non-smp machines. */
#define VDEC_SMP_DEFAULT 0
......@@ -436,23 +254,137 @@
* queue are printed, but not sent to the threads */
#define INTF_MSG_QSIZE 256
/* Interface warnig message level */
#define INTF_WARNING_VAR "vlc_warning_level"
#define INTF_WARNING_DEFAULT 0
/****************************************************************************
* Playlist defaults
* 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.
*
****************************************************************************/
/* Launch on start-up */
#define PLAYLIST_STARTUP_VAR "vlc_playlist_on_start_up"
#define PLAYLIST_STARTUP_DEFAULT 0
/*
* Interface option names
*/
/* Enqueue drag'n dropped item */
#define PLAYLIST_ENQUEUE_VAR "vlc_playlist_enqueue"
#define PLAYLIST_ENQUEUE_DEFAULT 0
/* 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_TITLE_VAR "input_title"
#define INPUT_CHAPTER_VAR "input_chapter"
#define INPUT_ANGLE_VAR "input_angle"
#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"
/*
* 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 "vlc_playlist_loop"
#define PLAYLIST_LOOP_DEFAULT 0
#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"
/*****************************************************************************
* configuration.h : configuration management module
* This file describes the programming interface for the configuration module.
* 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 $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Macros used to build the configuration structure.
*****************************************************************************/
/* Mandatory last part of the structure */
#define MODULE_CONFIG_ITEM_END 0x000 /* End of config */
/* 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 */
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 */
int i_value; /* Option value */
void * p_callback; /* Function to call when commiting a change */
boolean_t b_dirty; /* Dirty flag to indicate a config change */
} module_config_t;
/*****************************************************************************
* Prototypes - these methods are used to get, set or manipulate configuration
* data.
*****************************************************************************/
#ifndef PLUGIN
int config_GetIntVariable( const char *psz_name );
char * config_GetPszVariable( const char *psz_name );
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 );
#else
# define config_GetIntVariable p_symbols->config_GetIntVariable
# define config_PutIntVariable p_symbols->config_PutIntVariable
# define config_GetPszVariable p_symbols->config_GetPszVariable
# define config_PutPszVariable p_symbols->config_PutPszVariable
# define config_Duplicate p_symbols->config_Duplicate
# define config_FindConfig p_symbols->config_FindConfig
#endif
/*****************************************************************************
* Macros used to build the configuration structure.
*
* Note that internally we support only 2 types of config data: int and string.
* The other types declared here just map to one of these 2 basic types but
* have the advantage of also providing very good hints to a configuration
* interface so as to make it more user friendly.
* The configuration structure also includes category hints. These hints can
* provide a configuration inteface with some very useful data and also allow
* for a more user friendly interface.
*****************************************************************************/
#define MODULE_CONFIG_START \
static module_config_t p_config[] = {
#define MODULE_CONFIG_STOP \
{ MODULE_CONFIG_ITEM_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 },
#define ADD_SUBCATEGORY_HINT( text, longtext ) \
{ MODULE_CONFIG_ITEM_SUBCATEGORY, NULL, text, longtext, NULL, 0, NULL, 0 },
#define END_SUBCATEGORY_HINT \
{ MODULE_CONFIG_ITEM_SUBCATEGORY_END, NULL, NULL, NULL, NULL, 0, NULL, 0 },
#define ADD_STRING( name, value, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_STRING, name, text, longtext, value, 0, \
p_callback, 0 },
#define ADD_FILE( name, psz_value, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_FILE, name, text, longtext, psz_value, 0, \
p_callback, 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 },
#define ADD_INTEGER( name, i_value, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_INTEGER, name, text, longtext, NULL, i_value, \
p_callback, 0 },
#define ADD_BOOL( name, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_BOOL, name, text, longtext, NULL, 0, p_callback, 0 },
......@@ -3,7 +3,7 @@
* Declaration and extern access to global program object.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: main.h,v 1.29 2002/02/15 13:32:52 sam Exp $
* $Id: main.h,v 1.30 2002/02/24 20:51:09 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -38,7 +38,6 @@ typedef struct main_s
/* Global properties */
int i_argc; /* command line arguments count */
char ** ppsz_argv; /* command line arguments */
char ** ppsz_env; /* environment variables */
char * psz_arg0; /* program name (whithout path) */
u32 i_cpu_capabilities; /* CPU extensions */
......@@ -49,6 +48,7 @@ typedef struct main_s
boolean_t b_audio; /* is audio output allowed ? */
boolean_t b_video; /* is video output allowed ? */
boolean_t b_ac3;
boolean_t b_stereo;
mtime_t i_desync; /* relative desync of the audio ouput */
/* Fast memcpy plugin used */
......@@ -77,20 +77,3 @@ extern main_t *p_main;
*****************************************************************************/
#define FAST_MEMCPY p_main->pf_memcpy
#define FAST_MEMSET p_main->pf_memset
/*****************************************************************************
* Prototypes - these methods are used to get default values for some threads
* and modules.
*****************************************************************************/
#ifndef PLUGIN
int main_GetIntVariable( char *psz_name, int i_default );
char * main_GetPszVariable( char *psz_name, char *psz_default );
void main_PutIntVariable( char *psz_name, int i_value );
void main_PutPszVariable( char *psz_name, char *psz_value );
#else
# define main_GetIntVariable p_symbols->main_GetIntVariable
# define main_PutIntVariable p_symbols->main_PutIntVariable
# define main_GetPszVariable p_symbols->main_GetPszVariable
# define main_PutPszVariable p_symbols->main_PutPszVariable
#endif
......@@ -2,7 +2,7 @@
* modules.h : Module management functions.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.h,v 1.41 2002/02/15 13:32:52 sam Exp $
* $Id: modules.h,v 1.42 2002/02/24 20:51:09 gbazin Exp $
*