VLC
4.0.0-dev
|
Modules | |
Variable types | |
These are the different types a vlc variable can have. | |
Additive flags | |
These flags are added to the type field of the variable. Most as a result of a var_Change() call, but some may be added at creation time. | |
Variable actions | |
These are the different actions that can be used with var_Change(). The parameters given are the meaning of the two last parameters of var_Change() when this action is being used. | |
Files | |
file | vlc_variables.h |
Macros | |
#define | VLC_VAR_TYPE 0x00ff |
#define | VLC_VAR_CLASS 0x00f0 |
#define | VLC_VAR_FLAGS 0xff00 |
Enumerations | |
enum | vlc_var_atomic_op { VLC_VAR_BOOL_TOGGLE, VLC_VAR_INTEGER_ADD, VLC_VAR_INTEGER_OR, VLC_VAR_INTEGER_NAND } |
Variable actions. More... | |
Functions | |
VLC_EXPORT int | var_Create (vlc_object_t *obj, const char *name, int type) |
Creates a VLC object variable. More... | |
VLC_EXPORT void | var_Destroy (vlc_object_t *obj, const char *name) |
Destroys a VLC object variable. More... | |
VLC_EXPORT int | var_Change (vlc_object_t *obj, const char *name, int action,...) |
Performs a special action on a variable. More... | |
VLC_EXPORT int | var_Type (vlc_object_t *obj, const char *name) |
Get the type of a variable. More... | |
VLC_EXPORT int | var_Set (vlc_object_t *obj, const char *name, vlc_value_t val) |
Sets a variable value. More... | |
VLC_EXPORT int | var_Get (vlc_object_t *obj, const char *name, vlc_value_t *valp) |
Gets a variable value. More... | |
VLC_EXPORT int | var_SetChecked (vlc_object_t *, const char *, int, vlc_value_t) |
VLC_EXPORT int | var_GetChecked (vlc_object_t *, const char *, int, vlc_value_t *) |
VLC_EXPORT int | var_GetAndSet (vlc_object_t *obj, const char *name, int op, vlc_value_t *value) |
Perform an atomic read-modify-write of a variable. More... | |
VLC_EXPORT int | var_Inherit (vlc_object_t *, const char *, int, vlc_value_t *) |
Finds the value of a variable. More... | |
VLC_EXPORT void | var_AddCallback (vlc_object_t *obj, const char *name, vlc_callback_t callback, void *opaque) |
Registers a callback for a variable. More... | |
VLC_EXPORT void | var_DelCallback (vlc_object_t *obj, const char *name, vlc_callback_t callback, void *opaque) |
Deregisters a callback from a variable. More... | |
VLC_EXPORT void | var_TriggerCallback (vlc_object_t *obj, const char *name) |
Triggers callbacks on a variable. More... | |
VLC_EXPORT void | var_AddListCallback (vlc_object_t *, const char *, vlc_list_callback_t, void *) |
Register a callback for a list variable. More... | |
VLC_EXPORT void | var_DelListCallback (vlc_object_t *, const char *, vlc_list_callback_t, void *) |
Remove a callback from a list variable. More... | |
static int | var_SetInteger (vlc_object_t *p_obj, const char *psz_name, int64_t i) |
Set the value of an integer variable. More... | |
static int | var_SetBool (vlc_object_t *p_obj, const char *psz_name, bool b) |
Set the value of an boolean variable. More... | |
static int | var_SetCoords (vlc_object_t *obj, const char *name, int32_t x, int32_t y) |
static int | var_SetFloat (vlc_object_t *p_obj, const char *psz_name, float f) |
Set the value of a float variable. More... | |
static int | var_SetString (vlc_object_t *p_obj, const char *psz_name, const char *psz_string) |
Set the value of a string variable. More... | |
static int | var_SetAddress (vlc_object_t *p_obj, const char *psz_name, void *ptr) |
Set the value of a pointer variable. More... | |
static int64_t | var_GetInteger (vlc_object_t *p_obj, const char *psz_name) |
Get an integer value. More... | |
static bool | var_GetBool (vlc_object_t *p_obj, const char *psz_name) |
Get a boolean value. More... | |
static void | var_GetCoords (vlc_object_t *obj, const char *name, int32_t *px, int32_t *py) |
static float | var_GetFloat (vlc_object_t *p_obj, const char *psz_name) |
Get a float value. More... | |
static char * | var_GetString (vlc_object_t *p_obj, const char *psz_name) |
Get a string value. More... | |
static char * | var_GetNonEmptyString (vlc_object_t *p_obj, const char *psz_name) |
static void * | var_GetAddress (vlc_object_t *p_obj, const char *psz_name) |
static int64_t | var_IncInteger (vlc_object_t *p_obj, const char *psz_name) |
Increment an integer variable. More... | |
static int64_t | var_DecInteger (vlc_object_t *p_obj, const char *psz_name) |
Decrement an integer variable. More... | |
static uint64_t | var_OrInteger (vlc_object_t *obj, const char *name, unsigned v) |
static uint64_t | var_NAndInteger (vlc_object_t *obj, const char *name, unsigned v) |
static int64_t | var_CreateGetInteger (vlc_object_t *p_obj, const char *psz_name) |
Create a integer variable with inherit and get its value. More... | |
static bool | var_CreateGetBool (vlc_object_t *p_obj, const char *psz_name) |
Create a boolean variable with inherit and get its value. More... | |
static float | var_CreateGetFloat (vlc_object_t *p_obj, const char *psz_name) |
Create a float variable with inherit and get its value. More... | |
static char * | var_CreateGetString (vlc_object_t *p_obj, const char *psz_name) |
Create a string variable with inherit and get its value. More... | |
static char * | var_CreateGetNonEmptyString (vlc_object_t *p_obj, const char *psz_name) |
static void * | var_CreateGetAddress (vlc_object_t *p_obj, const char *psz_name) |
Create an address variable with inherit and get its value. More... | |
static int64_t | var_CreateGetIntegerCommand (vlc_object_t *p_obj, const char *psz_name) |
Create a integer command variable with inherit and get its value. More... | |
static bool | var_CreateGetBoolCommand (vlc_object_t *p_obj, const char *psz_name) |
Create a boolean command variable with inherit and get its value. More... | |
static float | var_CreateGetFloatCommand (vlc_object_t *p_obj, const char *psz_name) |
Create a float command variable with inherit and get its value. More... | |
static char * | var_CreateGetStringCommand (vlc_object_t *p_obj, const char *psz_name) |
Create a string command variable with inherit and get its value. More... | |
static char * | var_CreateGetNonEmptyStringCommand (vlc_object_t *p_obj, const char *psz_name) |
static int | var_CountChoices (vlc_object_t *p_obj, const char *psz_name) |
static bool | var_ToggleBool (vlc_object_t *p_obj, const char *psz_name) |
static bool | var_InheritBool (vlc_object_t *obj, const char *name) |
static int64_t | var_InheritInteger (vlc_object_t *obj, const char *name) |
static float | var_InheritFloat (vlc_object_t *obj, const char *name) |
static char * | var_InheritString (vlc_object_t *obj, const char *name) |
static void * | var_InheritAddress (vlc_object_t *obj, const char *name) |
VLC_EXPORT int | var_InheritURational (vlc_object_t *obj, unsigned *num, unsigned *den, const char *name) |
Inherit a string as a fractional value. More... | |
VLC_EXPORT int | var_LocationParse (vlc_object_t *, const char *mrl, const char *prefix) |
Parses a string with multiple options. More... | |
VLC object variables and callbacks
#define VLC_VAR_CLASS 0x00f0 |
#define VLC_VAR_FLAGS 0xff00 |
#define VLC_VAR_TYPE 0x00ff |
enum vlc_var_atomic_op |
Variable actions.
These are the different actions that can be used with var_GetAndSet().
VLC_EXPORT void var_AddCallback | ( | vlc_object_t * | obj, |
const char * | name, | ||
vlc_callback_t | callback, | ||
void * | opaque | ||
) |
Registers a callback for a variable.
We store a function pointer that will be called upon variable modification.
obj | Object holding the variable |
name | Variable name |
callback | Callback function pointer |
opaque | Opaque data pointer for use by the callback. |
References AddCallback(), psz_name, vlc_value_callback, and xmalloc().
Referenced by aout_FiltersNewWithClock(), aout_New(), filter_AddProxyCallbacks(), intf_Create(), libvlc_InternalActionsInit(), vlc_player_aout_AddCallbacks(), vlc_player_New(), vlc_player_vout_AddCallbacks(), vout_CreateVars(), vout_InitInterlacingSupport(), vout_IntfInit(), and vout_OpenWrapper().
VLC_EXPORT void var_AddListCallback | ( | vlc_object_t * | , |
const char * | , | ||
vlc_list_callback_t | , | ||
void * | |||
) |
Register a callback for a list variable.
The callback is triggered when an element is added/removed from the list or when the list is cleared.
See var_AddCallback().
References AddCallback(), psz_name, vlc_list_callback, and xmalloc().
VLC_EXPORT int var_Change | ( | vlc_object_t * | obj, |
const char * | name, | ||
int | action, | ||
... | |||
) |
Performs a special action on a variable.
obj | Object holding the variable |
name | Variable name |
action | Action to perform. Must be one of Variable actions |
References CheckValue(), variable_t::choices, variable_t::choices_count, variable_t::choices_text, count, vlc_value_t::f_float, FreeDummy(), vlc_value_t::i_int, variable_t::i_type, Lookup(), variable_t::max, variable_t::min, variable_t::ops, variable_ops_t::pf_cmp, variable_ops_t::pf_dup, variable_ops_t::pf_free, psz_name, variable_t::psz_text, variable_t::step, strdup(), TAB_APPEND, TAB_CLEAN, TAB_ERASE, TriggerListCallback(), variable_t::val, vlc_object_internals::var_lock, VLC_EGENERIC, VLC_ENOVAR, vlc_internals, vlc_mutex_unlock(), VLC_SUCCESS, VLC_VAR_ADDCHOICE, VLC_VAR_CHOICESCOUNT, VLC_VAR_CLEARCHOICES, VLC_VAR_DELCHOICE, VLC_VAR_FLOAT, VLC_VAR_GETCHOICES, VLC_VAR_GETMAX, VLC_VAR_GETMIN, VLC_VAR_GETSTEP, VLC_VAR_GETTEXT, VLC_VAR_INTEGER, VLC_VAR_SETMINMAX, VLC_VAR_SETSTEP, VLC_VAR_SETTEXT, VLC_VAR_SETVALUE, VLC_VAR_TYPE, and xmalloc().
Referenced by AddCustomRatios(), aout_New(), aout_PrepareStereoMode(), config_ChainParse(), config_LoadCmdLine(), intf_Create(), var_CountChoices(), ViewpointApply(), vout_CreateVars(), vout_InitInterlacingSupport(), and vout_osd_PrintVariableText().
|
inlinestatic |
References count, psz_name, var_Change(), and VLC_VAR_CHOICESCOUNT.
Referenced by EsOutSetRecord().
VLC_EXPORT int var_Create | ( | vlc_object_t * | obj, |
const char * | name, | ||
int | type | ||
) |
Creates a VLC object variable.
This function creates a named variable within a VLC object. If a variable already exists with the same name within the same object, its reference count is incremented instead.
obj | Object to hold the variable |
name | Variable name |
type | Variable type. Must be one of Variable types combined with zero or more Additive flags |
References addr_ops, vlc_value_t::b_bool, variable_t::b_incallback, bool_ops, variable_t::choices, variable_t::choices_count, variable_t::choices_text, vlc_value_t::coords, coords_ops, Destroy(), vlc_value_t::f_float, float_ops, vlc_value_t::i_int, variable_t::i_type, i_type, variable_t::i_usage, int_ops, variable_t::max, variable_t::min, variable_t::ops, vlc_value_t::p_address, psz_name, variable_t::psz_name, vlc_value_t::psz_string, variable_t::psz_text, strdup(), string_ops, tsearch(), unlikely, variable_t::val, variable_t::value_callbacks, var_Inherit(), vlc_object_internals::var_lock, vlc_object_internals::var_root, varcmp(), vlc_assert_unreachable, VLC_ENOMEM, vlc_internals, vlc_mutex_lock(), vlc_mutex_unlock(), VLC_SUCCESS, VLC_VAR_ADDRESS, VLC_VAR_BOOL, VLC_VAR_CLASS, VLC_VAR_COORDS, VLC_VAR_DOINHERIT, VLC_VAR_FLOAT, VLC_VAR_INTEGER, VLC_VAR_ISCOMMAND, VLC_VAR_STRING, VLC_VAR_VOID, void_ops, vlc_value_t::x, and vlc_value_t::y.
Referenced by aout_New(), config_ChainParse(), config_LoadCmdLine(), config_PrintHelp(), filter_AddProxyCallbacks(), input_ConfigVarInit(), input_item_ApplyOptions(), InputSourceInit(), intf_Create(), libvlc_InternalActionsInit(), libvlc_InternalInit(), LoadSlaves(), module_need(), OpenURL(), system_Configure(), var_CreateGetAddress(), var_CreateGetBool(), var_CreateGetBoolCommand(), var_CreateGetFloat(), var_CreateGetFloatCommand(), var_CreateGetInteger(), var_CreateGetIntegerCommand(), var_CreateGetNonEmptyString(), var_CreateGetNonEmptyStringCommand(), var_CreateGetString(), var_CreateGetStringCommand(), var_OptionParse(), VisualizationCallback(), vlc_player_Start(), vlm_New(), vout_Create(), vout_CreateVars(), vout_display_window_New(), vout_InitInterlacingSupport(), and vout_OpenWrapper().
|
inlinestatic |
Create an address variable with inherit and get its value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References psz_name, var_Create(), var_GetAddress(), VLC_VAR_ADDRESS, and VLC_VAR_DOINHERIT.
Referenced by vlc_mta_acquire().
|
inlinestatic |
Create a boolean variable with inherit and get its value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References psz_name, var_Create(), var_GetBool(), VLC_VAR_BOOL, and VLC_VAR_DOINHERIT.
Referenced by decoder_UpdateVideoOutput().
|
inlinestatic |
Create a boolean command variable with inherit and get its value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References psz_name, var_Create(), var_GetBool(), VLC_VAR_BOOL, VLC_VAR_DOINHERIT, and VLC_VAR_ISCOMMAND.
|
inlinestatic |
Create a float variable with inherit and get its value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References psz_name, var_Create(), var_GetFloat(), VLC_VAR_DOINHERIT, and VLC_VAR_FLOAT.
|
inlinestatic |
Create a float command variable with inherit and get its value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References psz_name, var_Create(), var_GetFloat(), VLC_VAR_DOINHERIT, VLC_VAR_FLOAT, and VLC_VAR_ISCOMMAND.
|
inlinestatic |
Create a integer variable with inherit and get its value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References psz_name, var_Create(), var_GetInteger(), VLC_VAR_DOINHERIT, and VLC_VAR_INTEGER.
Referenced by AddressCreate(), input_EsOutTimeshiftNew(), and OpenURL().
|
inlinestatic |
Create a integer command variable with inherit and get its value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References psz_name, var_Create(), var_GetInteger(), VLC_VAR_DOINHERIT, VLC_VAR_INTEGER, and VLC_VAR_ISCOMMAND.
|
inlinestatic |
References psz_name, var_Create(), var_GetNonEmptyString(), VLC_VAR_DOINHERIT, and VLC_VAR_STRING.
Referenced by EsOutSetRecord(), OpenURL(), and vout_CreateVars().
|
inlinestatic |
References psz_name, var_Create(), var_GetNonEmptyString(), VLC_VAR_DOINHERIT, VLC_VAR_ISCOMMAND, and VLC_VAR_STRING.
|
inlinestatic |
Create a string variable with inherit and get its value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References psz_name, var_Create(), var_GetString(), VLC_VAR_DOINHERIT, and VLC_VAR_STRING.
Referenced by DeinterlaceCallback().
|
inlinestatic |
Create a string command variable with inherit and get its value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References psz_name, var_Create(), var_GetString(), VLC_VAR_DOINHERIT, VLC_VAR_ISCOMMAND, and VLC_VAR_STRING.
|
inlinestatic |
Decrement an integer variable.
p_obj | the object that holds the variable |
psz_name | the name of the variable |
References vlc_value_t::i_int, psz_name, var_GetAndSet(), and VLC_VAR_INTEGER_ADD.
Referenced by aout_PolicyNotify().
VLC_EXPORT void var_DelCallback | ( | vlc_object_t * | obj, |
const char * | name, | ||
vlc_callback_t | callback, | ||
void * | opaque | ||
) |
Deregisters a callback from a variable.
The callback and opaque pointer must be supplied again, as the same callback function might have been registered more than once.
References DelCallback(), psz_name, and vlc_value_callback.
Referenced by aout_Destroy(), aout_FiltersDelete(), aout_FiltersNewWithClock(), aout_volume_Delete(), filter_DelProxyCallbacks(), intf_DestroyAll(), libvlc_InternalActionsClean(), vlc_player_aout_DelCallbacks(), vlc_player_Delete(), vlc_player_New(), vlc_player_vout_DelCallbacks(), vout_CloseWrapper(), and vout_IntfDeinit().
VLC_EXPORT void var_DelListCallback | ( | vlc_object_t * | , |
const char * | , | ||
vlc_list_callback_t | , | ||
void * | |||
) |
Remove a callback from a list variable.
See var_DelCallback().
References DelCallback(), psz_name, and vlc_list_callback.
VLC_EXPORT void var_Destroy | ( | vlc_object_t * | obj, |
const char * | name | ||
) |
Destroys a VLC object variable.
This function decrements the reference count of a named variable within a VLC object. If the reference count reaches zero, the variable is destroyed.
obj | Object holding the variable |
name | Variable name |
References variable_t::b_incallback, Destroy(), variable_t::i_usage, Lookup(), msg_Dbg, psz_name, tdelete(), vlc_object_internals::var_lock, vlc_object_internals::var_root, varcmp(), vlc_internals, and vlc_mutex_unlock().
Referenced by filter_DelProxyCallbacks(), LoadSlaves(), module_unneed(), vlc_player_Delete(), vout_Create(), and vout_display_window_Delete().
VLC_EXPORT int var_Get | ( | vlc_object_t * | obj, |
const char * | name, | ||
vlc_value_t * | valp | ||
) |
Gets a variable value.
obj | Object holding the variable |
name | Variable name |
valp | Pointer to a vlc_value_t object to hold the value [OUT] |
References psz_name, and var_GetChecked().
Referenced by config_ChainParse().
|
inlinestatic |
References vlc_value_t::p_address, psz_name, var_GetChecked(), and VLC_VAR_ADDRESS.
Referenced by var_CreateGetAddress(), and vlc_player_Delete().
VLC_EXPORT int var_GetAndSet | ( | vlc_object_t * | obj, |
const char * | name, | ||
int | op, | ||
vlc_value_t * | value | ||
) |
Perform an atomic read-modify-write of a variable.
obj | object holding the variable |
name | variable name |
op | read-modify-write operation to perform (see vlc_var_atomic_op) |
value | value of the variable after the modification |
VLC_SUCCESS | Operation successful |
VLC_ENOVAR | Variable not found |
References vlc_value_t::b_bool, CheckValue(), vlc_value_t::i_int, variable_t::i_type, Lookup(), psz_name, TriggerCallback(), variable_t::val, vlc_object_internals::var_lock, VLC_EGENERIC, VLC_ENOVAR, vlc_internals, vlc_mutex_unlock(), VLC_SUCCESS, VLC_VAR_BOOL, VLC_VAR_BOOL_TOGGLE, VLC_VAR_INTEGER, VLC_VAR_INTEGER_ADD, VLC_VAR_INTEGER_NAND, VLC_VAR_INTEGER_OR, and WaitUnused().
Referenced by var_DecInteger(), var_IncInteger(), var_NAndInteger(), var_OrInteger(), and var_ToggleBool().
|
inlinestatic |
Get a boolean value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References vlc_value_t::b_bool, psz_name, var_GetChecked(), and VLC_VAR_BOOL.
Referenced by ControlNav(), DeinterlaceCallback(), EnableWindowLocked(), EsOutSelectEs(), InitPrograms(), InputSourceInit(), LoadSlaves(), var_CreateGetBool(), var_CreateGetBoolCommand(), vlc_input_decoder_GetVbiPage(), vlc_player_destructor_Thread(), vlc_player_IsTrackCategoryEnabled(), vlc_player_vout_IsFullscreen(), vlc_player_vout_IsWallpaperModeEnabled(), and VoutGetDisplayCfg().
VLC_EXPORT int var_GetChecked | ( | vlc_object_t * | , |
const char * | , | ||
int | , | ||
vlc_value_t * | |||
) |
References variable_t::i_type, Lookup(), variable_t::ops, variable_ops_t::pf_dup, psz_name, variable_t::val, vlc_object_internals::var_lock, VLC_ENOVAR, vlc_internals, vlc_mutex_unlock(), VLC_SUCCESS, VLC_VAR_CLASS, and VLC_VAR_VOID.
Referenced by var_Get(), var_GetAddress(), var_GetBool(), var_GetCoords(), var_GetFloat(), var_GetInteger(), var_GetNonEmptyString(), var_GetString(), and var_Inherit().
|
inlinestatic |
References vlc_value_t::coords, likely, name, var_GetChecked(), VLC_VAR_COORDS, vlc_value_t::x, and vlc_value_t::y.
|
inlinestatic |
Get a float value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References vlc_value_t::f_float, psz_name, var_GetChecked(), and VLC_VAR_FLOAT.
Referenced by aout_VolumeGet(), Init(), StartTitle(), var_CreateGetFloat(), var_CreateGetFloatCommand(), vlc_player_GetAssociatedSubsFPS(), vlc_player_GetRate(), vlc_player_UpdateMLStates(), and VoutGetDisplayCfg().
|
inlinestatic |
Get an integer value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References vlc_value_t::i_int, psz_name, var_GetChecked(), and VLC_VAR_INTEGER.
Referenced by aout_New(), Control(), CropBorderCallback(), DeinterlaceCallback(), EsOutPropsInit(), input_EsOutNew(), InputSourceInit(), MainLoopTryRepeat(), subtitles_Detect(), UpdatePtsDelay(), var_CreateGetInteger(), var_CreateGetIntegerCommand(), vlc_input_decoder_GetVbiPage(), vlc_player_GetSubtitleTextScale(), vlc_player_vout_OSDCallback(), vout_InitInterlacingSupport(), VoutGetDisplayCfg(), and VoutSaveSnapshot().
|
inlinestatic |
References psz_name, vlc_value_t::psz_string, var_GetChecked(), and VLC_VAR_STRING.
Referenced by aout_DeviceGet(), aout_New(), EsOutPropsInit(), EsOutSelect(), GetVarSlaves(), InitPrograms(), InputMetaUser(), InputSourceInit(), LoadSlaves(), var_CreateGetNonEmptyString(), var_CreateGetNonEmptyStringCommand(), vlc_player_UpdateMLStates(), and vout_InitInterlacingSupport().
|
inlinestatic |
Get a string value.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
References psz_name, vlc_value_t::psz_string, var_GetChecked(), and VLC_VAR_STRING.
Referenced by aout_EnableFilter(), DeinterlaceCallback(), EsOutPropsInit(), system_ConfigureDbus(), var_CreateGetString(), var_CreateGetStringCommand(), vlc_player_GetCategoryLanguage(), and vlc_player_vout_OSDCallback().
|
inlinestatic |
Increment an integer variable.
p_obj | the object that holds the variable |
psz_name | the name of the variable |
References vlc_value_t::i_int, psz_name, var_GetAndSet(), and VLC_VAR_INTEGER_ADD.
Referenced by aout_PolicyNotify().
VLC_EXPORT int var_Inherit | ( | vlc_object_t * | , |
const char * | , | ||
int | , | ||
vlc_value_t * | |||
) |
Finds the value of a variable.
If the specified object does not hold a variable with the specified name, try the parent object, and iterate until the top of the objects tree. If no match is found, the value is read from the configuration.
References vlc_value_t::b_bool, config_GetFloat(), config_GetInt(), config_GetPsz(), vlc_value_t::f_float, vlc_value_t::i_int, i_type, psz_name, vlc_value_t::psz_string, strdup(), var_GetChecked(), vlc_assert_unreachable, VLC_ENOOBJ, vlc_object_parent, VLC_SUCCESS, VLC_VAR_ADDRESS, VLC_VAR_BOOL, VLC_VAR_CLASS, VLC_VAR_FLOAT, VLC_VAR_INTEGER, and VLC_VAR_STRING.
Referenced by var_Create(), var_InheritAddress(), var_InheritBool(), var_InheritFloat(), var_InheritInteger(), and var_InheritString().
|
inlinestatic |
References name, vlc_value_t::p_address, var_Inherit(), and VLC_VAR_ADDRESS.
Referenced by Create(), Open(), and vlc_mta_release().
|
inlinestatic |
References vlc_value_t::b_bool, name, var_Inherit(), and VLC_VAR_BOOL.
Referenced by aout_FiltersNewWithClock(), aout_MuteGet(), aout_New(), aout_ReplayGainSelect(), config_PrintHelp(), Create(), EnableWindowLocked(), InputDemuxNew(), libvlc_InternalCleanup(), libvlc_InternalInit(), libvlc_InternalPlay(), ListModules(), MainLoop(), ModuleThread_GetDecoderDevice(), Open(), OSDWidget(), PlaylistConfigureFromVariables(), RunSearchLocal(), sout_NewInstance(), system_Configure(), system_ConfigureDbus(), Usage(), vlc_player_input_RestoreMlStates(), vlc_playlist_New(), vlc_readdir_helper_init(), vlc_threads_setup(), vlc_xlib_init(), vout_Create(), vout_OSDText(), VoutOsdSnapshot(), and VoutSaveSnapshot().
|
inlinestatic |
References vlc_value_t::f_float, name, var_Inherit(), and VLC_VAR_FLOAT.
Referenced by aout_ReplayGainSelect(), aout_VolumeUpdate(), and SetSubtitlesOptions().
|
inlinestatic |
References vlc_value_t::i_int, name, var_Inherit(), and VLC_VAR_INTEGER.
Referenced by Control(), ControlNav(), Create(), EnableWindowLocked(), EsOutSend(), FileControl(), httpd_HostCreate(), input_fetcher_New(), input_preparser_New(), libvlc_InternalActionsInit(), LiveControl(), ModuleThread_UpdateAudioFormat(), net_Connect(), net_ConnectDgram(), OpenSDP(), sout_MuxSendBuffer(), spu_Create(), vlc_player_input_New(), vlc_player_input_RestoreMlStates(), vlc_readdir_helper_init(), vlc_rtsp_HostNew(), vlc_tls_ClientSessionCreate(), vout_Create(), and vout_GetSnapshot().
|
inlinestatic |
References name, vlc_value_t::psz_string, var_Inherit(), and VLC_VAR_STRING.
Referenced by aout_FiltersNewWithClock(), clock_source_Inherit(), config_GetConfigFile(), config_PrintHelp(), Create(), FindResampler(), httpd_HostCreate(), init_action(), input_EsOutTimeshiftNew(), InputDemuxNew(), InputSourceInit(), libvlc_AddInterfaces(), libvlc_InternalAddIntf(), libvlc_InternalCleanup(), libvlc_InternalInit(), module_need_var(), net_ConnectDgram(), net_ConnectTCP(), net_Socket(), Open(), rtp_autodetect(), SelectClockSource(), var_InheritURational(), vlc_actions_get_keycodes(), vlc_credential_get(), vlc_decoder_device_Create(), vlc_gl_surface_Create(), vlc_https_HostNew(), vlc_keystore_create(), vlc_readdir_helper_init(), vout_Create(), vout_display_window_New(), vout_InitSource(), vout_OpenWrapper(), and VoutSaveSnapshot().
VLC_EXPORT int var_InheritURational | ( | vlc_object_t * | obj, |
unsigned * | num, | ||
unsigned * | den, | ||
const char * | name | ||
) |
Inherit a string as a fractional value.
This function inherits a string, and interprets it as an unsigned rational number, i.e. a fraction. It also accepts a normally formatted floating point number.
References var, var_InheritString(), VLC_EGENERIC, VLC_SUCCESS, and vlc_ureduce().
Referenced by VoutGetDisplayCfg().
VLC_EXPORT int var_LocationParse | ( | vlc_object_t * | , |
const char * | mrl, | ||
const char * | prefix | ||
) |
Parses a string with multiple options.
Parses a set of colon-separated or semicolon-separated name=value
pairs. Some access (or access_demux) plugins uses this scheme in media resource location.
obj | VLC object on which to set variables (and emit error messages) |
mrl | string to parse |
pref | prefix to prepend to option names in the string |
References likely, var_OptionParse(), VLC_ENOMEM, and VLC_SUCCESS.
|
inlinestatic |
References vlc_value_t::i_int, name, var_GetAndSet(), and VLC_VAR_INTEGER_NAND.
|
inlinestatic |
References vlc_value_t::i_int, name, var_GetAndSet(), and VLC_VAR_INTEGER_OR.
VLC_EXPORT int var_Set | ( | vlc_object_t * | obj, |
const char * | name, | ||
vlc_value_t | val | ||
) |
Sets a variable value.
obj | Object holding the variable |
name | Variable name |
val | Variable value to set |
References psz_name, and var_SetChecked().
Referenced by config_ChainParse(), TriggerFilterCallback(), var_Copy(), and var_OptionParse().
|
inlinestatic |
Set the value of a pointer variable.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
ptr | The new pointer value of this variable |
References vlc_value_t::p_address, psz_name, var_SetChecked(), and VLC_VAR_ADDRESS.
Referenced by extension_DialogCommand(), input_item_ApplyOptions(), RunDownloader(), system_Configure(), Trigger(), TriggerInstanceState(), ViewpointApply(), vlc_mta_acquire(), vlc_mta_release(), and VoutViewpointMoved().
|
inlinestatic |
Set the value of an boolean variable.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
b | The new boolean value of this variable |
References vlc_value_t::b_bool, psz_name, var_SetChecked(), and VLC_VAR_BOOL.
Referenced by aout_MuteNotify(), config_LoadCmdLine(), config_PrintHelp(), Init(), vlc_input_decoder_SetVbiOpaque(), vlc_player_SetMediaStoppedAction(), vlc_player_SetTrackCategoryEnabled(), vlc_player_Start(), vout_display_window_FullscreenNotify(), vout_display_window_WindowingNotify(), vout_OpenWrapper(), vout_ReinitInterlacingSupport(), and vout_SetInterlacingState().
VLC_EXPORT int var_SetChecked | ( | vlc_object_t * | , |
const char * | , | ||
int | , | ||
vlc_value_t | |||
) |
References CheckValue(), variable_t::i_type, Lookup(), variable_t::ops, variable_ops_t::pf_dup, variable_ops_t::pf_free, psz_name, TriggerCallback(), variable_t::val, vlc_object_internals::var_lock, VLC_ENOVAR, vlc_internals, vlc_mutex_unlock(), VLC_SUCCESS, VLC_VAR_CLASS, VLC_VAR_VOID, and WaitUnused().
Referenced by var_Set(), var_SetAddress(), var_SetBool(), var_SetCoords(), var_SetFloat(), var_SetInteger(), var_SetString(), vlc_player_New(), and vlc_player_vout_SetVar().
|
inlinestatic |
References vlc_value_t::coords, name, var_SetChecked(), VLC_VAR_COORDS, vlc_value_t::x, and vlc_value_t::y.
Referenced by ThreadProcessMouseState().
|
inlinestatic |
Set the value of a float variable.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
f | The new float value of this variable |
References vlc_value_t::f_float, psz_name, var_SetChecked(), and VLC_VAR_FLOAT.
Referenced by aout_Destroy(), aout_VolumeNotify(), config_LoadCmdLine(), SetSubtitlesOptions(), vlc_player_ChangeRate(), vlc_player_input_RestoreMlStates(), and vlc_player_SetAssociatedSubsFPS().
|
inlinestatic |
Set the value of an integer variable.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
i | The new integer value of this variable |
References vlc_value_t::i_int, psz_name, var_SetChecked(), and VLC_VAR_INTEGER.
Referenced by config_LoadCmdLine(), Init(), MainLoopTryRepeat(), ThreadProcessMouseState(), vlc_input_decoder_SetVbiPage(), vlc_key_to_action(), vlc_player_input_RestoreMlStates(), vlc_player_SetSubtitleTextScale(), vout_CreateVars(), vout_display_window_KeyboardEvent(), vout_display_window_StateNotify(), vout_InitInterlacingSupport(), and VoutSaveSnapshot().
|
inlinestatic |
Set the value of a string variable.
p_obj | The object that holds the variable |
psz_name | The name of the variable |
psz_string | The new string value of this variable |
References psz_name, vlc_value_t::psz_string, var_SetChecked(), and VLC_VAR_STRING.
Referenced by aout_DeviceNotify(), aout_EnableFilter(), aout_New(), config_LoadCmdLine(), CropBorderCallback(), DeinterlaceCallback(), Init(), InputSourceInit(), libvlc_InternalInit(), LoadSlaves(), module_need(), OpenURL(), VisualizationCallback(), vlc_player_input_RestoreMlStates(), vlc_player_SelectCategoryLanguage(), vout_Create(), vout_display_window_FullscreenNotify(), and VoutSaveSnapshot().
|
inlinestatic |
References vlc_value_t::b_bool, psz_name, var_GetAndSet(), and VLC_VAR_BOOL_TOGGLE.
Referenced by ThreadProcessMouseState().
VLC_EXPORT void var_TriggerCallback | ( | vlc_object_t * | obj, |
const char * | name | ||
) |
Triggers callbacks on a variable.
This triggers any callbacks registered on the named variable without actually modifying the variable value. This is primarily useful for variables with VLC_VAR_VOID type (which do not have a value).
obj | Object holding the variable |
name | Variable name |
References Lookup(), psz_name, TriggerCallback(), variable_t::val, vlc_object_internals::var_lock, vlc_internals, vlc_mutex_unlock(), and WaitUnused().
Referenced by ModuleThread_UpdateAudioFormat(), vlc_player_vout_TriggerOption(), vout_IntfReinit(), and WallPaperCallback().
VLC_EXPORT int var_Type | ( | vlc_object_t * | obj, |
const char * | name | ||
) |
Get the type of a variable.
References variable_t::choices_count, variable_t::i_type, i_type, Lookup(), psz_name, vlc_object_internals::var_lock, vlc_internals, vlc_mutex_unlock(), and VLC_VAR_HASCHOICE.
Referenced by DecoderHasVbi(), filter_AddProxyCallbacks(), filter_DelProxyCallbacks(), Init(), and vlc_player_GetV4l2Object().