]> git.sesse.net Git - vlc/blobdiff - include/common.h
* ./include/modules_inner.h: replaced _X with __VLC_SYMBOL because _X was
[vlc] / include / common.h
index 4744026b44999bf81600b8a6338d650b4808ae6e..2b537b0bbad59a964ef6d205c87a037d2b26bbaa 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: common.h,v 1.57 2001/12/12 02:13:50 sam Exp $
+ * $Id: common.h,v 1.67 2002/01/09 02:01:14 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
  *****************************************************************************/
 #include <string.h>                                            /* strerror() */
 
-/*****************************************************************************
- * Required vlc headers
- *****************************************************************************/
-#include "config.h"
-#include "int_types.h"
-
 /*****************************************************************************
  * Basic types definitions
  *****************************************************************************/
@@ -142,6 +136,7 @@ typedef struct aout_sys_s *             p_aout_sys_t;
 struct vout_thread_s;
 struct vout_font_s;
 struct vout_sys_s;
+struct chroma_sys_s;
 struct vdec_thread_s;
 struct vpar_thread_s;
 struct video_parser_s;
@@ -154,6 +149,10 @@ typedef struct vdec_thread_s *          p_vdec_thread_t;
 typedef struct vpar_thread_s *          p_vpar_thread_t;
 typedef struct video_parser_s *         p_video_parser_t;
 
+/* Decoders */
+struct decoder_config_s;
+struct decoder_fifo_s;
+
 /* Misc */
 struct macroblock_s;
 struct data_packet_s;
@@ -162,15 +161,13 @@ struct complex_s;
 struct dm_par_s;
 struct picture_s;
 struct picture_sys_s;
+struct picture_heap_s;
 struct es_descriptor_s;
 struct pgrm_descriptor_s;
 struct pes_packet_s;
 struct input_area_s;
 struct bit_stream_s;
-
-/* Decoders */
-struct decoder_config_s;
-struct decoder_fifo_s;
+struct probedata_s;
 
 /*****************************************************************************
  * Macros and inline functions
@@ -289,8 +286,6 @@ struct decoder_fifo_s;
  * byte orders other than little and big endians are not supported, but only
  * the VAX seems to have such exotic properties - note that these 'functions'
  * needs <netinet/in.h> or the local equivalent. */
-/* FIXME: hton64 should be declared as an extern inline function to avoid
- * border effects (see byteorder.h) */
 #if WORDS_BIGENDIAN
 #   define hton16      htons
 #   define hton32      htonl
@@ -301,7 +296,12 @@ struct decoder_fifo_s;
 #else
 #   define hton16      htons
 #   define hton32      htonl
-#   define hton64(i)   ( ((u64)(htonl((i) & 0xffffffff)) << 32) | htonl(((i) >> 32) & 0xffffffff ) )
+    static __inline__ u64 __hton64( u64 i )
+    {
+        return ((u64)(htonl((i) & 0xffffffff)) << 32)
+                | htonl(((i) >> 32) & 0xffffffff );
+    }
+#   define hton64(i)   __hton64( i )
 #   define ntoh16      ntohs
 #   define ntoh32      ntohl
 #   define ntoh64      hton64
@@ -407,6 +407,20 @@ typedef __int64 off_t;
 
 #endif
 
+/*****************************************************************************
+ * CPU capabilities
+ *****************************************************************************/
+#define CPU_CAPABILITY_NONE    0
+#define CPU_CAPABILITY_486     (1<<0)
+#define CPU_CAPABILITY_586     (1<<1)
+#define CPU_CAPABILITY_PPRO    (1<<2)
+#define CPU_CAPABILITY_MMX     (1<<3)
+#define CPU_CAPABILITY_3DNOW   (1<<4)
+#define CPU_CAPABILITY_MMXEXT  (1<<5)
+#define CPU_CAPABILITY_SSE     (1<<6)
+#define CPU_CAPABILITY_ALTIVEC (1<<16)
+#define CPU_CAPABILITY_FPU     (1<<31)
+
 /*****************************************************************************
  * I18n stuff
  *****************************************************************************/
@@ -425,18 +439,15 @@ typedef __int64 off_t;
 typedef struct module_symbols_s
 {
     struct main_s* p_main;
-    struct aout_bank_s* p_aout_bank;
-    struct vout_bank_s* p_vout_bank;
+    struct input_bank_s* p_input_bank;
+    struct aout_bank_s*  p_aout_bank;
+    struct vout_bank_s*  p_vout_bank;
 
     int    ( * main_GetIntVariable ) ( char *, int );
     char * ( * main_GetPszVariable ) ( char *, char * );
     void   ( * main_PutIntVariable ) ( char *, int );
     void   ( * main_PutPszVariable ) ( char *, char * );
 
-    int  ( * TestProgram )  ( char * );
-    int  ( * TestMethod )   ( char *, char * );
-    int  ( * TestCPU )      ( int );
-
     int  ( * intf_ProcessKey ) ( struct intf_thread_s *, int );
     void ( * intf_AssignKey )  ( struct intf_thread_s *, int, int, int );
 
@@ -457,6 +468,7 @@ typedef struct module_symbols_s
     void ( * intf_PlaylistDestroy ) ( struct playlist_s * );
     void ( * intf_PlaylistJumpto )  ( struct playlist_s *, int );
     void ( * intf_UrlDecode )       ( char * );
+    int  ( * intf_Eject )           ( const char * );
 
     void    ( * msleep )         ( mtime_t );
     mtime_t ( * mdate )          ( void );
@@ -499,6 +511,7 @@ typedef struct module_symbols_s
                                       void ( * ) ( struct bit_stream_s *,
                                                    boolean_t ),
                                       void * );
+    void ( * DecoderError )         ( struct decoder_fifo_s * p_fifo );
     int  ( * input_InitStream )     ( struct input_thread_s *, size_t );
     void ( * input_EndStream )      ( struct input_thread_s * );
 
@@ -525,42 +538,36 @@ typedef struct module_symbols_s
                                            struct pgrm_descriptor_s *,
                                            mtime_t );
 
-    int ( * input_NetlistInit )          ( struct input_thread_s *,
-                                           int, int, int, size_t, int );
-    struct iovec * ( * input_NetlistGetiovec ) ( void * p_method_data );
-    void ( * input_NetlistMviovec )      ( void * , int,
-                                           struct data_packet_s **);
-    struct data_packet_s * ( * input_NetlistNewPacket ) ( void *, size_t );
-    struct data_packet_s * ( * input_NetlistNewPtr ) ( void * );
-    struct pes_packet_s * ( * input_NetlistNewPES ) ( void * );
-    void ( * input_NetlistDeletePacket ) ( void *, struct data_packet_s * );
-    void ( * input_NetlistDeletePES )    ( void *, struct pes_packet_s * );
-    void ( * input_NetlistEnd )          ( struct input_thread_s * );
-
     struct aout_fifo_s * ( * aout_CreateFifo ) 
                                        ( int, int, long, long, long, void * );
     void ( * aout_DestroyFifo )     ( struct aout_fifo_s * );
 
-    struct vout_thread_s * (* vout_CreateThread) ( int *, int, int, int, int );
-    struct subpicture_s * (* vout_CreateSubPicture) ( struct vout_thread_s *, 
-                                                      int, int );
-    struct picture_s * ( * vout_CreatePicture ) ( struct vout_thread_s *, 
-                                                  int, int, int, int );
+    struct vout_thread_s * (* vout_CreateThread) ( int *, int, int, u32, int );
+    void  ( * vout_DestroyThread )  ( struct vout_thread_s *, int * );
 
-    void  ( * vout_DestroySubPicture )  ( struct vout_thread_s *, 
-                                          struct subpicture_s * );
-    void  ( * vout_DisplaySubPicture )  ( struct vout_thread_s *, 
-                                          struct subpicture_s * );
+    struct picture_s * ( * vout_CreatePicture )
+                                    ( struct vout_thread_s *,
+                                      boolean_t, boolean_t, boolean_t ); 
+    void  ( * vout_AllocatePicture )( struct picture_s *, int, int, u32 );
     void  ( * vout_DisplayPicture ) ( struct vout_thread_s *, 
                                       struct picture_s * );
     void  ( * vout_DestroyPicture ) ( struct vout_thread_s *,
                                       struct picture_s * );
     void  ( * vout_LinkPicture )    ( struct vout_thread_s *,
                                       struct picture_s * );
-    void  ( * vout_UnlinkPicture )    ( struct vout_thread_s *,
+    void  ( * vout_UnlinkPicture )  ( struct vout_thread_s *,
                                       struct picture_s * );
-    void  ( * vout_DatePicture )    ( struct vout_thread_s *p_vout, 
-                                      struct picture_s *p_pic, mtime_t );
+    void  ( * vout_DatePicture )    ( struct vout_thread_s *, 
+                                      struct picture_s *, mtime_t );
+    void  ( * vout_PlacePicture )   ( struct vout_thread_s *, int, int,
+                                      int *, int *, int *, int * );
+
+    struct subpicture_s * (* vout_CreateSubPicture)
+                                        ( struct vout_thread_s *, int, int );
+    void  ( * vout_DestroySubPicture )  ( struct vout_thread_s *, 
+                                          struct subpicture_s * );
+    void  ( * vout_DisplaySubPicture )  ( struct vout_thread_s *, 
+                                          struct subpicture_s * );
     
     u32  ( * UnalignedShowBits )    ( struct bit_stream_s *, unsigned int );
     void ( * UnalignedRemoveBits )  ( struct bit_stream_s * );
@@ -568,16 +575,12 @@ typedef struct module_symbols_s
 
     char * ( * DecodeLanguage ) ( u16 );
 
-    struct module_s * ( * module_Need )    ( int, void * );
-    void ( * module_Unneed )        ( struct module_s * );
+    struct module_s * ( * module_Need ) ( int, char *, struct probedata_s * );
+    void ( * module_Unneed )            ( struct module_s * );
+
 } module_symbols_t;
 
 #ifdef PLUGIN
 extern module_symbols_t* p_symbols;
 #endif
 
-/*****************************************************************************
- * Required vlc headers
- *****************************************************************************/
-#include "main.h"
-