]> git.sesse.net Git - vlc/blobdiff - include/vlc_messages.h
Use object address for logging - fixes uniqueness problems
[vlc] / include / vlc_messages.h
index 1ce7d7b914ac6cac8c52844c11c2923897ff02da..4162aa169ccade0fead3c9a137105334cbd93c70 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef _VLC_MESSAGES_H_
-#define _VLC_MESSAGES_H_
+#ifndef VLC_MESSAGES_H_
+#define VLC_MESSAGES_H_
+
+/**
+ * \file
+ * This file defines structures and functions to handle messages and statistics gathering
+ */
 
 #include <stdarg.h>
 
@@ -43,7 +48,7 @@
 typedef struct
 {
     int     i_type;                             /**< message type, see below */
-    int     i_object_id;
+    uintptr_t   i_object_id;
     const char *psz_object_type;
     char *  psz_module;
     char *  psz_msg;                            /**< the message itself */
@@ -103,6 +108,12 @@ VLC_EXPORT( void, __msg_Dbg,    ( vlc_object_t *, const char *, ... ) LIBVLC_FOR
 VLC_EXPORT( msg_subscription_t*, __msg_Subscribe, ( vlc_object_t * ) );
 VLC_EXPORT( void, __msg_Unsubscribe, ( vlc_object_t *, msg_subscription_t * ) );
 
+/* Enable or disable a certain object debug messages */
+#define msg_EnableObjectPrinting(a,b) __msg_EnableObjectPrinting(VLC_OBJECT(a),b)
+#define msg_DisableObjectPrinting(a,b) __msg_DisableObjectPrinting(VLC_OBJECT(a),b)
+VLC_EXPORT( void, __msg_EnableObjectPrinting, ( vlc_object_t *, char * psz_object ) );
+VLC_EXPORT( void, __msg_DisableObjectPrinting, ( vlc_object_t *, char * psz_object ) );
+
 /**
  * @}
  */