]> git.sesse.net Git - vlc/commitdiff
apply Enable/DisableObjectPrinting to filter subscriptions too
authorIlkka Ollakka <ileoo@videolan.org>
Fri, 9 Jul 2010 08:49:48 +0000 (11:49 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Fri, 9 Jul 2010 08:56:46 +0000 (11:56 +0300)
src/misc/messages.c

index b2f5c98b1f0610439c126017e25ce37092066c7e..8df893ffd63c537bdf7f73a8d0fc19112153a255 100644 (file)
@@ -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);