[vlc-commits] commit: apply Enable/DisableObjectPrinting to filter subscriptions too ( Ilkka Ollakka )
git at videolan.org
git at videolan.org
Fri Jul 9 10:57:13 CEST 2010
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Jul 9 11:49:48 2010 +0300| [cd0c2c45c0198ec38cce4af877b033529639ddaa] | committer: Ilkka Ollakka
apply Enable/DisableObjectPrinting to filter subscriptions too
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cd0c2c45c0198ec38cce4af877b033529639ddaa
---
src/misc/messages.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/misc/messages.c b/src/misc/messages.c
index b2f5c98..8df893f 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -442,6 +442,20 @@ void msg_GenericVa (vlc_object_t *p_this, int i_type,
for (int i = 0; i < bank->i_sub; i++)
{
msg_subscription_t *sub = bank->pp_sub[i];
+ libvlc_priv_t *priv = libvlc_priv( sub->instance );
+ msg_bank_t *bank = priv->msg_bank;
+ void *val = vlc_dictionary_value_for_key( &bank->enabled_objects,
+ p_item->psz_module );
+ if( val == kObjectPrintingDisabled ) continue;
+ if( val != kObjectPrintingEnabled ) /*if not allowed */
+ {
+ val = vlc_dictionary_value_for_key( &bank->enabled_objects,
+ p_item->psz_object_type );
+ if( val == kObjectPrintingDisabled ) continue;
+ if( val == kObjectPrintingEnabled ); /* Allowed */
+ else if( !bank->all_objects_enabled ) continue;
+ }
+
sub->func (sub->opaque, p_item, 0);
}
vlc_rwlock_unlock (&bank->lock);
More information about the vlc-commits
mailing list