X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_common.h;h=1e7bbf16b622677f1cde6b7d65eede018a8b1594;hb=098dab901c1a17c869a52d0d4042d03f00a83d67;hp=6f543baf306ebc2b9fa5e322bce0ca97f716771f;hpb=a308763e5e6312316c38d7e40e1a0eaaa78b3cf5;p=vlc diff --git a/include/vlc_common.h b/include/vlc_common.h index 6f543baf30..1e7bbf16b6 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -29,6 +29,9 @@ * This file is a collection of common definitions and types */ +#ifndef VLC_COMMON_H +# define VLC_COMMON_H 1 + /***************************************************************************** * Required vlc headers *****************************************************************************/ @@ -65,12 +68,6 @@ /* Counter for statistics and profiling */ typedef unsigned long count_t; -/* DCT elements types */ -typedef int16_t dctelem_t; - -/* Video buffer types */ -typedef uint8_t yuv_data_t; - /* Audio volume */ typedef uint16_t audio_volume_t; @@ -218,7 +215,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 chroma_sys_t chroma_sys_t; typedef video_format_t video_frame_format_t; typedef struct picture_t picture_t; @@ -386,7 +382,7 @@ struct stat; typedef union { int i_int; - bool b_bool; + bool b_bool; float f_float; char * psz_string; void * p_address; @@ -444,7 +440,6 @@ struct vlc_list_t #define VLC_ENOMOD -10 /* Module not found */ #define VLC_ENOOBJ -20 /* Object not found */ -#define VLC_EBADOBJ -21 /* Bad object type */ #define VLC_ENOVAR -30 /* Variable not found */ #define VLC_EBADVAR -31 /* Bad variable value */ @@ -518,10 +513,6 @@ typedef struct vlc_object_internals_t vlc_object_internals_t; char *psz_header; \ int i_flags; \ \ - /* Object access lock */ \ - vlc_mutex_t object_lock; \ - vlc_cond_t object_wait; \ - \ /* Object properties */ \ volatile bool b_error; /**< set by the object */ \ volatile bool b_die; /**< set by the outside */ \ @@ -556,35 +547,13 @@ typedef struct vlc_object_internals_t vlc_object_internals_t; struct gc_object_t { - VLC_GC_MEMBERS + VLC_GC_MEMBERS }; -static inline void __vlc_gc_incref( gc_object_t * p_gc ) -{ - p_gc->i_gc_refcount ++; -}; - -static inline void __vlc_gc_decref( gc_object_t *p_gc ) -{ - if( !p_gc ) return; - - p_gc->i_gc_refcount -- ; - - if( p_gc->i_gc_refcount == 0 ) - { - p_gc->pf_destructor( p_gc ); - /* Do not use the p_gc pointer from now on ! */ - } -} - -static inline void -__vlc_gc_init( gc_object_t * p_gc, void (*pf_destructor)( gc_object_t * ), - void * arg) -{ - p_gc->i_gc_refcount = 1; - p_gc->pf_destructor = pf_destructor; - p_gc->p_destructor_arg = arg; -} +VLC_EXPORT(void, __vlc_gc_incref, ( gc_object_t * p_gc )); +VLC_EXPORT(void, __vlc_gc_decref, ( gc_object_t * p_gc )); +VLC_EXPORT(void, __vlc_gc_init, ( gc_object_t * p_gc, + void (*pf_destructor)( gc_object_t * ), void * arg)); #define vlc_gc_incref( a ) __vlc_gc_incref( (gc_object_t *)a ) #define vlc_gc_decref( a ) __vlc_gc_decref( (gc_object_t *)a ) @@ -652,9 +621,7 @@ VLC_EXPORT( char const *, vlc_error, ( int ) ); #include /* MSB (big endian)/LSB (little endian) conversions - network order is always - * MSB, and should be used for both network communications and files. Note that - * byte orders other than little and big endians are not supported, but only - * the VAX seems to have such exotic properties. */ + * MSB, and should be used for both network communications and files. */ static inline uint16_t U16_AT( const void * _p ) { const uint8_t * p = (const uint8_t *)_p; @@ -917,3 +884,11 @@ VLC_EXPORT( const char *, VLC_Changeset, ( void ) ); # define PATH_SEP_CHAR ':' # define PATH_SEP ":" #endif + +#define LICENSE_MSG \ + _("This program comes with NO WARRANTY, to the extent permitted by " \ + "law.\nYou may redistribute it under the terms of the GNU General " \ + "Public License;\nsee the file named COPYING for details.\n" \ + "Written by the VideoLAN team; see the AUTHORS file.\n") + +#endif /* !VLC_COMMON_H */