]> git.sesse.net Git - vlc/blobdiff - src/libvlc.h
Privatize msg_bank
[vlc] / src / libvlc.h
index 4483a12a46de4585cab2055c3861de0935074b17..f3ae94b8e05a60030a1a8fbc93431339bef33ee5 100644 (file)
@@ -72,6 +72,44 @@ extern vlc_threadvar_t msg_context_global_key;
 extern uint32_t cpu_flags;
 uint32_t CPUCapabilities( void );
 
+/*
+ * Message/logging stuff
+ */
+
+#define NB_QUEUES 2
+
+typedef struct msg_queue_t
+{
+    int                     i_id;
+
+    /** Message queue lock */
+    vlc_mutex_t             lock;
+    bool              b_overflow;
+
+    /* Message queue */
+    msg_item_t              msg[VLC_MSG_QSIZE];           /**< message queue */
+    int i_start;
+    int i_stop;
+
+    /* Subscribers */
+    int i_sub;
+    msg_subscription_t **pp_sub;
+
+    /* Logfile for WinCE */
+#ifdef UNDER_CE
+    FILE *logfile;
+#endif
+} msg_queue_t;
+
+/**
+ * Store all data requiered by messages interfaces.
+ */
+typedef struct msg_bank_t
+{
+    vlc_mutex_t             lock;
+    msg_queue_t             queues[NB_QUEUES];
+} msg_bank_t;
+
 /*
  * Unicode stuff
  */
@@ -172,10 +210,21 @@ typedef struct libvlc_priv_t
 {
     vlc_mutex_t        config_lock; ///< config file lock
 
+    /* Messages */
+    msg_bank_t         msg_bank;    ///< The message bank
+    int                i_verbose;   ///< info messages
+    bool               b_color;     ///< color messages?
+
+    /* Timer stats */
     vlc_mutex_t        timer_lock;  ///< Lock to protect timers
     counter_t        **pp_timers;   ///< Array of all timers
     int                i_timers;    ///< Number of timers
     bool               b_stats;     ///< Whether to collect stats
+
+    module_t          *p_memcpy_module;  ///< Fast memcpy plugin used
+    vlm_t             *p_vlm;  ///< VLM if created from libvlc-common.c
+
+    httpd_t           *p_httpd; ///< HTTP daemon (src/network/httpd.c)
 } libvlc_priv_t;
 
 static inline libvlc_priv_t *libvlc_priv (libvlc_int_t *libvlc)