add_integer( "verbose", 0, VERBOSE_TEXT, VERBOSE_LONGTEXT,
false )
change_short('v')
+ change_volatile ()
add_obsolete_string( "verbose-objects" ) /* since 2.1.0 */
add_bool( "quiet", 0, QUIET_TEXT, QUIET_LONGTEXT, false )
change_short('q')
+ change_volatile ()
#if !defined(WIN32) && !defined(__OS2__)
add_bool( "daemon", 0, DAEMON_TEXT, DAEMON_LONGTEXT, true )
#endif
add_bool( "color", true, COLOR_TEXT, COLOR_LONGTEXT, true )
+ change_volatile ()
add_bool( "advanced", false, ADVANCED_TEXT, ADVANCED_LONGTEXT,
false )
add_bool( "interact", true, INTERACTION_TEXT,
priv->p_ml = NULL;
priv->p_dialog_provider = NULL;
priv->p_vlm = NULL;
- priv->i_verbose = 3; /* initial value until config is loaded */
-#if defined( HAVE_ISATTY ) && !defined( WIN32 )
- priv->b_color = isatty( STDERR_FILENO ); /* 2 is for stderr */
-#else
- priv->b_color = false;
-#endif
/* Initialize mutexes */
vlc_mutex_init( &priv->ml_lock );
module_EndBank (false);
return VLC_EGENERIC;
}
- priv->i_verbose = var_InheritInteger( p_libvlc, "verbose" );
- /* Find verbosity from VLC_VERBOSE environment variable */
+ /*
+ * Message queue options (read-only afterwards)
+ */
+#if defined (HAVE_ISATTY) && !defined (WIN32)
+ if (isatty (STDERR_FILENO))
+ priv->b_color = var_InheritBool (p_libvlc, "color");
+ else
+#endif
+ priv->b_color = false;
+
+ priv->i_verbose = var_InheritInteger (p_libvlc, "verbose");
+ psz_val = getenv ("VLC_VERBOSE");
+ if (psz_val != NULL)
+ priv->i_verbose = atoi (psz_val);
+
+ if (var_InheritBool (p_libvlc, "quiet"))
{
- char *env = getenv( "VLC_VERBOSE" );
- if( env != NULL )
- priv->i_verbose = atoi( env );
+ var_Create (p_libvlc, "verbose", VLC_VAR_INTEGER);
+ var_SetInteger (p_libvlc, "verbose", -1);
+ priv->i_verbose = -1;
}
/* Announce who we are (TODO: only first instance?) */
module_EndBank (true);
return VLC_EGENERIC;
}
- priv->i_verbose = var_InheritInteger( p_libvlc, "verbose" );
/*
* Support for gettext
dbus_out:
#endif // HAVE_DBUS
- /*
- * Message queue options
- */
- /* Last chance to set the verbosity. Once we start interfaces and other
- * threads, verbosity becomes read-only. */
- var_Create( p_libvlc, "verbose", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
- if( var_InheritBool( p_libvlc, "quiet" ) )
- {
- var_SetInteger( p_libvlc, "verbose", -1 );
- priv->i_verbose = -1;
- }
- if( priv->b_color )
- priv->b_color = var_InheritBool( p_libvlc, "color" );
-
vlc_CPU_dump( VLC_OBJECT(p_libvlc) );
vlc_object_set_name( p_libvlc, "main" );