VLC 4.0.0-dev
|
This file contains the functions to handle the vlc_object_t type. More...
Macros | |
#define | vlc_children_foreach(pos, priv) while (((void)(pos), (void)(priv), 0)) |
Functions | |
int | vlc_object_init (vlc_object_t *restrict obj, vlc_object_t *parent, const char *typename) |
void *() | vlc_custom_create (vlc_object_t *parent, size_t length, const char *typename) |
Creates a VLC object. More... | |
void *() | vlc_object_create (vlc_object_t *p_this, size_t i_size) |
const char * | vlc_object_typename (const vlc_object_t *obj) |
Returns the object type name. More... | |
vlc_object_t *() | vlc_object_parent (vlc_object_t *obj) |
struct vlc_tracer * | vlc_object_get_tracer (vlc_object_t *obj) |
Get tracer of a vlc instance from an object. More... | |
void | vlc_object_deinit (vlc_object_t *obj) |
Deinitializes a VLC object. More... | |
void() | vlc_object_delete (vlc_object_t *obj) |
void | vlc_object_vaLog (vlc_object_t *obj, int prio, const char *module, const char *file, unsigned line, const char *func, const char *format, va_list ap) |
Emit a log message. More... | |
void | vlc_object_Log (vlc_object_t *obj, int prio, const char *module, const char *file, unsigned line, const char *func, const char *format,...) |
Emit a log message. More... | |
size_t | vlc_list_children (vlc_object_t *obj, vlc_object_t **restrict tab, size_t max) |
Lists the children of an object. More... | |
This file contains the functions to handle the vlc_object_t type.
Unless otherwise stated, functions in this file are not cancellation point. All functions in this file are safe w.r.t. deferred cancellation.
#define vlc_children_foreach | ( | pos, | |
priv | |||
) | while (((void)(pos), (void)(priv), 0)) |
void *() vlc_custom_create | ( | vlc_object_t * | p_this, |
size_t | i_size, | ||
const char * | psz_type | ||
) |
Creates a VLC object.
Note that because the object name pointer must remain valid, potentially even after the destruction of the object (through the message queues), this function CANNOT be exported to plugins as is. In this case, the old vlc_object_create() must be used instead.
p_this | an existing VLC object |
i_size | byte size of the object structure |
psz_type | object type name |
References unlikely, and vlc_object_init().
Referenced by vlc_object_create().
size_t vlc_list_children | ( | vlc_object_t * | obj, |
vlc_object_t **restrict | tab, | ||
size_t | max | ||
) |
Lists the children of an object.
Fills a table of pointers to children object of an object, incrementing the reference count for each of them.
obj | object whose children are to be listed |
tab | base address to hold the list of children [OUT] |
max | size of the table |
References count, vlc_children_foreach, vlc_externals, vlc_internals, and vlc_object_hold().
void *() vlc_object_create | ( | vlc_object_t * | p_this, |
size_t | i_size | ||
) |
References vlc_custom_create().
void vlc_object_deinit | ( | vlc_object_t * | obj | ) |
Deinitializes a VLC object.
This frees resources allocated by vlc_object_init().
References vlc_object_internals::resources, var_DestroyAll(), vlc_internals, vlc_restorecancel(), and vlc_savecancel().
Referenced by vlc_object_delete().
void() vlc_object_delete | ( | vlc_object_t * | obj | ) |
References vlc_object_deinit().
int vlc_object_init | ( | vlc_object_t *restrict | obj, |
vlc_object_t * | parent, | ||
const char * | typename | ||
) |
vlc_object_t *() vlc_object_parent | ( | vlc_object_t * | obj | ) |
References vlc_internals.