VLC
3.0.21
|
Modules | |
Variables | |
Files | |
file | vlc_objects.h |
Data Structures | |
struct | vlc_object_t |
The main vlc_object_t structure. More... | |
Macros | |
#define | OBJECT_FLAGS_QUIET 0x0002 |
#define | OBJECT_FLAGS_NOINTERACT 0x0004 |
#define | OBJECT_FLAGS_INSECURE 0x1000 /* VLC 3.0 only, will be removed */ |
#define | vlc_object_get_name(o) vlc_object_get_name(VLC_OBJECT(o)) |
#define | vlc_object_create(a, b) vlc_object_create( VLC_OBJECT(a), b ) |
#define | vlc_object_find_name(a, b) vlc_object_find_name( VLC_OBJECT(a),b) |
#define | vlc_object_hold(a) vlc_object_hold( VLC_OBJECT(a) ) |
#define | vlc_object_release(a) vlc_object_release( VLC_OBJECT(a) ) |
#define | vlc_list_children(a) vlc_list_children( VLC_OBJECT(a) ) |
Functions | |
void * | vlc_object_create (vlc_object_t *, size_t) |
Allocates and initializes a vlc object. More... | |
vlc_object_t * | vlc_object_find_name (vlc_object_t *, const char *) |
Finds a named object and increment its reference count. More... | |
void * | vlc_object_hold (vlc_object_t *) |
Increment an object reference counter. More... | |
void | vlc_object_release (vlc_object_t *) |
Drops a reference to an object (decrements the reference count). More... | |
vlc_list_t * | vlc_list_children (vlc_object_t *) |
Gets the list of children of an object, and increment their reference count. More... | |
void | vlc_list_release (vlc_list_t *) |
char * | vlc_object_get_name (const vlc_object_t *) |
void * | vlc_obj_malloc (vlc_object_t *, size_t) |
void * | vlc_obj_calloc (vlc_object_t *, size_t, size_t) |
void | vlc_obj_free (vlc_object_t *, void *) |
#define OBJECT_FLAGS_INSECURE 0x1000 /* VLC 3.0 only, will be removed */ |
#define OBJECT_FLAGS_NOINTERACT 0x0004 |
#define OBJECT_FLAGS_QUIET 0x0002 |
#define vlc_list_children | ( | a | ) | vlc_list_children( VLC_OBJECT(a) ) |
#define vlc_object_create | ( | a, | |
b | |||
) | vlc_object_create( VLC_OBJECT(a), b ) |
#define vlc_object_find_name | ( | a, | |
b | |||
) | vlc_object_find_name( VLC_OBJECT(a),b) |
#define vlc_object_get_name | ( | o | ) | vlc_object_get_name(VLC_OBJECT(o)) |
#define vlc_object_hold | ( | a | ) | vlc_object_hold( VLC_OBJECT(a) ) |
#define vlc_object_release | ( | a | ) | vlc_object_release( VLC_OBJECT(a) ) |
vlc_list_t* vlc_list_children | ( | vlc_object_t * | obj | ) |
Gets the list of children of an object, and increment their reference count.
References count, vlc_list_t::i_count, vlc_object_internals::next, vlc_value_t::p_address, vlc_list_t::p_values, unlikely, vlc_alloc(), vlc_externals, vlc_internals, vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_object_hold().
void vlc_list_release | ( | vlc_list_t * | ) |
References vlc_list_t::i_count, vlc_value_t::p_address, vlc_list_t::p_values, and vlc_object_release().
void* vlc_obj_calloc | ( | vlc_object_t * | , |
size_t | , | ||
size_t | |||
) |
References vlc_obj_alloc_common().
void vlc_obj_free | ( | vlc_object_t * | , |
void * | |||
) |
References ptrcmp(), and vlc_objres_remove().
void* vlc_obj_malloc | ( | vlc_object_t * | , |
size_t | |||
) |
References dummy_release(), likely, vlc_objres_new(), and vlc_objres_push().
void* vlc_object_create | ( | vlc_object_t * | p_this, |
size_t | i_size | ||
) |
Allocates and initializes a vlc object.
i_size | object byte size |
References vlc_custom_create().
vlc_object_t* vlc_object_find_name | ( | vlc_object_t * | p_this, |
const char * | psz_name | ||
) |
Finds a named object and increment its reference count.
Beware that objects found in this manner can be "owned" by another thread, be of any type, and be attached to any module (if any). With such an object reference, you can set or get object variables, emit log messages, and read write-once object parameters (obj.object_type, etc). You CANNOT cast the object to a more specific object type, and you definitely cannot invoke object type-specific callbacks with this.
p_this | object to search from |
psz_name | name of the object to search for |
References FindName(), msg_Err, name_lock, psz_name, vlc_mutex_lock(), and vlc_mutex_unlock().
char* vlc_object_get_name | ( | const vlc_object_t * | ) |
References name, name_lock, vlc_object_internals::psz_name, strdup(), vlc_internals, vlc_mutex_lock(), and vlc_mutex_unlock().
void* vlc_object_hold | ( | vlc_object_t * | ) |
Increment an object reference counter.
References vlc_object_internals::refs, and vlc_internals.
Referenced by vlc_custom_create(), and vlc_list_children().
void vlc_object_release | ( | vlc_object_t * | obj | ) |
Drops a reference to an object (decrements the reference count).
If the count reaches zero, the object is destroyed.
References vlc_object_internals::first, likely, vlc_object_internals::next, vlc_object_t::obj, vlc_common_members::parent, vlc_object_internals::prev, vlc_object_internals::refs, vlc_object_internals::tree_lock, unlikely, vlc_internals, vlc_mutex_lock(), vlc_mutex_unlock(), vlc_object_destroy(), vlc_object_release(), vlc_restorecancel(), and vlc_savecancel().
Referenced by vlc_list_release(), and vlc_object_release().