]> git.sesse.net Git - vlc/commitdiff
libvlc: config_Get -> var_Inherit
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 18 Jan 2010 17:19:56 +0000 (19:19 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 18 Jan 2010 17:19:56 +0000 (19:19 +0200)
src/audio_output/output.c
src/input/decoder.c
src/input/decoder_synchro.c
src/misc/action.c
src/misc/pthread.c
src/misc/threads.c
src/osd/osd.c
src/stream_output/stream_output.c

index 82ab3a7510613fbb716f757da1a514c8e957305f..8abdf7daf1fd0578b8f7e31f7519b5261e24fd0d 100644 (file)
@@ -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;
index ab6ee4c0d7eb3e949dd7983c4179ac06b7615d5b..6cf435877f40003ee1a67e7d8a0a44bd9e16b19a 100644 (file)
@@ -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;
index 2fbe453467aa9265b8edfd9cbfa5a66f42708fc3..8bb9d73ad84e0c80020c8e8614e18597ba485794 100644 (file)
@@ -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;
index 92f8b97fb72605774862c4b0e17ce93a359465e7..1f2657e1563d921a00de8f628a822b720c0643c2 100644 (file)
@@ -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
index ee874dabe424c7d0d226ccc01966081a21194857..4522db07e953e3ddece631de7a58c5d2c938d500 100644 (file)
@@ -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;
index acc2d4f2ef8460ea565f7b9f723f3443bb7e3d15..291b3f3437c6d03fe27ef5b6b55d1e8e51135429 100644 (file)
@@ -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;
index 4240ce3a69fee432b5c65e4b034b17167423917a..0a53bd4b9a7fb03ae98a0a47f51dc99703652583 100644 (file)
@@ -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
index 32b64ccfed555b7bf63e056955d22a1fe71e009f..ab1918dd82161d8c50a1026d8194cb6858e3f275 100644 (file)
@@ -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;