]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
* ./src/libvlc.c, ./include/main.h: the root of all objects is now
[vlc] / include / vlc_common.h
index 537f84c4ada22b55e3a8ba7bc83aa2465135c437..928c339c4fe7036758a5d1658d9e34bec9b566d1 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.24 2002/08/26 23:36:20 sam Exp $
+ * $Id: vlc_common.h,v 1.28 2002/10/03 13:21:54 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -114,6 +114,9 @@ typedef s16                 dctelem_t;
 /* Video buffer types */
 typedef u8                  yuv_data_t;
 
+/* Audio volume */
+typedef u16                 audio_volume_t;
+
 /*****************************************************************************
  * mtime_t: high precision date or time interval
  *****************************************************************************
@@ -133,16 +136,27 @@ typedef s64 mtime_t;
  *****************************************************************************/
 typedef u32 vlc_fourcc_t;
 
-#define VLC_FOURCC( a, b, c, d ) \
-    ( ((u32)a) | ( ((u32)b) << 8 ) | ( ((u32)c) << 16 ) | ( ((u32)d) << 24 ) )
+#ifdef WORDS_BIGENDIAN
+#   define VLC_FOURCC( a, b, c, d ) \
+        ( ((u32)d) | ( ((u32)c) << 8 ) | ( ((u32)b) << 16 ) | ( ((u32)a) << 24 ) )
+#   define VLC_TWOCC( a, b ) \
+        ( (u16)(b) | ( (u16)(a) << 8 ) )
 
-#define VLC_TWOCC( a, b ) \
-    ( (u16)(a) | ( (u16)(b) << 8 ) )
+#else
+#   define VLC_FOURCC( a, b, c, d ) \
+        ( ((u32)a) | ( ((u32)b) << 8 ) | ( ((u32)c) << 16 ) | ( ((u32)d) << 24 ) )
+#   define VLC_TWOCC( a, b ) \
+        ( (u16)(a) | ( (u16)(b) << 8 ) )
+
+#endif
 
 /*****************************************************************************
  * Classes declaration
  *****************************************************************************/
 
+/* Internal types */
+typedef struct libvlc_t libvlc_t;
+
 /* Messages */
 typedef struct msg_bank_t msg_bank_t;
 typedef struct msg_subscription_t msg_subscription_t;
@@ -262,7 +276,8 @@ typedef struct iso639_lang_t iso639_lang_t;
     volatile vlc_bool_t b_dead;                     /* set by the object */ \
     volatile vlc_bool_t b_attached;                 /* set by the object */ \
                                                                             \
-    vlc_t *         p_vlc;                           /* root of all evil */ \
+    libvlc_t *      p_libvlc;                        /* root of all evil */ \
+    vlc_t *         p_vlc;                     /* (root of all evil) - 1 */ \
                                                                             \
     volatile int    i_refcount;                           /* usage count */ \
     vlc_object_t *  p_parent;                              /* our parent */ \
@@ -493,6 +508,7 @@ typedef __int64 off_t;
 #include "vlc_symbols.h"
 #include "os_specific.h"
 #include "vlc_messages.h"
+#include "vlc_threads_funcs.h"
 #include "mtime.h"
 #include "modules.h"
 #include "main.h"