24#define VLC_OBJECTS_H 1
42struct vlc_object_marker;
56 struct vlc_object_marker *obj;
81#if !defined(__cplusplus)
82# define VLC_OBJECT(x) \
84 struct vlc_object_marker *: (x), \
85 struct vlc_object_t: (&((x)->obj)) \
127#define vlc_object_delete(obj) vlc_object_delete(VLC_OBJECT(obj))
149#define vlc_object_parent(o) vlc_object_parent(VLC_OBJECT(o))
155#define vlc_object_logger(o) vlc_object_logger(VLC_OBJECT(o))
175#define vlc_object_get_name(obj) var_GetString(obj, "module-name")
177#define vlc_object_create(a,b) vlc_object_create( VLC_OBJECT(a), b )
179#define vlc_object_find_name(a,b) \
180 vlc_object_find_name( VLC_OBJECT(a),b)
193#define vlc_object_instance(o) vlc_object_instance(VLC_OBJECT(o))
208 if (!strcmp(tn,
"audio output"))
210 if (!strcmp(tn,
"video output"))
219 if (!strcmp(tn,
"audio output"))
221 if (!strcmp(tn,
"video output"))
224#define vlc_object_release(o) vlc_object_release(VLC_OBJECT(o))
256#define vlc_obj_malloc(o, s) vlc_obj_malloc(VLC_OBJECT(o), s)
272#define vlc_obj_calloc(o, n, s) vlc_obj_calloc(VLC_OBJECT(o), n, s)
286#define vlc_obj_strdup(o, s) vlc_obj_strdup(VLC_OBJECT(o), s)
299#define vlc_obj_free(o, p) vlc_obj_free(VLC_OBJECT(o), p)
304# include <type_traits>
306#undef vlc_object_create
317 static_assert(std::is_pointer<T>::value ==
false,
"vlc_object_create can only create objects");
319 if (
object ==
nullptr)
322 return new(object) T;
325#undef vlc_object_delete
329 if (!std::is_trivially_destructible<O>::value)
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_API
Definition fourcc_gen.c:31
#define VLC_MALLOC
Definition vlc_common.h:157
#define VLC_DEPRECATED
Definition vlc_common.h:158
#define vlc_obj_calloc(o, n, s)
Definition vlc_objects.h:273
#define vlc_obj_malloc(o, s)
Definition vlc_objects.h:257
#define vlc_obj_free(o, p)
Definition vlc_objects.h:300
#define vlc_obj_strdup(o, s)
Definition vlc_objects.h:287
#define VLC_OBJECT(x)
Type-safe vlc_object_t cast.
Definition vlc_objects.h:83
#define vlc_object_create(a, b)
Definition vlc_objects.h:178
vout_thread_t * vout_Hold(vout_thread_t *vout)
Definition video_output.c:2199
struct vlc_tracer * vlc_object_get_tracer(vlc_object_t *obj)
Get tracer of a vlc instance from an object.
Definition objects.c:120
#define vlc_object_release(o)
Definition vlc_objects.h:225
#define vlc_object_delete(obj)
Definition vlc_objects.h:128
#define vlc_object_logger(o)
Definition vlc_objects.h:156
void aout_Release(audio_output_t *aout)
Definition output.c:454
const char * vlc_object_typename(const vlc_object_t *obj)
Returns the object type name.
Definition objects.c:110
audio_output_t * aout_Hold(audio_output_t *aout)
Definition output.c:410
static void * vlc_object_hold(vlc_object_t *o)
Definition vlc_objects.h:205
size_t vlc_list_children(vlc_object_t *, vlc_object_t **, size_t)
#define vlc_object_parent(o)
Definition vlc_objects.h:150
#define vlc_object_instance(o)
Definition vlc_objects.h:194
void vout_Release(vout_thread_t *vout)
Definition video_output.c:2045
Audio output object.
Definition vlc_aout.h:155
Definition vlc_objects.h:103
struct vlc_object_t obj
Definition vlc_objects.h:104
Definition variables.h:36
VLC object common members.
Definition vlc_objects.h:53
struct vlc_logger * logger
Definition vlc_objects.h:54
struct vlc_object_marker * obj
Definition vlc_objects.h:57
bool no_interact
Definition vlc_objects.h:60
bool force
Module probe flag.
Definition vlc_objects.h:67
struct vlc_object_internals * priv
Definition vlc_objects.h:56
Video output thread descriptor.
Definition vlc_vout.h:54
This file is a collection of common definitions and types.