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;
/* 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;
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;
/* 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; \
}
/* 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)
# 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