vlc_objects.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #define VLC_OBJECT_INPUT (-7)
00036 #define VLC_OBJECT_DECODER (-8)
00037 #define VLC_OBJECT_VOUT (-9)
00038 #define VLC_OBJECT_AOUT (-10)
00039
00040
00041 #define VLC_OBJECT_GENERIC (-666)
00042
00043
00044 #define FIND_PARENT 0x0001
00045 #define FIND_CHILD 0x0002
00046 #define FIND_ANYWHERE 0x0003
00047
00048
00049 #define OBJECT_FLAGS_NODBG 0x0001
00050 #define OBJECT_FLAGS_QUIET 0x0002
00051 #define OBJECT_FLAGS_NOINTERACT 0x0004
00052
00053
00054 typedef void (*vlc_destructor_t)(struct vlc_object_t *);
00055
00056
00057
00058
00059
00060 struct vlc_object_t
00061 {
00062 VLC_COMMON_MEMBERS
00063 };
00064
00065
00066
00067
00068 VLC_EXPORT( void *, vlc_object_create, ( vlc_object_t *, size_t ) ) LIBVLC_MALLOC LIBVLC_USED;
00069 VLC_EXPORT( void, vlc_object_set_destructor, ( vlc_object_t *, vlc_destructor_t ) );
00070 VLC_EXPORT( void, vlc_object_attach, ( vlc_object_t *, vlc_object_t * ) );
00071 #if defined (__GNUC__) && !defined __cplusplus
00072 __attribute__((deprecated))
00073 #endif
00074 VLC_EXPORT( void *, vlc_object_find, ( vlc_object_t *, int, int ) ) LIBVLC_USED;
00075 #if defined (__GNUC__) && !defined __cplusplus
00076 __attribute__((deprecated))
00077 #endif
00078 VLC_EXPORT( vlc_object_t *, vlc_object_find_name, ( vlc_object_t *, const char *, int ) ) LIBVLC_USED;
00079 VLC_EXPORT( void *, vlc_object_hold, ( vlc_object_t * ) );
00080 VLC_EXPORT( void, vlc_object_release, ( vlc_object_t * ) );
00081 VLC_EXPORT( vlc_list_t *, vlc_list_children, ( vlc_object_t * ) ) LIBVLC_USED;
00082 VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) );
00083 VLC_EXPORT( char *, vlc_object_get_name, ( const vlc_object_t * ) ) LIBVLC_USED;
00084 #define vlc_object_get_name(o) vlc_object_get_name(VLC_OBJECT(o))
00085
00086
00087
00088 #define vlc_object_create(a,b) vlc_object_create( VLC_OBJECT(a), b )
00089
00090 #define vlc_object_set_destructor(a,b) \
00091 vlc_object_set_destructor( VLC_OBJECT(a), b )
00092
00093 #define vlc_object_attach(a,b) \
00094 vlc_object_attach( VLC_OBJECT(a), VLC_OBJECT(b) )
00095
00096 #define vlc_object_find(a,b,c) \
00097 vlc_object_find( VLC_OBJECT(a),b,c)
00098
00099 #define vlc_object_find_name(a,b,c) \
00100 vlc_object_find_name( VLC_OBJECT(a),b,c)
00101
00102 #define vlc_object_hold(a) \
00103 vlc_object_hold( VLC_OBJECT(a) )
00104
00105 #define vlc_object_release(a) \
00106 vlc_object_release( VLC_OBJECT(a) )
00107
00108 #define vlc_list_children(a) \
00109 vlc_list_children( VLC_OBJECT(a) )
00110
00111
00112 VLC_EXPORT( void, vlc_object_kill, ( vlc_object_t * ) );
00113 #define vlc_object_kill(a) \
00114 vlc_object_kill( VLC_OBJECT(a) )
00115
00116 LIBVLC_USED
00117 static inline bool vlc_object_alive (const vlc_object_t *obj)
00118 {
00119 barrier ();
00120 return !obj->b_die;
00121 }
00122
00123 #define vlc_object_alive(a) vlc_object_alive( VLC_OBJECT(a) )
00124
00125