]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
avcodec: simplify picture references
[vlc] / include / vlc_common.h
index f0df3058c855bb87d1b058f43c3a028fdedb7f68..367c0918dca05cacdb860274f394a0b8fabcc93e 100644 (file)
@@ -335,6 +335,7 @@ typedef struct vlm_message_t vlm_message_t;
 /* misc */
 typedef struct vlc_meta_t    vlc_meta_t;
 typedef struct input_stats_t input_stats_t;
+typedef struct addon_entry_t addon_entry_t;
 
 /* Update */
 typedef struct update_t update_t;
@@ -361,10 +362,9 @@ typedef union
  */
 struct vlc_list_t
 {
-    int             i_count;
-    vlc_value_t *   p_values;
-    int *           pi_types;
-
+    int          i_type;
+    int          i_count;
+    vlc_value_t *p_values;
 };
 
 /*****************************************************************************
@@ -381,7 +381,7 @@ struct vlc_list_t
 #define VLC_ENOITEM        (-8) /**< Item not found */
 
 /*****************************************************************************
- * Variable callbacks
+ * Variable callbacks: called when the value is modified
  *****************************************************************************/
 typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
                                    char const *,            /* variable name */
@@ -389,6 +389,21 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
                                    vlc_value_t,                 /* new value */
                                    void * );                /* callback data */
 
+/*****************************************************************************
+ * List callbacks: called when elements are added/removed from the list
+ *****************************************************************************/
+typedef int ( * vlc_list_callback_t ) ( vlc_object_t *,      /* variable's object */
+                                        char const *,            /* variable name */
+                                        int,                  /* VLC_VAR_* action */
+                                        vlc_value_t *,      /* new/deleted value  */
+                                        void *);                 /* callback data */
+
+typedef enum
+{
+    vlc_value_callback,
+    vlc_list_callback
+} vlc_callback_type_t;
+
 /*****************************************************************************
  * OS-specific headers and thread types
  *****************************************************************************/
@@ -408,6 +423,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 #   define OS2EMX_PLAIN_CHAR
 #   define INCL_BASE
 #   define INCL_PM
+#   include <os2safe.h>
 #   include <os2.h>
 #endif
 
@@ -806,6 +822,9 @@ VLC_API bool vlc_ureduce( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t )
 #ifdef __MINGW32__
 # define vlc_memalign(align, size) (__mingw_aligned_malloc(size, align))
 # define vlc_free(base)            (__mingw_aligned_free(base))
+#elif defined(_MSC_VER)
+# define vlc_memalign(align, size) (_aligned_malloc(size, align))
+# define vlc_free(base)            (_aligned_free(base))
 #elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
 static inline void *vlc_memalign(size_t align, size_t size)
 {