[vlc-devel] commit: Also allow filtering based on module names. (Antoine Cellerier )
git version control
git at videolan.org
Tue Sep 2 02:05:34 CEST 2008
vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Tue Sep 2 02:05:22 2008 +0200| [29aab237c4c96a15dd6dd9d56b2ec54e8cbf7d30] | committer: Antoine Cellerier
Also allow filtering based on module names.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29aab237c4c96a15dd6dd9d56b2ec54e8cbf7d30
---
src/libvlc-module.c | 6 ++++--
src/misc/messages.c | 15 ++++++++++++---
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 3eff29c..a34f497 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -171,8 +171,10 @@ static const char *const ppsz_snap_formats[] =
#define VERBOSE_OBJECTS_LONGTEXT N_( \
"This is a ',' separated string, each objects should be prefixed by " \
"a '+' or a '-' to respectively enable or disable it. The keyword " \
- "'all' refers to all objects. Note, you still need to use -vvv " \
- "to actually display debug message.")
+ "'all' refers to all objects. Objects can be refered to by their " \
+ "type or name. Rules applying to named objects take precendence " \
+ "over rules applying to object types. Note that you still need to " \
+ "use -vvv to actually display debug message.")
#define QUIET_TEXT N_("Be quiet")
#define QUIET_LONGTEXT N_( \
diff --git a/src/misc/messages.c b/src/misc/messages.c
index 329d470..c525ec8 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -603,13 +603,22 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
psz_object = p_item->psz_object_type;
void * val = vlc_dictionary_value_for_key( &priv->msg_enabled_objects,
- psz_object );
+ p_item->psz_module );
if( val == kObjectPrintingDisabled )
return;
if( val == kObjectPrintingEnabled )
/* Allowed */;
- else if( !priv->msg_all_objects_enabled )
- return;
+ else
+ {
+ val = vlc_dictionary_value_for_key( &priv->msg_enabled_objects,
+ psz_object );
+ if( val == kObjectPrintingDisabled )
+ return;
+ if( val == kObjectPrintingEnabled )
+ /* Allowed */;
+ else if( !priv->msg_all_objects_enabled )
+ return;
+ }
int canc = vlc_savecancel ();
#ifdef UNDER_CE
More information about the vlc-devel
mailing list