[vlc-devel] commit: Remove the verbose callback. ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Feb 10 18:44:06 CET 2009
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Tue Feb 10 19:43:36 2009 +0200| [d5f982b37091f3b340d3e8f3dacd1f874f03550a] | committer: Rémi Denis-Courmont
Remove the verbose callback.
It was not thread-safe, and only used by ncurses (fixed earlier).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d5f982b37091f3b340d3e8f3dacd1f874f03550a
---
src/libvlc.c | 26 ++++----------------------
1 files changed, 4 insertions(+), 22 deletions(-)
diff --git a/src/libvlc.c b/src/libvlc.c
index 95f10cb..e8c9f2d 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -222,9 +222,6 @@ static void PauseConsole ( void );
#endif
static int ConsoleWidth ( void );
-static int VerboseCallback( vlc_object_t *, char const *,
- vlc_value_t, vlc_value_t, void * );
-
static void InitDeviceValues( libvlc_int_t * );
static vlc_mutex_t global_lock = VLC_STATIC_MUTEX;
@@ -730,14 +727,14 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
free( psz_verbose_objects );
}
+ /* Last change 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( config_GetInt( p_libvlc, "quiet" ) > 0 )
{
- val.i_int = -1;
- var_Set( p_libvlc, "verbose", val );
+ var_SetInteger( p_libvlc, "verbose", -1 );
+ priv->i_verbose = -1;
}
- var_AddCallback( p_libvlc, "verbose", VerboseCallback, NULL );
- var_TriggerCallback( p_libvlc, "verbose" );
if( priv->b_color )
priv->b_color = config_GetInt( p_libvlc, "color" ) > 0;
@@ -2075,21 +2072,6 @@ static int ConsoleWidth( void )
return i_width;
}
-static int VerboseCallback( vlc_object_t *p_this, const char *psz_variable,
- vlc_value_t old_val, vlc_value_t new_val, void *param)
-{
- libvlc_int_t *p_libvlc = (libvlc_int_t *)p_this;
- (void)psz_variable;
- (void)old_val;
- (void)param;
-
- if( new_val.i_int >= -1 )
- {
- libvlc_priv (p_libvlc)->i_verbose = __MIN( new_val.i_int, 2 );
- }
- return VLC_SUCCESS;
-}
-
/*****************************************************************************
* InitDeviceValues: initialize device values
*****************************************************************************
More information about the vlc-devel
mailing list