VLC  4.0.0-dev
core.c File Reference
Include dependency graph for core.c:

Functions

int config_GetType (const char *name)
 Gets a configuration item type. More...
 
bool config_IsSafe (const char *name)
 
int64_t config_GetInt (const char *name)
 Gets an integer configuration item's value. More...
 
float config_GetFloat (const char *name)
 Gets a floating point configuration item's value. More...
 
char * config_GetPsz (const char *name)
 Gets a string configuration item's value. More...
 
int vlc_param_SetString (struct vlc_param *param, const char *value)
 
void config_PutPsz (const char *psz_name, const char *psz_value)
 Sets a string configuration item's value. More...
 
void config_PutInt (const char *name, int64_t i_value)
 Sets an integer configuration item's value. More...
 
void config_PutFloat (const char *name, float f_value)
 Sets a floating point configuration item's value. More...
 
ssize_t config_GetIntChoices (const char *name, int64_t **restrict values, char ***restrict texts)
 
static ssize_t config_ListModules (const char *cap, char ***restrict values, char ***restrict texts)
 
ssize_t config_GetPszChoices (const char *name, char ***restrict values, char ***restrict texts)
 
static int confcmp (const void *a, const void *b)
 
static int confnamecmp (const void *key, const void *elem)
 
int config_SortConfig (void)
 Index the configuration items by name for faster lookups. More...
 
void config_UnsortConfig (void)
 
struct vlc_paramvlc_param_Find (const char *name)
 Looks up a configuration parameter by name. More...
 
module_config_tconfig_FindConfig (const char *name)
 Looks up a configuration item. More...
 
void config_Free (struct vlc_param *tab, size_t confsize)
 Destroys an array of configuration items. More...
 
void config_ResetAll (void)
 Resets the configuration. More...
 
int config_AutoSaveConfigFile (vlc_object_t *p_this)
 

Variables

vlc_mutex_t config_lock = { .value = ATOMIC_VAR_INIT(0), .recursion = ATOMIC_VAR_INIT(0), .owner = ATOMIC_VAR_INIT(0), }
 
static atomic_bool config_dirty = ATOMIC_VAR_INIT(false)
 
struct {
   struct vlc_param **   list
 
   size_t   count
 
config = { NULL, 0 }
 

Function Documentation

◆ confcmp()

static int confcmp ( const void *  a,
const void *  b 
)
static

Referenced by config_SortConfig().

◆ config_AutoSaveConfigFile()

int config_AutoSaveConfigFile ( vlc_object_t p_this)

◆ config_Free()

void config_Free ( struct vlc_param tab,
size_t  confsize 
)

Destroys an array of configuration items.

Parameters
configstart of array of items
confsizenumber of items in the array

References module_config_t::i_type, IsConfigStringType, vlc_param::item, module_config_t::list, module_config_t::list_count, module_config_t::list_text, module_config_t::psz, vlc_param::str, and vlc_param::value.

Referenced by vlc_plugin_destroy().

◆ config_GetIntChoices()

ssize_t config_GetIntChoices ( const char *  name,
int64_t **restrict  values,
char ***restrict  texts 
)

◆ config_GetPszChoices()

◆ config_IsSafe()

bool config_IsSafe ( const char *  name)

References name, vlc_param::safe, and vlc_param_Find().

Referenced by var_OptionParse().

◆ config_ListModules()

static ssize_t config_ListModules ( const char *  cap,
char ***restrict  values,
char ***restrict  texts 
)
static

◆ config_SortConfig()

int config_SortConfig ( void  )

Index the configuration items by name for faster lookups.

References confcmp(), config, CONFIG_ITEM, vlc_param::i, module_config_t::i_type, vlc_param::item, p, unlikely, vlc_alloc(), VLC_ENOMEM, vlc_plugins, and VLC_SUCCESS.

Referenced by module_InitBank(), and module_LoadPlugins().

◆ config_UnsortConfig()

void config_UnsortConfig ( void  )

References config.

Referenced by module_EndBank(), and module_LoadPlugins().

◆ confnamecmp()

static int confnamecmp ( const void *  key,
const void *  elem 
)
static

Referenced by vlc_param_Find().

◆ vlc_param_Find()

struct vlc_param* vlc_param_Find ( const char *  name)

◆ vlc_param_SetString()

Variable Documentation

◆ 

◆ config_dirty

atomic_bool config_dirty = ATOMIC_VAR_INIT(false)
static

◆ config_lock

vlc_mutex_t config_lock = { .value = ATOMIC_VAR_INIT(0), .recursion = ATOMIC_VAR_INIT(0), .owner = ATOMIC_VAR_INIT(0), }

◆ count

size_t count
Examples
/builds/videolan/vlc/include/vlc_diffutil.h.

Referenced by aout_FiltersPipelineChangeViewpoint(), aout_FiltersPipelineCreate(), aout_FiltersPipelineDrain(), aout_FiltersPipelineFlush(), aout_FiltersPipelinePlay(), aout_FiltersPipelineResetClock(), aout_FiltersPipelineSetClockDelay(), aout_HasMixModeChoice(), aout_HasStereoMode(), config_GetIntChoices(), config_GetPszChoices(), ControlSetEsList(), Destroy(), EsOutVaPrivControlLocked(), hpack_decode(), hpack_encode(), InitPrograms(), input_EsOutTimeshiftNew(), input_resource_HoldVouts(), InputSourceInit(), ListModules(), module_find(), on_children_added(), on_children_removed(), picture_pool_New(), picture_pool_NewFromFormat(), picture_pool_Reserve(), randomizer_Add(), randomizer_Remove(), spu_get_attachments(), SpuRenderSubpictures(), stream_extractor_AttachParsed(), var_Change(), var_CountChoices(), vlc_alloc(), vlc_ancillary_array_Count(), vlc_ancillary_array_Dup(), vlc_ancillary_array_Insert(), vlc_atomic_timedwait(), vlc_atomic_timedwait_daytime(), vlc_atomic_wait(), vlc_dictionary_all_keys(), vlc_dictionary_insert_impl_(), vlc_dictionary_keys_count(), vlc_GetCPUCount(), vlc_h2_frame_headers(), vlc_h2_stream_headers(), vlc_https_recv(), vlc_https_send(), vlc_list_children(), vlc_ml_count_album_artists(), vlc_ml_count_album_tracks(), vlc_ml_count_albums(), vlc_ml_count_artist_albums(), vlc_ml_count_artist_tracks(), vlc_ml_count_artists(), vlc_ml_count_audio_media(), vlc_ml_count_folder_media(), vlc_ml_count_folders(), vlc_ml_count_folders_by_type(), vlc_ml_count_genre_albums(), vlc_ml_count_genre_artists(), vlc_ml_count_genre_tracks(), vlc_ml_count_genres(), vlc_ml_count_group_media(), vlc_ml_count_groups(), vlc_ml_count_history(), vlc_ml_count_history_by_type(), vlc_ml_count_media_labels(), vlc_ml_count_playlist_media(), vlc_ml_count_playlists(), vlc_ml_count_show_episodes(), vlc_ml_count_shows(), vlc_ml_count_stream_history(), vlc_ml_count_video_media(), vlc_player_CycleProgram(), vlc_player_CycleTrack(), vlc_player_GetSelectedProgram(), vlc_player_GetSelectedTrack(), vlc_player_osd_HoldAll(), vlc_player_osd_Icon(), vlc_player_osd_Message(), vlc_player_osd_Position(), vlc_player_osd_ReleaseAll(), vlc_player_osd_Volume(), vlc_player_RestartTrackCategory(), vlc_player_title_list_Create(), vlc_player_title_list_GetAt(), vlc_player_UnselectTrackCategory(), vlc_player_vout_HoldAll(), vlc_playlist_Append(), vlc_playlist_DeleteMetaArray(), vlc_playlist_Expand(), vlc_playlist_FindIndices(), vlc_playlist_Insert(), vlc_playlist_item_meta_InitFields(), vlc_playlist_item_meta_New(), vlc_playlist_ItemsInserted(), vlc_playlist_ItemsMoved(), vlc_playlist_ItemsRemoved(), vlc_playlist_ItemsRemoving(), vlc_playlist_MediaToItems(), vlc_playlist_Move(), vlc_playlist_MoveBySlices(), vlc_playlist_NewMetaArray(), vlc_playlist_Remove(), vlc_playlist_RemoveBySlices(), vlc_playlist_RequestInsert(), vlc_playlist_RequestMove(), vlc_playlist_RequestRemove(), vlc_playlist_Sort(), vlc_popcount_generic(), vlc_read_i11e(), vlc_readv_i11e(), vlc_reallocarray(), vlc_sd_GetNames(), vlc_timer_do(), vlc_tls_ConnectWrite(), vlc_tls_ProxyRead(), vlc_tls_ProxyWrite(), vlc_tls_SocketRead(), vlc_tls_SocketWrite(), vlc_vector_move_(), vlc_vector_reallocdata_(), vlc_write_i11e(), vlc_writev(), vlc_writev_i11e(), vout_GetPool(), vouts_osd_Icon(), vouts_osd_Message(), and vouts_osd_Slider().

◆ list