Commit 62fffadf authored by Antoine Cellerier's avatar Antoine Cellerier

Rename all sout_Cfg* stuff to config_Chain* (as it isn't really sout specific)

parent bebdb992
......@@ -407,3 +407,45 @@ int config_AutoSaveConfigFile( vlc_object_t * );
#define change_autosave() \
p_config[i_config].b_autosave = VLC_TRUE;
/****************************************************************************
* config_chain_t:
****************************************************************************/
struct config_chain_t
{
config_chain_t *p_next;
char *psz_name;
char *psz_value;
};
#define config_ChainParse( a, b, c, d ) __config_ChainParse( VLC_OBJECT(a), b, c, d )
VLC_EXPORT( void, __config_ChainParse, ( vlc_object_t *, char *psz_prefix, const char **ppsz_options, config_chain_t * ) );
VLC_EXPORT( char *, config_ChainCreate, ( char **, config_chain_t **, char * ) );
VLC_EXPORT( void, config_ChainDestroy, ( config_chain_t * ) );
static inline config_chain_t *config_chain_find( config_chain_t *p_cfg, char *psz_name )
{
while( p_cfg && strcmp( p_cfg->psz_name, psz_name ) )
{
p_cfg = p_cfg->p_next;
}
return p_cfg;
}
static inline char *config_chain_find_value( config_chain_t *p_cfg, char *psz_name )
{
while( p_cfg && strcmp( p_cfg->psz_name, psz_name ) )
{
p_cfg = p_cfg->p_next;
}
if( p_cfg && p_cfg->psz_value )
{
return( p_cfg->psz_value );
}
return NULL;
}
......@@ -52,21 +52,6 @@ struct sout_instance_t
sout_instance_sys_t *p_sys;
};
/****************************************************************************
* sout_cfg_t:
****************************************************************************/
struct sout_cfg_t
{
sout_cfg_t *p_next;
char *psz_name;
char *psz_value;
};
#define sout_CfgParse( a, b, c, d ) __sout_CfgParse( VLC_OBJECT(a), b, c, d )
VLC_EXPORT( void, __sout_CfgParse, ( vlc_object_t *, char *psz_prefix, const char **ppsz_options, sout_cfg_t * ) );
VLC_EXPORT( char *, sout_CfgCreate, ( char **, sout_cfg_t **, char * ) );
/****************************************************************************
* sout_stream_id_t: opaque (private for all sout_stream_t)
****************************************************************************/
......@@ -104,7 +89,7 @@ struct sout_access_out_t
sout_instance_t *p_sout;
char *psz_access;
sout_cfg_t *p_cfg;
config_chain_t *p_cfg;
int i_writes;
int64_t i_sent_bytes; ///< This is a "local" counter that is reset each
......@@ -134,7 +119,7 @@ struct sout_mux_t
sout_instance_t *p_sout;
char *psz_mux;
sout_cfg_t *p_cfg;
config_chain_t *p_cfg;
sout_access_out_t *p_access;
......@@ -208,7 +193,7 @@ struct sout_stream_t
sout_instance_t *p_sout;
char *psz_name;
sout_cfg_t *p_cfg;
config_chain_t *p_cfg;
char *psz_next;
/* Subpicture unit */
......@@ -312,32 +297,6 @@ struct announce_handler_t
/* End */
static inline sout_cfg_t *sout_cfg_find( sout_cfg_t *p_cfg, char *psz_name )
{
while( p_cfg && strcmp( p_cfg->psz_name, psz_name ) )
{
p_cfg = p_cfg->p_next;
}
return p_cfg;
}
static inline char *sout_cfg_find_value( sout_cfg_t *p_cfg, char *psz_name )
{
while( p_cfg && strcmp( p_cfg->psz_name, psz_name ) )
{
p_cfg = p_cfg->p_next;
}
if( p_cfg && p_cfg->psz_value )
{
return( p_cfg->psz_value );
}
return NULL;
}
/* Announce system */
VLC_EXPORT( int, sout_AnnounceRegister, (sout_instance_t *,session_descriptor_t*, announce_method_t* ) );
VLC_EXPORT(session_descriptor_t*,sout_AnnounceRegisterSDP, (sout_instance_t *,const char *, const char *, announce_method_t* ) );
......
......@@ -157,7 +157,7 @@ struct vout_thread_t
* these are handled like in transcode.c
* XXX: we might need to merge the two chains (v1 and v2 filters) */
char *psz_vfilters[MAX_VFILTERS];
sout_cfg_t *p_vfilters_cfg[MAX_VFILTERS];
config_chain_t *p_vfilters_cfg[MAX_VFILTERS];
int i_vfilters_cfg;
filter_t *pp_vfilters[MAX_VFILTERS];
......
......@@ -127,7 +127,7 @@ struct encoder_t
int i_tolerance; /* Bitrate tolerance */
/* Encoder config */
sout_cfg_t *p_cfg;
config_chain_t *p_cfg;
};
/**
......
......@@ -328,7 +328,7 @@ typedef struct sout_mux_sys_t sout_mux_sys_t;
typedef struct sout_stream_t sout_stream_t;
typedef struct sout_stream_sys_t sout_stream_sys_t;
typedef struct sout_cfg_t sout_cfg_t;
typedef struct config_chain_t config_chain_t;
typedef struct sap_session_t sap_session_t;
typedef struct sap_address_t sap_address_t;
typedef struct session_descriptor_t session_descriptor_t;
......
......@@ -58,7 +58,7 @@ struct filter_t
es_format_t fmt_out;
/* Filter configuration */
sout_cfg_t * p_cfg;
config_chain_t * p_cfg;
picture_t * ( * pf_video_filter ) ( filter_t *, picture_t * );
block_t * ( * pf_audio_filter ) ( filter_t *, block_t * );
......
......@@ -109,8 +109,8 @@ struct module_symbols_t
void (*__vout_OSDMessage_inner) (vlc_object_t *, int, char *, ...);
void (*vout_OSDSlider_inner) (vlc_object_t *, int, int , short);
void (*vout_OSDIcon_inner) (vlc_object_t *, int, short);
void (*__sout_CfgParse_inner) (vlc_object_t *, char *psz_prefix, const char **ppsz_options, sout_cfg_t *);
char * (*sout_CfgCreate_inner) (char **, sout_cfg_t **, char *);
void *__sout_CfgParse_deprecated;
void *sout_CfgCreate_deprecated;
sout_instance_t * (*__sout_NewInstance_inner) (vlc_object_t *, char *);
void (*sout_DeleteInstance_inner) (sout_instance_t *);
sout_packetizer_input_t * (*sout_InputNew_inner) (sout_instance_t *, es_format_t *);
......@@ -550,6 +550,9 @@ struct module_symbols_t
void *input_AskForArt_deprecated;
int (*playlist_AskForArtEnqueue_inner) (playlist_t *, input_item_t *);
uint32_t (*input_CurrentMetaFlags_inner) (vlc_meta_t *p_meta);
void (*__config_ChainParse_inner) (vlc_object_t *, char *psz_prefix, const char **ppsz_options, config_chain_t *);
void (*config_ChainDestroy_inner) (config_chain_t *);
char * (*config_ChainCreate_inner) (char **, config_chain_t **, char *);
};
# if defined (__PLUGIN__)
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
......@@ -641,8 +644,6 @@ struct module_symbols_t
# define __vout_OSDMessage (p_symbols)->__vout_OSDMessage_inner
# define vout_OSDSlider (p_symbols)->vout_OSDSlider_inner
# define vout_OSDIcon (p_symbols)->vout_OSDIcon_inner
# define __sout_CfgParse (p_symbols)->__sout_CfgParse_inner
# define sout_CfgCreate (p_symbols)->sout_CfgCreate_inner
# define __sout_NewInstance (p_symbols)->__sout_NewInstance_inner
# define sout_DeleteInstance (p_symbols)->sout_DeleteInstance_inner
# define sout_InputNew (p_symbols)->sout_InputNew_inner
......@@ -1025,6 +1026,9 @@ struct module_symbols_t
# define input_ItemAddOptionNoDup (p_symbols)->input_ItemAddOptionNoDup_inner
# define playlist_AskForArtEnqueue (p_symbols)->playlist_AskForArtEnqueue_inner
# define input_CurrentMetaFlags (p_symbols)->input_CurrentMetaFlags_inner
# define __config_ChainParse (p_symbols)->__config_ChainParse_inner
# define config_ChainDestroy (p_symbols)->config_ChainDestroy_inner
# define config_ChainCreate (p_symbols)->config_ChainCreate_inner
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
/******************************************************************
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
......@@ -1119,8 +1123,6 @@ struct module_symbols_t
((p_symbols)->__vout_OSDMessage_inner) = __vout_OSDMessage; \
((p_symbols)->vout_OSDSlider_inner) = vout_OSDSlider; \
((p_symbols)->vout_OSDIcon_inner) = vout_OSDIcon; \
((p_symbols)->__sout_CfgParse_inner) = __sout_CfgParse; \
((p_symbols)->sout_CfgCreate_inner) = sout_CfgCreate; \
((p_symbols)->__sout_NewInstance_inner) = __sout_NewInstance; \
((p_symbols)->sout_DeleteInstance_inner) = sout_DeleteInstance; \
((p_symbols)->sout_InputNew_inner) = sout_InputNew; \
......@@ -1503,7 +1505,12 @@ struct module_symbols_t
((p_symbols)->input_ItemAddOptionNoDup_inner) = input_ItemAddOptionNoDup; \
((p_symbols)->playlist_AskForArtEnqueue_inner) = playlist_AskForArtEnqueue; \
((p_symbols)->input_CurrentMetaFlags_inner) = input_CurrentMetaFlags; \
((p_symbols)->__config_ChainParse_inner) = __config_ChainParse; \
((p_symbols)->config_ChainDestroy_inner) = config_ChainDestroy; \
((p_symbols)->config_ChainCreate_inner) = config_ChainCreate; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \
(p_symbols)->__sout_CfgParse_deprecated = NULL; \
(p_symbols)->sout_CfgCreate_deprecated = NULL; \
(p_symbols)->vlc_input_item_GetInfo_deprecated = NULL; \
(p_symbols)->vlc_input_item_AddInfo_deprecated = NULL; \
(p_symbols)->__playlist_ItemNew_deprecated = NULL; \
......
......@@ -101,7 +101,7 @@ static int Open( vlc_object_t *p_this )
int i_flags;
vlc_value_t val;
sout_CfgParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg );
config_ChainParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg );
if( !p_access->psz_name )
{
......
......@@ -172,7 +172,7 @@ static int Open( vlc_object_t *p_this )
return VLC_ENOMEM ;
}
sout_CfgParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg );
config_ChainParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg );
/* p_access->psz_name = "hostname:port/filename" */
psz_bind_addr = psz_parser = strdup( p_access->psz_name );
......
......@@ -177,7 +177,7 @@ static int Open( vlc_object_t *p_this )
char *psz_genre = NULL;
char *psz_url = NULL;
sout_CfgParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg );
config_ChainParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg );
psz_accessname = psz_parser = strdup( p_access->psz_name );
......
......@@ -182,7 +182,7 @@ static int Open( vlc_object_t *p_this )
vlc_value_t val;
sout_CfgParse( p_access, SOUT_CFG_PREFIX,
config_ChainParse( p_access, SOUT_CFG_PREFIX,
ppsz_sout_options, p_access->p_cfg );
if( !( p_sys = malloc( sizeof( sout_access_out_sys_t ) ) ) )
......
......@@ -350,7 +350,7 @@ static int OpenEncoder( vlc_object_t *p_this )
p_enc->fmt_in.video.i_bits_per_pixel = 12;
p_enc->fmt_out.i_codec = VLC_FOURCC('d','r','a','c');
sout_CfgParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
/* Initialse the encoder context with the presets for SD576 - Standard
* Definition Digital (some parameters will be overwritten later on) */
......
......@@ -1526,7 +1526,7 @@ static int OpenEncoder( vlc_object_t *p_this )
p_enc->fmt_out.i_codec = VLC_FOURCC('d','v','b','s');
p_enc->fmt_out.subs.dvb.i_id = 1 << 16 | 1;
sout_CfgParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
p_sys->i_page_ver = 0;
p_sys->i_region_ver = 0;
......
......@@ -289,7 +289,7 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
p_context->dsp_mask |= FF_MM_SSE2;
}
sout_CfgParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
var_Get( p_enc, ENC_CFG_PREFIX "keyint", &val );
p_sys->i_key_int = val.i_int;
......
......@@ -619,7 +619,7 @@ static int OpenEncoder( vlc_object_t *p_this )
p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','2','0');
p_enc->fmt_out.i_codec = VLC_FOURCC('t','h','e','o');
sout_CfgParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
var_Get( p_enc, ENC_CFG_PREFIX "quality", &val );
i_quality = val.i_int;
......
......@@ -165,7 +165,7 @@ static int OpenEncoder( vlc_object_t *p_this )
p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
p_enc->fmt_out.i_codec = VLC_FOURCC('m','p','g','a');
sout_CfgParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
p_sys->p_twolame = twolame_init();
......
......@@ -792,7 +792,7 @@ static int OpenEncoder( vlc_object_t *p_this )
p_enc->fmt_in.i_codec = VLC_FOURCC('f','l','3','2');
p_enc->fmt_out.i_codec = VLC_FOURCC('v','o','r','b');
sout_CfgParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
var_Get( p_enc, ENC_CFG_PREFIX "quality", &val );
i_quality = val.i_int;
......
......@@ -576,7 +576,7 @@ static int Open ( vlc_object_t *p_this )
}
#endif
sout_CfgParse( p_enc, SOUT_CFG_PREFIX, ppsz_sout_options, p_enc->p_cfg );
config_ChainParse( p_enc, SOUT_CFG_PREFIX, ppsz_sout_options, p_enc->p_cfg );
p_enc->fmt_out.i_codec = VLC_FOURCC( 'h', '2', '6', '4' );
p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','2','0');
......
......@@ -104,6 +104,7 @@ void Timer::Notify()
if( p_intf->p_sys->b_intf_show )
{
p_main_interface->Raise();
p_main_interface->Show();
p_intf->p_sys->b_intf_show = VLC_FALSE;
}
......
......@@ -182,7 +182,7 @@ static int Open( vlc_object_t *p_this )
int i;
msg_Dbg( p_mux, "asf muxer opened" );
sout_CfgParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
config_ChainParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
p_mux->pf_control = Control;
p_mux->pf_addstream = AddStream;
......
......@@ -196,7 +196,7 @@ static int Open( vlc_object_t *p_this )
bo_t *box;
msg_Dbg( p_mux, "Mp4 muxer opend" );
sout_CfgParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
config_ChainParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
p_mux->pf_control = Control;
p_mux->pf_addstream = AddStream;
......
......@@ -149,7 +149,7 @@ static int Open( vlc_object_t *p_this )
vlc_value_t val;
msg_Info( p_mux, "Open" );
sout_CfgParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
config_ChainParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
p_mux->pf_control = Control;
p_mux->pf_addstream = AddStream;
......
......@@ -479,7 +479,7 @@ static int Open( vlc_object_t *p_this )
vlc_value_t val;
int i;
sout_CfgParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
config_ChainParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
p_sys = malloc( sizeof( sout_mux_sys_t ) );
if( !p_sys )
......
......@@ -84,7 +84,7 @@ static int Open( vlc_object_t *p_this )
char *psz_separator_block, *psz_separator;
msg_Dbg( p_mux, "Multipart jpeg muxer opened" );
sout_CfgParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
config_ChainParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
p_sys = p_mux->p_sys = malloc( sizeof(sout_mux_sys_t) );
p_sys->b_send_headers = VLC_TRUE;
......
......@@ -164,7 +164,7 @@ static int OpenOut( vlc_object_t *p_this )
out_sout_stream_sys_t *p_sys;
vlc_value_t val;
sout_CfgParse( p_stream, SOUT_CFG_PREFIX_OUT, ppsz_sout_options_out,
config_ChainParse( p_stream, SOUT_CFG_PREFIX_OUT, ppsz_sout_options_out,
p_stream->p_cfg );
p_sys = malloc( sizeof( out_sout_stream_sys_t ) );
......@@ -351,7 +351,7 @@ static int OpenIn( vlc_object_t *p_this )
return VLC_EGENERIC;
}
sout_CfgParse( p_stream, SOUT_CFG_PREFIX_IN, ppsz_sout_options_in,
config_ChainParse( p_stream, SOUT_CFG_PREFIX_IN, ppsz_sout_options_in,
p_stream->p_cfg );
var_Get( p_this->p_libvlc_global, "bridge-lock", &val );
......
......@@ -93,7 +93,7 @@ static int Open( vlc_object_t *p_this )
sout_stream_sys_t *p_sys;
vlc_value_t val;
sout_CfgParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
p_stream->p_cfg );
p_sys = malloc( sizeof( sout_stream_sys_t ) );
......
......@@ -79,7 +79,7 @@ static int Open( vlc_object_t *p_this )
{
sout_stream_t *p_stream = (sout_stream_t*)p_this;
sout_stream_sys_t *p_sys;
sout_cfg_t *p_cfg;
config_chain_t *p_cfg;
msg_Dbg( p_stream, "creating 'duplicate'" );
......
......@@ -145,7 +145,7 @@ static int Open( vlc_object_t *p_this )
sout_stream_sys_t *p_sys;
vlc_value_t val;
sout_CfgParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options, p_stream->p_cfg );
config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options, p_stream->p_cfg );
p_sys = malloc( sizeof( sout_stream_sys_t ) );
p_sys->i_count = 0;
......
......@@ -150,7 +150,7 @@ static int Open( vlc_object_t *p_this )
libvlc_global_data_t *p_libvlc_global = p_this->p_libvlc_global;
vlc_value_t val;
sout_CfgParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
p_stream->p_cfg );
p_sys = malloc( sizeof( sout_stream_sys_t ) );
......
......@@ -296,11 +296,12 @@ static int Open( vlc_object_t *p_this )
sout_stream_t *p_stream = (sout_stream_t*)p_this;
sout_instance_t *p_sout = p_stream->p_sout;
sout_stream_sys_t *p_sys = NULL;
sout_cfg_t *p_cfg = NULL;
config_chain_t *p_cfg = NULL;
vlc_value_t val;
vlc_bool_t b_rtsp = VLC_FALSE;
sout_CfgParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options, p_stream->p_cfg );
config_ChainParse( p_stream, SOUT_CFG_PREFIX,
ppsz_sout_options, p_stream->p_cfg );
p_sys = malloc( sizeof( sout_stream_sys_t ) );
......@@ -590,7 +591,7 @@ static int Open( vlc_object_t *p_this )
var_Get( p_stream, SOUT_CFG_PREFIX "sdp", &val );
if( *val.psz_string )
{
sout_cfg_t *p_cfg;
config_chain_t *p_cfg;
SDPHandleUrl( p_stream, val.psz_string );
......
......@@ -133,7 +133,7 @@ static int Open( vlc_object_t *p_this )
char *psz_mux_byext = NULL;
sout_CfgParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
p_stream->p_cfg );
var_Get( p_stream, SOUT_CFG_PREFIX "access", &val );
......
......@@ -189,7 +189,7 @@ static int Open( vlc_object_t *p_this )
return VLC_EGENERIC;
}
sout_CfgParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
p_stream->p_cfg );
var_Get( p_stream, SOUT_CFG_PREFIX "files", &val );
......
......@@ -372,18 +372,18 @@ struct sout_stream_sys_t
/* Audio */
vlc_fourcc_t i_acodec; /* codec audio (0 if not transcode) */
char *psz_aenc;
sout_cfg_t *p_audio_cfg;
config_chain_t *p_audio_cfg;
int i_sample_rate;
int i_channels;
int i_abitrate;
char *psz_afilters[TRANSCODE_FILTERS];
sout_cfg_t *p_afilters_cfg[TRANSCODE_FILTERS];
config_chain_t *p_afilters_cfg[TRANSCODE_FILTERS];
int i_afilters;
/* Video */
vlc_fourcc_t i_vcodec; /* codec video (0 if not transcode) */
char *psz_venc;
sout_cfg_t *p_video_cfg;
config_chain_t *p_video_cfg;
int i_vbitrate;
double f_scale;
double f_fps;
......@@ -391,12 +391,12 @@ struct sout_stream_sys_t
unsigned int i_height, i_maxheight;
vlc_bool_t b_deinterlace;
char *psz_deinterlace;
sout_cfg_t *p_deinterlace_cfg;
config_chain_t *p_deinterlace_cfg;
int i_threads;
vlc_bool_t b_high_priority;
vlc_bool_t b_hurry_up;
char *psz_vfilters[TRANSCODE_FILTERS];
sout_cfg_t *p_vfilters_cfg[TRANSCODE_FILTERS];
config_chain_t *p_vfilters_cfg[TRANSCODE_FILTERS];
int i_vfilters;
int i_crop_top;
......@@ -428,14 +428,14 @@ struct sout_stream_sys_t
vlc_fourcc_t i_scodec; /* codec spu (0 if not transcode) */
char *psz_senc;
vlc_bool_t b_soverlay;
sout_cfg_t *p_spu_cfg;
config_chain_t *p_spu_cfg;
spu_t *p_spu;
/* OSD Menu */
sout_stream_id_t *id_osd; /* extension for streaming OSD menus */
vlc_fourcc_t i_osdcodec; /* codec osd menu (0 if not transcode) */
char *psz_osdenc;
sout_cfg_t *p_osd_cfg;
config_chain_t *p_osd_cfg;
vlc_bool_t b_es_osd; /* VLC_TRUE when osd es is registered */
vlc_bool_t b_sout_osd;
......@@ -476,7 +476,7 @@ static int Open( vlc_object_t *p_this )
p_sys->i_master_drift = 0;
sout_CfgParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
config_ChainParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options,
p_stream->p_cfg );
/* Audio transcoding parameters */
......@@ -486,8 +486,8 @@ static int Open( vlc_object_t *p_this )
if( val.psz_string && *val.psz_string )
{
char *psz_next;
psz_next = sout_CfgCreate( &p_sys->psz_aenc, &p_sys->p_audio_cfg,
val.psz_string );
psz_next = config_ChainCreate( &p_sys->psz_aenc, &p_sys->p_audio_cfg,
val.psz_string );
if( psz_next ) free( psz_next );
}
if( val.psz_string ) free( val.psz_string );
......@@ -535,7 +535,7 @@ static int Open( vlc_object_t *p_this )
while( (psz_parser != NULL) && (*psz_parser != '\0')
&& (p_sys->i_afilters < TRANSCODE_FILTERS) )
{
psz_parser = sout_CfgCreate(
psz_parser = config_ChainCreate(
&p_sys->psz_afilters[p_sys->i_afilters],
&p_sys->p_afilters_cfg[p_sys->i_afilters],
psz_parser );
......@@ -557,7 +557,7 @@ static int Open( vlc_object_t *p_this )
if( val.psz_string && *val.psz_string )
{
char *psz_next;
psz_next = sout_CfgCreate( &p_sys->psz_venc, &p_sys->p_video_cfg,
psz_next = config_ChainCreate( &p_sys->psz_venc, &p_sys->p_video_cfg,
val.psz_string );
if( psz_next ) free( psz_next );
}
......@@ -607,7 +607,7 @@ static int Open( vlc_object_t *p_this )
while( (psz_parser != NULL) && (*psz_parser != '\0')
&& (p_sys->i_vfilters < TRANSCODE_FILTERS) )
{
psz_parser = sout_CfgCreate(
psz_parser = config_ChainCreate(
&p_sys->psz_vfilters[p_sys->i_vfilters],
&p_sys->p_vfilters_cfg[p_sys->i_vfilters],
psz_parser );
......@@ -631,7 +631,7 @@ static int Open( vlc_object_t *p_this )
if( val.psz_string && *val.psz_string )
{
char *psz_next;
psz_next = sout_CfgCreate( &p_sys->psz_deinterlace,
psz_next = config_ChainCreate( &p_sys->psz_deinterlace,
&p_sys->p_deinterlace_cfg,
val.psz_string );
if( psz_next ) free( psz_next );
......@@ -699,7 +699,7 @@ static int Open( vlc_object_t *p_this )
if( val.psz_string && *val.psz_string )
{
char *psz_next;
psz_next = sout_CfgCreate( &p_sys->psz_senc, &p_sys->p_spu_cfg,
psz_next = config_ChainCreate( &p_sys->psz_senc, &p_sys->p_spu_cfg,
val.psz_string );
if( psz_next ) free( psz_next );
}
......@@ -745,7 +745,7 @@ static int Open( vlc_object_t *p_this )
vlc_value_t osd_val;
char *psz_next;
psz_next = sout_CfgCreate( &p_sys->psz_osdenc,
psz_next = config_ChainCreate( &p_sys->psz_osdenc,
&p_sys->p_osd_cfg, strdup( "dvbsub") );
if( psz_next ) free( psz_next );
......@@ -795,7 +795,7 @@ static void Close( vlc_object_t * p_this )
while( p_sys->p_audio_cfg != NULL )
{
sout_cfg_t *p_next = p_sys->p_audio_cfg->p_next;
config_chain_t *p_next = p_sys->p_audio_cfg->p_next;
if( p_sys->p_audio_cfg->psz_name )
free( p_sys->p_audio_cfg->psz_name );
......@@ -809,7 +809,7 @@ static void Close( vlc_object_t * p_this )
while( p_sys->p_video_cfg != NULL )
{
sout_cfg_t *p_next = p_sys->p_video_cfg->p_next;
config_chain_t *p_next = p_sys->p_video_cfg->p_next;
if( p_sys->p_video_cfg->psz_name )
free( p_sys->p_video_cfg->psz_name );
......@@ -823,7 +823,7 @@ static void Close( vlc_object_t * p_this )
while( p_sys->p_deinterlace_cfg != NULL )
{
sout_cfg_t *p_next = p_sys->p_deinterlace_cfg->p_next;
config_chain_t *p_next = p_sys->p_deinterlace_cfg->p_next;
if( p_sys->p_deinterlace_cfg->psz_name )
free( p_sys->p_deinterlace_cfg->psz_name );
......@@ -837,7 +837,7 @@ static void Close( vlc_object_t * p_this )
while( p_sys->p_spu_cfg != NULL )
{
sout_cfg_t *p_next = p_sys->p_spu_cfg->p_next;
config_chain_t *p_next = p_sys->p_spu_cfg->p_next;
if( p_sys->p_spu_cfg->psz_name )
free( p_sys->p_spu_cfg->psz_name );
......@@ -853,7 +853,7 @@ static void Close( vlc_object_t * p_this )
while( p_sys->p_osd_cfg != NULL )
{
sout_cfg_t *p_next = p_sys->p_osd_cfg->p_next;
config_chain_t *p_next = p_sys->p_osd_cfg->p_next;
if( p_sys->p_osd_cfg->psz_name )
free( p_sys->p_osd_cfg->psz_name );
......
......@@ -167,7 +167,7 @@ static int Create( vlc_object_t *p_this )
/* needed to get options passed in transcode using the
* adjust{name=value} syntax */
sout_CfgParse( p_filter, "", ppsz_filter_options,
config_ChainParse( p_filter, "", ppsz_filter_options,
p_filter->p_cfg );
var_Create( p_filter, "contrast",
......
......@@ -2205,7 +2205,7 @@ static int OpenFilter( vlc_object_t *p_this )
p_filter->p_sys = (filter_sys_t *)p_vout;
p_vout->render.i_chroma = p_filter->fmt_in.video.i_chroma;
sout_CfgParse( p_filter, FILTER_CFG_PREFIX, ppsz_filter_options,
config_ChainParse( p_filter, FILTER_CFG_PREFIX, ppsz_filter_options,
p_filter->p_cfg );
var_Get( p_filter, FILTER_CFG_PREFIX "mode", &val );
var_Create( p_filter, "deinterlace-mode", VLC_VAR_STRING );
......
......@@ -137,7 +137,7 @@ static int Create( vlc_object_t *p_this )
p_filter->p_sys->p_pre_hough = NULL;
sout_CfgParse( p_filter, FILTER_PREFIX, ppsz_filter_options,
config_ChainParse( p_filter, FILTER_PREFIX, ppsz_filter_options,
p_filter->p_cfg );
var_Create( p_filter, FILTER_PREFIX "mode",
......
......@@ -324,6 +324,7 @@ SOURCES_libvlc_common = \
misc/unicode.c \
misc/cpu.c \
misc/configuration.c \
misc/configuration_chain.c \
misc/image.c \
misc/iso_lang.c \
misc/iso-639_def.h \
......
/*****************************************************************************
* configuration_chain.c : configuration module chain parsing stuff
*****************************************************************************
* Copyright (C) 2002-2006 the VideoLAN team
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
*
* 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