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

misc: use var_Inherit

parent 23c9bffb
......@@ -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 );
......
......@@ -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 )
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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
......
......@@ -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 );
......
......@@ -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,
......
......@@ -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__
......
......@@ -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);
......
......@@ -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" );
......
......@@ -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 )
{
......
......@@ -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" );
......
......@@ -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" );
......
......@@ -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
......
......@@ -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. */
......
......@@ -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);
......
......@@ -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 );
}
......
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