]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
More symbols fixes
[vlc] / include / vlc_common.h
index 78f7c36d174bb0476249cd901971b81357d06528..c53d5b6506bb5aeb08d78b044443494839dd4561 100644 (file)
@@ -281,6 +281,7 @@ typedef struct access_sys_t access_sys_t;
 typedef struct stream_t     stream_t;
 typedef struct stream_sys_t stream_sys_t;
 typedef struct demux_t  demux_t;
+typedef struct demux_meta_t demux_meta_t;
 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;
@@ -311,7 +312,6 @@ typedef struct aout_filter_t aout_filter_t;
 /* Video */
 typedef struct vout_thread_t vout_thread_t;
 typedef struct vout_sys_t vout_sys_t;
-typedef struct vout_synchro_t vout_synchro_t;
 typedef struct chroma_sys_t chroma_sys_t;
 
 typedef video_format_t video_frame_format_t;
@@ -365,8 +365,9 @@ 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;
-typedef struct decoder_sys_t  decoder_sys_t;
+typedef struct decoder_t         decoder_t;
+typedef struct decoder_sys_t     decoder_sys_t;
+typedef struct decoder_synchro_t decoder_synchro_t;
 
 /* Encoders */
 typedef struct encoder_t      encoder_t;
@@ -411,7 +412,6 @@ typedef struct httpd_redirect_t httpd_redirect_t;
 typedef struct httpd_stream_t httpd_stream_t;
 
 /* TLS support */
-typedef struct tls_t tls_t;
 typedef struct tls_server_t tls_server_t;
 typedef struct tls_session_t tls_session_t;
 
@@ -577,7 +577,6 @@ typedef struct vlc_object_internals_t vlc_object_internals_t;
     /* Stuff related to the libvlc structure */                             \
     libvlc_int_t *p_libvlc;                  /**< (root of all evil) - 1 */ \
                                                                             \
-    volatile int    i_refcount;                         /**< usage count */ \
     vlc_object_t *  p_parent;                            /**< our parent */ \
     vlc_object_t ** pp_children;                       /**< our children */ \
     volatile int    i_children;                                             \
@@ -670,23 +669,22 @@ static inline uint8_t clip_uint8_vlc( int32_t a )
 }
 
 /* Malloc with automatic error */
-#define MALLOC_VOID( var, type ) { var = (type*)malloc( sizeof( type) ); \
-                                   if( !var ) return; }
-#define MALLOC_NULL( var, type ) { var = (type*)malloc( sizeof( type) ); \
-                                   if( !var ) return NULL; }
-#define MALLOC_ERR( var, type ) { var = (type*)malloc( sizeof( type) ); \
-                                   if( !var ) return VLC_ENOMEM; }
-#define MALLOC_GOTOERR( var, type ) { var = (type*)malloc( sizeof( type) ); \
-                                      if( !var ) goto error; }
+#define MALLOC_VOID( var, type ) do { var = (type*)malloc( sizeof( type) ); \
+                                   if( !var ) return; } while(0)
+#define MALLOC_NULL( var, type ) do { var = (type*)malloc( sizeof( type) ); \
+                                   if( !var ) return NULL; } while(0)
+#define MALLOC_ERR( var, type ) do { var = (type*)malloc( sizeof( type) ); \
+                                   if( !var ) return VLC_ENOMEM; } while(0)
+#define MALLOC_GOTOERR( var, type ) do { var = (type*)malloc( sizeof( type) ); \
+                                      if( !var ) goto error; } while(0)
 #define DECMALLOC_VOID( var, type ) type* var = (type*)malloc( sizeof(type) );\
                                     if( !var ) return;
-#define DECMALLOC_ERR( var, type ) type* var = (type*)malloc( sizeof(type) );\
+#define DECMALLOC_ERR( var, type )  type* var = (type*)malloc( sizeof(type) );\
                                     if( !var ) return VLC_ENOMEM;
 #define DECMALLOC_NULL( var, type ) type* var = (type*)malloc( sizeof(type) );\
                                     if( !var ) return NULL;
 
-#define FREENULL(a) if( a ) { free( a ); a = NULL; }
-#define FREE(a) if( a ) { free( a ); }
+#define FREENULL(a) do { free( a ); a = NULL; } while(0)
 
 #define EMPTY_STR(str) (!str || !*str)
 
@@ -816,6 +814,9 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
 #   define ATTR_ALIGN(align)
 #endif
 
+/* */
+#define VLC_UNUSED(x) (void)(x)
+
 /* Alignment of critical dynamic data structure
  *
  * Not all platforms support memalign so we provide a vlc_memalign wrapper
@@ -1026,12 +1027,12 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
 
 #if defined (WIN32)
 #   include <dirent.h>
-VLC_INTERNAL( void *, vlc_wopendir, ( const wchar_t * ) );
-VLC_INTERNAL( struct _wdirent *, vlc_wreaddir, ( void * ) );
-VLC_EXPORT( int, vlc_wclosedir, ( void * ) );
-VLC_INTERNAL( void, vlc_rewinddir, ( void * ) );
-VLC_INTERNAL( void, vlc_seekdir, ( void *, long ) );
-VLC_INTERNAL( long, vlc_telldir, ( void * ) );
+ VLC_INTERNAL( void *, vlc_wopendir, ( const wchar_t * ) );
+ VLC_INTERNAL( struct _wdirent *, vlc_wreaddir, ( void * ) );
+ VLC_EXPORT( int, vlc_wclosedir, ( void * ) );
+ VLC_INTERNAL( void, vlc_rewinddir, ( void * ) );
+ VLC_INTERNAL( void, vlc_seekdir, ( void *, long ) );
+ VLC_INTERNAL( long, vlc_telldir, ( void * ) );
 #   define opendir Use_utf8_opendir_or_vlc_wopendir_instead!
 #   define readdir Use_utf8_readdir_or_vlc_wreaddir_instead!
 #   define closedir vlc_wclosedir
@@ -1182,7 +1183,7 @@ VLC_EXPORT( unsigned, vlc_CPU, ( void ) );
  * I18n stuff
  *****************************************************************************/
 #ifdef WIN32
-VLC_EXPORT( char *, vlc_dgettext, ( const char *package, const char *msgid ) );
+    VLC_EXPORT( char *, vlc_dgettext, ( const char *package, const char *msgid ) );
 #endif
 
 #if defined( ENABLE_NLS ) && \