Commit 95759bad authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

libvlc: config_Get -> var_Inherit

parent 36312a90
......@@ -43,7 +43,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
audio_sample_format_t * p_format )
{
/* Retrieve user defaults. */
int i_rate = config_GetInt( p_aout, "aout-rate" );
int i_rate = var_InheritInteger( p_aout, "aout-rate" );
vlc_value_t val, text;
/* kludge to avoid a fpu error when rate is 0... */
if( i_rate == 0 ) i_rate = -1;
......
......@@ -2174,7 +2174,7 @@ static aout_buffer_t *aout_new_buffer( decoder_t *p_dec, int i_samples )
if( p_owner->p_aout_input == NULL )
{
const int i_force_dolby = config_GetInt( p_dec, "force-dolby-surround" );
const int i_force_dolby = var_InheritInteger( p_dec, "force-dolby-surround" );
audio_sample_format_t format;
aout_input_t *p_aout_input;
aout_instance_t *p_aout;
......
......@@ -166,8 +166,8 @@ decoder_synchro_t * decoder_SynchroInit( decoder_t *p_dec, int i_frame_rate )
return NULL;
p_synchro->p_dec = p_dec;
p_synchro->b_no_skip = !config_GetInt( p_dec, "skip-frames" );
p_synchro->b_quiet = config_GetInt( p_dec, "quiet-synchro" );
p_synchro->b_no_skip = !var_InheritBool( p_dec, "skip-frames" );
p_synchro->b_quiet = var_InheritBool( p_dec, "quiet-synchro" );
/* We use a fake stream pattern, which is often right. */
p_synchro->i_n_p = p_synchro->i_eta_p = DEFAULT_NB_P;
......
......@@ -85,7 +85,7 @@ int vlc_InitActions (libvlc_int_t *libvlc)
for (size_t i = 0; i < libvlc_actions_count; i++)
{
keys[i].psz_action = libvlc_actions[i].name;
keys[i].i_key = config_GetInt (libvlc, libvlc_actions[i].name );
keys[i].i_key = var_InheritInteger (libvlc, libvlc_actions[i].name );
keys[i].i_action = libvlc_actions[i].value;
#ifndef NDEBUG
if (i > 0
......
......@@ -534,10 +534,10 @@ void vlc_threads_setup (libvlc_int_t *p_libvlc)
if (!initialized)
{
#ifndef __APPLE__
if (config_GetInt (p_libvlc, "rt-priority"))
if (var_InheritBool (p_libvlc, "rt-priority"))
#endif
{
rt_offset = config_GetInt (p_libvlc, "rt-offset");
rt_offset = var_InheritInteger (p_libvlc, "rt-offset");
rt_priorities = true;
}
initialized = true;
......
......@@ -117,7 +117,7 @@ int __vlc_thread_set_priority( vlc_object_t *p_this, const char * psz_file,
#if defined( LIBVLC_USE_PTHREAD )
# ifndef __APPLE__
if( config_GetInt( p_this, "rt-priority" ) > 0 )
if( var_InheritBool( p_this, "rt-priority" ) )
# endif
{
int i_error, i_policy;
......@@ -125,7 +125,7 @@ int __vlc_thread_set_priority( vlc_object_t *p_this, const char * psz_file,
memset( &param, 0, sizeof(struct sched_param) );
if( config_GetType( p_this, "rt-offset" ) )
i_priority += config_GetInt( p_this, "rt-offset" );
i_priority += var_InheritInteger( p_this, "rt-offset" );
if( i_priority <= 0 )
{
param.sched_priority = (-1) * i_priority;
......
......@@ -390,9 +390,12 @@ void __osd_MenuActivate( vlc_object_t *p_this )
p_button->p_current_state->p_pic );
osd_SetMenuUpdate( p_osd, true );
osd_SetMenuVisible( p_osd, true );
osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc), config_GetInt( p_osd, p_button->psz_action ) );
osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc),
var_InheritInteger( p_osd, p_button->psz_action ) );
#if defined(OSD_MENU_DEBUG)
msg_Dbg( p_osd, "select (%d, %s)", config_GetInt( p_osd, p_button->psz_action ), p_button->psz_action );
msg_Dbg( p_osd, "select (%d, %s)",
var_InheritInteger( p_osd, p_button->psz_action ),
p_button->psz_action );
#endif
}
vlc_mutex_unlock( p_lock );
......@@ -536,7 +539,8 @@ void __osd_MenuUp( vlc_object_t *p_this )
*/
if( p_button->b_range )
{
osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc), config_GetInt(p_osd, p_button->psz_action) );
osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc),
var_InheritInteger(p_osd, p_button->psz_action) );
#if defined(OSD_MENU_DEBUG)
msg_Dbg( p_osd, "select (%d, %s)", val.i_int, p_button->psz_action );
#endif
......@@ -601,7 +605,8 @@ void __osd_MenuDown( vlc_object_t *p_this )
*/
if( p_button->b_range )
{
osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc), config_GetInt(p_osd, p_button->psz_action_down) );
osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc),
var_InheritInteger(p_osd, p_button->psz_action_down) );
#if defined(OSD_MENU_DEBUG)
msg_Dbg( p_osd, "select (%d, %s)", val.i_int, p_button->psz_action_down );
#endif
......
......@@ -90,7 +90,7 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, const char *psz_des
else
{
psz_chain = sout_stream_url_to_chain(
config_GetInt(p_parent, "sout-display") > 0, psz_dest );
var_InheritBool(p_parent, "sout-display"), psz_dest );
}
if(!psz_chain)
return NULL;
......
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