[vlc-commits] commit: apply Enable/DisableObjectPrinting to filter subscriptions too ( Ilkka Ollakka )

git at videolan.org git at videolan.org
Fri Jul 9 15:24:47 CEST 2010


vlc/vlc-1.1 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Jul  9 11:49:48 2010 +0300| [d6c6b0134894f3f17290c4d88be1a44d2da848e3] | committer: Ilkka Ollakka 

apply Enable/DisableObjectPrinting to filter subscriptions too
(cherry picked from commit cd0c2c45c0198ec38cce4af877b033529639ddaa)

Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=d6c6b0134894f3f17290c4d88be1a44d2da848e3
---

 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 4ef2b28..d99c70a 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