VLC 4.0.0-dev
|
Modules | |
Object resources | |
The object resource functions tie resource allocation to an instance of a module through a VLC object. | |
Variables | |
VLC object variables and callbacks. | |
Files | |
file | vlc_objects.h |
Common VLC object definitions. | |
Data Structures | |
struct | vlc_object_t |
VLC object common members. More... | |
struct | libvlc_int_t |
Macros | |
#define | VLC_OBJECT(x) |
Type-safe vlc_object_t cast. More... | |
#define | vlc_object_delete(obj) vlc_object_delete(VLC_OBJECT(obj)) |
#define | vlc_object_parent(o) vlc_object_parent(VLC_OBJECT(o)) |
#define | vlc_object_logger(o) vlc_object_logger(VLC_OBJECT(o)) |
#define | vlc_object_get_name(obj) var_GetString(obj, "module-name") |
Tries to get the name of module bound to an object. More... | |
#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_instance(o) vlc_object_instance(VLC_OBJECT(o)) |
#define | vlc_object_release(o) vlc_object_release(VLC_OBJECT(o)) |
Functions | |
void * | vlc_object_create (_Generic((vlc_object_t *) ->obj, struct vlc_object_marker *:(vlc_object_t *), default:(&((vlc_object_t *) ->obj))), size_t i_size) |
Allocates and initializes a vlc object. More... | |
void | vlc_object_delete (_Generic((vlc_object_t *obj) ->obj, struct vlc_object_marker *:(vlc_object_t *obj), default:(&((vlc_object_t *obj) ->obj)))) |
Drops the strong reference to an object. More... | |
size_t | vlc_list_children (vlc_object_t *, vlc_object_t **, size_t) |
const char * | vlc_object_typename (const vlc_object_t *obj) |
Returns the object type name. More... | |
vlc_object_t * | vlc_object_parent (_Generic((vlc_object_t *obj) ->obj, struct vlc_object_marker *:(vlc_object_t *obj), default:(&((vlc_object_t *obj) ->obj)))) |
Gets the parent of an object. More... | |
static struct vlc_logger * | vlc_object_logger (_Generic((vlc_object_t *obj) ->obj, struct vlc_object_marker *:(vlc_object_t *obj), default:(&((vlc_object_t *obj) ->obj)))) |
struct vlc_tracer * | vlc_object_get_tracer (vlc_object_t *obj) |
Get tracer of a vlc instance from an object. More... | |
static libvlc_int_t * | vlc_object_instance (_Generic((vlc_object_t *obj) ->obj, struct vlc_object_marker *:(vlc_object_t *obj), default:(&((vlc_object_t *obj) ->obj)))) |
vout_thread_t * | vout_Hold (vout_thread_t *vout) |
void | vout_Release (vout_thread_t *vout) |
audio_output_t * | aout_Hold (audio_output_t *aout) |
void | aout_Release (audio_output_t *aout) |
static void * | vlc_object_hold (vlc_object_t *o) |
static void | vlc_object_release (_Generic((vlc_object_t *o) ->obj, struct vlc_object_marker *:(vlc_object_t *o), default:(&((vlc_object_t *o) ->obj)))) |
#define VLC_OBJECT | ( | x | ) |
Type-safe vlc_object_t cast.
This macro attempts to cast a pointer to a compound type to a vlc_object_t pointer in a type-safe manner. It checks if the compound type actually starts with an embedded vlc_object_t structure.
#define vlc_object_create | ( | a, | |
b | |||
) | vlc_object_create( VLC_OBJECT(a), b ) |
#define vlc_object_delete | ( | obj | ) | vlc_object_delete(VLC_OBJECT(obj)) |
#define vlc_object_find_name | ( | a, | |
b | |||
) | vlc_object_find_name( VLC_OBJECT(a),b) |
#define vlc_object_get_name | ( | obj | ) | var_GetString(obj, "module-name") |
Tries to get the name of module bound to an object.
#define vlc_object_instance | ( | o | ) | vlc_object_instance(VLC_OBJECT(o)) |
#define vlc_object_logger | ( | o | ) | vlc_object_logger(VLC_OBJECT(o)) |
#define vlc_object_parent | ( | o | ) | vlc_object_parent(VLC_OBJECT(o)) |
#define vlc_object_release | ( | o | ) | vlc_object_release(VLC_OBJECT(o)) |
audio_output_t * aout_Hold | ( | audio_output_t * | aout | ) |
References aout_owner(), aout_owner_t::rc, and vlc_atomic_rc_inc().
Referenced by input_resource_HoldAout(), and vlc_object_hold().
void aout_Release | ( | audio_output_t * | aout | ) |
References aout_Destroy(), aout_owner(), aout_owner_t::rc, and vlc_atomic_rc_dec().
Referenced by ControlNav(), input_resource_PutAout(), input_resource_Release(), input_resource_ResetAout(), ViewpointApply(), vlc_object_release(), vlc_player_AddMetadataLoudnessListener(), vlc_player_aout_AddCallbacks(), vlc_player_aout_DelCallbacks(), vlc_player_aout_EnableFilter(), vlc_player_aout_GetVolume(), vlc_player_aout_IncrementVolume(), vlc_player_aout_IsMuted(), vlc_player_aout_Mute(), vlc_player_aout_SetVolume(), vlc_player_RemoveMetadataLoudnessListener(), and vlc_strfplayer().
size_t vlc_list_children | ( | vlc_object_t * | , |
vlc_object_t ** | , | ||
size_t | |||
) |
void * vlc_object_create | ( | _Generic((vlc_object_t *) ->obj, struct vlc_object_marker *:(vlc_object_t *), default:(&((vlc_object_t *) ->obj))) | , |
size_t | i_size | ||
) |
Allocates and initializes a vlc object.
i_size | object byte size |
void vlc_object_delete | ( | _Generic((vlc_object_t *obj) ->obj, struct vlc_object_marker *:(vlc_object_t *obj), default:(&((vlc_object_t *obj) ->obj))) | ) |
Drops the strong reference to an object.
This removes the initial strong reference to a given object. This must be called exactly once per allocated object after it is no longer needed, matching vlc_object_create() or vlc_custom_create().
struct vlc_tracer * vlc_object_get_tracer | ( | vlc_object_t * | obj | ) |
Get tracer of a vlc instance from an object.
References libvlc_priv(), libvlc_priv_t::tracer, and vlc_object_instance.
Referenced by aout_stream_tracer(), DecoderThread_DecodeBlock(), EsOutProgramAdd(), EsOutSend(), EsOutVaControlLocked(), GetTracer(), ModuleThread_QueueAudio(), ModuleThread_QueueSpu(), ModuleThread_QueueVideo(), and sout_ClockMainCreate().
|
inlinestatic |
References aout_Hold(), vlc_object_typename(), and vout_Hold().
Referenced by vlc_list_children().
|
inlinestatic |
References vlc_object_parent.
|
inlinestatic |
References vlc_object_t::logger.
vlc_object_t * vlc_object_parent | ( | _Generic((vlc_object_t *obj) ->obj, struct vlc_object_marker *:(vlc_object_t *obj), default:(&((vlc_object_t *obj) ->obj))) | ) |
Gets the parent of an object.
|
inlinestatic |
References aout_Release(), vlc_object_typename(), and vout_Release().
const char * vlc_object_typename | ( | const vlc_object_t * | obj | ) |
Returns the object type name.
This returns a nul-terminated string identifying the object type. The string is valid for at least as long as the object reference.
obj | object whose type name to get |
References vlc_internals.
Referenced by vlc_object_hold(), vlc_object_release(), and vlc_object_vaLog().
vout_thread_t * vout_Hold | ( | vout_thread_t * | vout | ) |
References vout_thread_sys_t::rc, vlc_atomic_rc_inc(), and VOUT_THREAD_TO_SYS.
Referenced by DeleteDecoder(), input_resource_HoldDummyVout(), input_resource_HoldVout(), input_resource_HoldVouts(), and vlc_object_hold().
void vout_Release | ( | vout_thread_t * | vout | ) |
References vout_thread_sys_t::dec_device, vout_thread_sys_t::display_cfg, vout_thread_sys_t::dummy, vout_display_cfg::icc_profile, vout_thread_sys_t::original, vout_thread_sys_t::rc, vout_thread_sys_t::snapshot, vout_thread_sys_t::splitter_name, vout_thread_sys_t::statistic, video_format_Clean(), vlc_atomic_rc_dec(), vlc_decoder_device_Release(), VLC_OBJECT, vlc_object_delete, vout_display_window_Delete(), vout_snapshot_Destroy(), vout_statistic_Clean(), VOUT_THREAD_TO_SYS, vout_display_cfg::window, and vout_thread_sys_t::window_enabled.
Referenced by ControlNav(), DeleteDecoder(), input_resource_Release(), ModuleThread_NewSpuBuffer(), ViewpointApply(), vlc_object_release(), vlc_player_input_RestoreMlStates(), vlc_player_osd_ReleaseAll(), vlc_player_vout_IsFullscreen(), vlc_player_vout_IsWallpaperModeEnabled(), vlc_player_vout_SetVar(), vlc_player_vout_TriggerOption(), and vout_Close().