[vlc-devel] commit: libvlc: config_Get -> var_Inherit ( Rémi Denis-Courmont )
git version control
git at videolan.org
Mon Jan 18 18:40:26 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jan 18 19:19:56 2010 +0200| [95759bad03b6ab0c6e9f02ce346680d2c7bd760a] | committer: Rémi Denis-Courmont
libvlc: config_Get -> var_Inherit
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=95759bad03b6ab0c6e9f02ce346680d2c7bd760a
---
src/audio_output/output.c | 2 +-
src/input/decoder.c | 2 +-
src/input/decoder_synchro.c | 4 ++--
src/misc/action.c | 2 +-
src/misc/pthread.c | 4 ++--
src/misc/threads.c | 4 ++--
src/osd/osd.c | 13 +++++++++----
src/stream_output/stream_output.c | 2 +-
8 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 82ab3a7..8abdf7d 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -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;
diff --git a/src/input/decoder.c b/src/input/decoder.c
index ab6ee4c..6cf4358 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -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;
diff --git a/src/input/decoder_synchro.c b/src/input/decoder_synchro.c
index 2fbe453..8bb9d73 100644
--- a/src/input/decoder_synchro.c
+++ b/src/input/decoder_synchro.c
@@ -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;
diff --git a/src/misc/action.c b/src/misc/action.c
index 92f8b97..1f2657e 100644
--- a/src/misc/action.c
+++ b/src/misc/action.c
@@ -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
diff --git a/src/misc/pthread.c b/src/misc/pthread.c
index ee874da..4522db0 100644
--- a/src/misc/pthread.c
+++ b/src/misc/pthread.c
@@ -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;
diff --git a/src/misc/threads.c b/src/misc/threads.c
index acc2d4f..291b3f3 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -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( ¶m, 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;
diff --git a/src/osd/osd.c b/src/osd/osd.c
index 4240ce3..0a53bd4 100644
--- a/src/osd/osd.c
+++ b/src/osd/osd.c
@@ -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
diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index 32b64cc..ab1918d 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -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;
More information about the vlc-devel
mailing list