]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
luarc: simplify
[vlc] / include / vlc_common.h
index 8844d23ba3f4e1e876f57d5745ff56de585712e1..a1dbcf349ec773ce3ceef6260367475deba287b4 100644 (file)
 #   define unlikely(p) (!!(p))
 #endif
 
+#if defined(__GNUC__) && !defined __cplusplus
+# define LIBVLC_DEPRECATED __attribute__((deprecated))
+#else
+# define LIBVLC_DEPRECATED
+#endif
+
 /*****************************************************************************
  * Basic types definitions
  *****************************************************************************/
 #   endif
 #endif
 
+#ifdef __SYMBIAN32__
+ #include <sys/syslimits.h>
+#endif
+
 /* Counter for statistics and profiling */
 typedef unsigned long       count_t;
 
@@ -177,8 +187,6 @@ typedef struct vlc_list_t vlc_list_t;
 typedef struct vlc_object_t vlc_object_t;
 typedef struct libvlc_int_t libvlc_int_t;
 typedef struct date_t date_t;
-typedef struct dict_entry_t dict_entry_t;
-typedef struct dict_t dict_t;
 
 /* Playlist */
 
@@ -204,17 +212,13 @@ typedef struct services_discovery_sys_t services_discovery_sys_t;
 typedef struct playlist_add_t playlist_add_t;
 
 /* Modules */
-typedef struct module_bank_t module_bank_t;
 typedef struct module_t module_t;
 typedef struct module_config_t module_config_t;
-typedef struct module_symbols_t module_symbols_t;
-typedef struct module_cache_t module_cache_t;
 
 typedef struct config_category_t config_category_t;
 
 /* Input */
 typedef struct input_thread_t input_thread_t;
-typedef struct input_thread_sys_t input_thread_sys_t;
 typedef struct input_item_t input_item_t;
 typedef struct input_item_node_t input_item_node_t;
 typedef struct access_t access_t;
@@ -226,7 +230,6 @@ typedef struct demux_sys_t demux_sys_t;
 typedef struct es_out_t     es_out_t;
 typedef struct es_out_id_t  es_out_id_t;
 typedef struct es_out_sys_t es_out_sys_t;
-typedef struct es_descriptor_t es_descriptor_t;
 typedef struct seekpoint_t seekpoint_t;
 typedef struct info_t info_t;
 typedef struct info_category_t info_category_t;
@@ -246,7 +249,6 @@ typedef struct aout_fifo_t aout_fifo_t;
 typedef struct aout_input_t aout_input_t;
 typedef struct block_t aout_buffer_t;
 typedef audio_format_t audio_sample_format_t;
-typedef struct audio_date_t audio_date_t;
 typedef struct aout_filter_t aout_filter_t;
 
 /* Video */
@@ -282,19 +284,6 @@ typedef struct sout_stream_sys_t sout_stream_sys_t;
 
 typedef struct config_chain_t       config_chain_t;
 typedef struct session_descriptor_t session_descriptor_t;
-typedef struct announce_method_t announce_method_t;
-
-typedef struct sout_param_t sout_param_t;
-typedef struct sout_pcat_t sout_pcat_t;
-typedef struct sout_std_t sout_std_t;
-typedef struct sout_display_t sout_display_t;
-typedef struct sout_duplicate_t sout_duplicate_t;
-typedef struct sout_transcode_t sout_transcode_t;
-typedef struct sout_chain_t sout_chain_t;
-typedef struct streaming_profile_t streaming_profile_t;
-typedef struct sout_module_t sout_module_t;
-typedef struct sout_gui_descr_t sout_gui_descr_t;
-typedef struct profile_parser_t profile_parser_t;
 
 /* Decoders */
 typedef struct decoder_t         decoder_t;
@@ -310,18 +299,12 @@ typedef struct filter_t filter_t;
 typedef struct filter_sys_t filter_sys_t;
 
 /* Network */
-typedef struct network_socket_t network_socket_t;
 typedef struct virtual_socket_t v_socket_t;
-typedef struct sockaddr sockaddr;
-typedef struct addrinfo addrinfo;
 typedef struct vlc_acl_t vlc_acl_t;
 typedef struct vlc_url_t vlc_url_t;
 
 /* Misc */
 typedef struct iso639_lang_t iso639_lang_t;
-typedef struct device_t device_t;
-typedef struct device_probe_t device_probe_t;
-typedef struct probe_sys_t probe_sys_t;
 
 /* block */
 typedef struct block_t      block_t;
@@ -362,10 +345,6 @@ typedef struct vod_t     vod_t;
 typedef struct vod_sys_t vod_sys_t;
 typedef struct vod_media_t vod_media_t;
 
-/* opengl */
-typedef struct opengl_t     opengl_t;
-typedef struct opengl_sys_t opengl_sys_t;
-
 /* osdmenu */
 typedef struct osd_menu_t   osd_menu_t;
 typedef struct osd_state_t  osd_state_t;
@@ -446,9 +425,6 @@ struct vlc_list_t
 #define VLC_VAR_INTEGER   0x0030
 #define VLC_VAR_HOTKEY    0x0031
 #define VLC_VAR_STRING    0x0040
-#define VLC_VAR_MODULE    0x0041
-#define VLC_VAR_FILE      0x0042
-#define VLC_VAR_DIRECTORY 0x0043
 #define VLC_VAR_VARIABLE  0x0044
 #define VLC_VAR_FLOAT     0x0050
 #define VLC_VAR_TIME      0x0060
@@ -649,6 +625,23 @@ static inline unsigned clz (unsigned x)
 /* XXX: this assumes that int is 32-bits or more */
 #define clz32( x ) (clz(x) - ((sizeof(unsigned) - sizeof (uint32_t)) * 8))
 
+/* Bit weight */
+LIBVLC_USED
+static inline unsigned popcount (unsigned x)
+{
+#ifdef __GNUC_
+    return __builtin_popcount (x);
+#else
+    unsigned count = 0;
+    while (x)
+    {
+        count += x & 1;
+        x = x >> 1;
+    }
+    return count;
+#endif
+}
+
 /* Free and set set the variable to NULL */
 #define FREENULL(a) do { free( a ); a = NULL; } while(0)
 
@@ -787,7 +780,6 @@ static inline uint64_t ntoh64 (uint64_t ll)
 /* win32, cl and icl support */
 #   if defined( _MSC_VER ) || !defined( __MINGW32__ )
 #       define __attribute__(x)
-#       define __inline__      __inline
 #       define S_IFBLK         0x3000  /* Block */
 #       define S_ISBLK(m)      (0)
 #       define S_ISCHR(m)      (0)
@@ -886,7 +878,6 @@ static inline void *xrealloc (void *ptr, size_t len)
 /*****************************************************************************
  * libvlc features
  *****************************************************************************/
-VLC_EXPORT( const char *, VLC_Version, ( void ) LIBVLC_USED );
 VLC_EXPORT( const char *, VLC_CompileBy, ( void ) LIBVLC_USED );
 VLC_EXPORT( const char *, VLC_CompileHost, ( void ) LIBVLC_USED );
 VLC_EXPORT( const char *, VLC_Compiler, ( void ) LIBVLC_USED );
@@ -900,7 +891,7 @@ VLC_EXPORT( const char *, VLC_Compiler, ( void ) LIBVLC_USED );
 #include "vlc_main.h"
 #include "vlc_configuration.h"
 
-#if defined( WIN32 ) || defined( UNDER_CE )
+#if defined( WIN32 ) || defined( UNDER_CE ) || defined( __SYMBIAN32__ )
 #   define DIR_SEP_CHAR '\\'
 #   define DIR_SEP "\\"
 #   define PATH_SEP_CHAR ';'