]> git.sesse.net Git - vlc/commitdiff
misc: use var_Inherit
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 23 Jan 2010 17:45:13 +0000 (19:45 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 23 Jan 2010 18:04:48 +0000 (20:04 +0200)
17 files changed:
modules/control/globalhotkeys/win32.c
modules/control/globalhotkeys/xcb.c
modules/meta_engine/folder.c
modules/misc/audioscrobbler.c
modules/misc/dummy/interface.c
modules/misc/freetype.c
modules/misc/gnutls.c
modules/misc/logger.c
modules/misc/notify/growl_udp.c
modules/misc/notify/msn.c
modules/misc/notify/notify.c
modules/misc/notify/telepathy.c
modules/misc/notify/xosd.c
modules/misc/osd/simple.c
modules/misc/svg.c
modules/mux/asf.c
modules/services_discovery/sap.c

index e73bfcbd1030a06dadbcf24b337953645a56db35..e5baeaf2be079dfcb7d86cd6d5c5b5909851325a 100644 (file)
@@ -175,7 +175,7 @@ static void *Thread( void *p_data )
         if( asprintf( &psz_hotkey, "global-%s", p_hotkey->psz_action ) < 0 )
             break;
 
-        i_key = config_GetInt( p_intf, psz_hotkey );
+        i_key = var_InheritInteger( p_intf, psz_hotkey );
 
         free( psz_hotkey );
 
index d31af2cc2a16734c91608e3b12b43aa573e99eef..4049e63d754f308001618acadb589b9457edc946 100644 (file)
@@ -344,7 +344,7 @@ static bool Mapping( intf_thread_t *p_intf )
             break;
 
         const int i_vlc_action = p_hotkey->i_action;
-        const int i_vlc_key = config_GetInt( p_intf, psz_hotkey );
+        const int i_vlc_key = var_InheritInteger( p_intf, psz_hotkey );
         free( psz_hotkey );
 
         if( !i_vlc_key )
index fbb96190ca070aa59a16a5dda91dcc1289313d58..ae98de9438bf2ce6de5dfb3e2cd0c1fa9bb10984 100644 (file)
@@ -113,7 +113,7 @@ static int FindMeta( vlc_object_t *p_this )
     {
         if( i == -1 ) /* higher priority : configured filename */
         {
-            char *psz_userfile = config_GetPsz( p_this, "album-art-filename" );
+            char *psz_userfile = var_InheritString( p_this, "album-art-filename" );
             if( !psz_userfile )
                 continue;
             snprintf( psz_filename, MAX_PATH, "%s%s", psz_path, psz_userfile );
index bae7d6c0cecccc3dca7e1f63b6769bfce9eed91a..fa359489adb102c9a823360f18088f56d29e2863 100644 (file)
@@ -731,11 +731,11 @@ static int Handshake( intf_thread_t *p_this )
     intf_thread_t       *p_intf                 = ( intf_thread_t* ) p_this;
     intf_sys_t          *p_sys                  = p_this->p_sys;
 
-    psz_username = config_GetPsz( p_this, "lastfm-username" );
+    psz_username = var_InheritString( p_this, "lastfm-username" );
     if( !psz_username )
         return VLC_ENOMEM;
 
-    psz_password = config_GetPsz( p_this, "lastfm-password" );
+    psz_password = var_InheritString( p_this, "lastfm-password" );
     if( !psz_password )
     {
         free( psz_username );
@@ -788,7 +788,7 @@ static int Handshake( intf_thread_t *p_this )
     strncpy( p_sys->psz_auth_token, psz_auth_token, 33 );
     free( psz_auth_token );
 
-    psz_scrobbler_url = config_GetPsz( p_this, "scrobbler-url" );
+    psz_scrobbler_url = var_InheritString( p_this, "scrobbler-url" );
     if( !psz_scrobbler_url )
     {
         free( psz_username );
index 3843dd8a286d2c01418042a15ca421b0ba5ae8a1..11e46889b9ccf877a65990d4a121d70f5c092f8e 100644 (file)
@@ -43,7 +43,7 @@ int  OpenIntf ( vlc_object_t *p_this )
 
 #ifdef WIN32
     bool b_quiet;
-    b_quiet = config_GetInt( p_intf, "dummy-quiet" );
+    b_quiet = var_InheritBool( p_intf, "dummy-quiet" );
     if( !b_quiet )
         CONSOLE_INTRO_MSG;
 #endif
index ca49cbc7499ab2b583c40b134c34243af9e370b6..c448b1b81630917ea7c19c922d9f80ae49dfcecd 100644 (file)
@@ -1348,7 +1348,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
     p_region_out->i_x = p_region_in->i_x;
     p_region_out->i_y = p_region_in->i_y;
 
-    if( config_GetInt( p_filter, "freetype-yuvp" ) )
+    if( var_InheritBool( p_filter, "freetype-yuvp" ) )
         Render( p_filter, p_region_out, p_lines, result.x, result.y );
     else
         RenderYUVA( p_filter, p_region_out, p_lines, result.x, result.y );
@@ -2320,7 +2320,7 @@ static int RenderHtml( filter_t *p_filter, subpicture_region_t *p_region_out,
                      */
                     if(( rv == VLC_SUCCESS ) && ( i_len > 0 ))
                     {
-                        if( config_GetInt( p_filter, "freetype-yuvp" ) )
+                        if( var_InheritBool( p_filter, "freetype-yuvp" ) )
                         {
                             Render( p_filter, p_region_out, p_lines,
                                     result.x, result.y );
index 2b8658e4019f49b60e01b471e90757d65958948a..132eb5b71304178f52de008b9ab1f5f1af37e505 100644 (file)
@@ -976,7 +976,7 @@ gnutls_ServerSessionPrepare( tls_server_t *p_server )
         gnutls_certificate_server_set_request (session, GNUTLS_CERT_REQUIRE);
 
     /* Session resumption support */
-    i_val = config_GetInt (p_server, "gnutls-cache-timeout");
+    i_val = var_InheritInteger (p_server, "gnutls-cache-timeout");
     if (i_val >= 0)
         gnutls_db_set_cache_expiration (session, i_val);
     gnutls_db_set_retrieve_function( session, cb_fetch );
@@ -1077,7 +1077,7 @@ static int OpenServer (vlc_object_t *obj)
     if( p_sys == NULL )
         return VLC_ENOMEM;
 
-    p_sys->i_cache_size = config_GetInt (obj, "gnutls-cache-size");
+    p_sys->i_cache_size = var_InheritInteger (obj, "gnutls-cache-size");
     if (p_sys->i_cache_size == -1) /* Duh, config subsystem exploded?! */
         p_sys->i_cache_size = 0;
     p_sys->p_cache = calloc (p_sys->i_cache_size,
index be1cec2fdfeefefcd52680069b5db4a8e649ef69..ddc7f359831816e9275a8e12ef8bd152e9aa18cb 100644 (file)
@@ -232,7 +232,7 @@ static int Open( vlc_object_t *p_this )
 
     if( p_sys->msg.i_mode != MODE_SYSLOG )
     {
-        char *psz_file = config_GetPsz( p_intf, "logfile" );
+        char *psz_file = var_InheritString( p_intf, "logfile" );
         if( !psz_file )
         {
 #ifdef __APPLE__
index 7ba388a5797ad337698050d17fe675d17969eae5..2717a096d669c79cbc1896fa1eaa6f137e76d253 100644 (file)
@@ -260,9 +260,9 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
     int i, i_handle;
     struct md5_s md5;
     intf_thread_t *p_intf = (intf_thread_t *)p_this;
-    char *psz_password = config_GetPsz( p_intf, "growl-password" );
-    char *psz_server = config_GetPsz( p_intf, "growl-server" );
-    int i_port = config_GetInt( p_intf, "growl-port" );
+    char *psz_password = var_InheritString( p_intf, "growl-password" );
+    char *psz_server = var_InheritString( p_intf, "growl-server" );
+    int i_port = var_InheritInteger( p_intf, "growl-port" );
     strcpy( (char*)(p_data+i_offset), psz_password );
     i = i_offset + strlen(psz_password);
 
index 82d538ac21563e3554b5c14ff07216b9376c892d..afc0c71b158c1905e58f8e54985c1e339c44b473 100644 (file)
@@ -93,7 +93,7 @@ static int Open( vlc_object_t *p_this )
     if( !p_intf->p_sys )
         return VLC_ENOMEM;
 
-    p_intf->p_sys->psz_format = config_GetPsz( p_intf, "msn-format" );
+    p_intf->p_sys->psz_format = var_InheritString( p_intf, "msn-format" );
     if( !p_intf->p_sys->psz_format )
     {
         msg_Dbg( p_intf, "no format provided" );
index 99453869273ea5ac82fdaa7afd19d5767e7dc5ce..cd79bc00fdd2b33dabae2eaa753415b13e9c7c60 100644 (file)
@@ -307,7 +307,7 @@ static int Notify( vlc_object_t *p_this, const char *psz_temp, GdkPixbuf *pix,
     notification = notify_notification_new( _("Now Playing"),
                                             psz_temp, NULL, NULL );
     notify_notification_set_timeout( notification,
-                                     config_GetInt(p_this, "notify-timeout") );
+                                var_InheritInteger(p_this, "notify-timeout") );
     notify_notification_set_urgency( notification, NOTIFY_URGENCY_LOW );
     if( pix )
     {
index c89c58792e96a998ac2a69e467ea80f67fd227e5..c6233ac7d54ed43192f0b90b7169fc463bc09dc4 100644 (file)
@@ -112,7 +112,7 @@ static int Open( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    p_intf->p_sys->psz_format = config_GetPsz( p_intf, "telepathy-format" );
+    p_intf->p_sys->psz_format = var_InheritString( p_intf, "telepathy-format" );
     if( !p_intf->p_sys->psz_format )
     {
         msg_Dbg( p_intf, "no format provided" );
index 832ccccd240756bd64e34f61b7833ab868715989..24e0ff413e393a59ddd84b16ee75b39ad9b4e3c0 100644 (file)
@@ -122,8 +122,8 @@ static int Open( vlc_object_t *p_this )
         return VLC_ENOMEM;
 
     /* Initialize library */
-    psz_font = config_GetPsz( p_intf, "xosd-font" );
-    psz_colour = config_GetPsz( p_intf, "xosd-colour" );
+    psz_font = var_InheritString( p_intf, "xosd-font" );
+    psz_colour = var_InheritString( p_intf, "xosd-colour" );
 
     p_osd = xosd_create( 1 );
     if( p_osd == NULL )
@@ -141,14 +141,14 @@ static int Open( vlc_object_t *p_this )
     xosd_set_font( p_osd, psz_font );
     xosd_set_colour( p_osd, psz_colour );
     xosd_set_timeout( p_osd, 3 );
-    xosd_set_pos( p_osd, config_GetInt( p_intf, "xosd-position" ) ?
+    xosd_set_pos( p_osd, var_InheritInteger( p_intf, "xosd-position" ) ?
                                         XOSD_bottom: XOSD_top );
     xosd_set_horizontal_offset( p_osd,
-                    config_GetInt( p_intf, "xosd-text-offset" ) );
+                    var_InheritInteger( p_intf, "xosd-text-offset" ) );
     xosd_set_vertical_offset( p_osd,
-                    config_GetInt( p_intf, "xosd-text-offset" ) );
+                    var_InheritInteger( p_intf, "xosd-text-offset" ) );
     xosd_set_shadow_offset( p_osd,
-                    config_GetInt( p_intf, "xosd-shadow-offset" ));
+                    var_InheritInteger( p_intf, "xosd-shadow-offset" ));
 
     /* Initialize to NULL */
     xosd_display( p_osd, 0, XOSD_string, "XOSD interface initialized" );
index 992efe90fb94b534a7019567fd713cd105d7a1a8..cb51521c8c523786a63dd5201b33b3c04613e6e7 100644 (file)
@@ -75,7 +75,7 @@ int osd_parser_simpleOpen( vlc_object_t *p_this )
         result = fscanf(fd, "%24s %255s", action, path );
 
         /* override images path ? */
-        psz_path = config_GetPsz( p_this, "osdmenu-file-path" );
+        psz_path = var_InheritString( p_this, "osdmenu-file-path" );
         if( psz_path )
         {
             /* psz_path is not null and therefor path cannot be NULL
index ced1c23bb5fcfeb93c38408caacfa1a18d9fc7d3..bcf18b03b027261ad67b1ed45557cfd03e573763 100644 (file)
@@ -158,7 +158,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
     char *psz_template;
     FILE *file;
 
-    psz_filename = config_GetPsz( p_filter, "svg-template-file" );
+    psz_filename = var_InheritString( p_filter, "svg-template-file" );
     if( !psz_filename || (psz_filename[0] == 0) )
     {
         /* No filename. Use a default value. */
index b1d498b5087218ee622be93d518d45ac57a28ce8..64b74025e18e7576380861bc4639aa447bdc7f01 100644 (file)
@@ -220,8 +220,8 @@ static int Open( vlc_object_t *p_this )
     p_sys->p_tracks     = vlc_array_new();
 
     p_sys->b_write_header = true;
-    p_sys->i_packet_size = config_GetInt( p_mux, "sout-asf-packet-size" );
-    p_sys->i_bitrate_override = config_GetInt( p_mux, "sout-asf-bitrate-override" );
+    p_sys->i_packet_size = var_InheritInteger( p_mux, "sout-asf-packet-size" );
+    p_sys->i_bitrate_override = var_InheritInteger( p_mux, "sout-asf-bitrate-override" );
     msg_Dbg( p_mux, "Packet size %d", p_sys->i_packet_size);
     if (p_sys->i_bitrate_override)
         msg_Dbg( p_mux, "Bitrate override %"PRId64, p_sys->i_bitrate_override);
index 1f1989941dbfb8caec9b0c04364b345ec5be70c7..03fe88732839a45897bf0552981dba7eb97d1953 100644 (file)
@@ -447,7 +447,7 @@ static void Close( vlc_object_t *p_this )
     FREENULL( p_sys->pi_fd );
 
 #if 0
-    if( config_GetInt( p_sd, "sap-cache" ) )
+    if( var_InheritBool( p_sd, "sap-cache" ) )
     {
         CacheSave( p_sd );
     }