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

Functions

static char * strdupnull (const char *src)
 
int config_GetType (const char *psz_name)
 Gets a configuration item type. More...
 
bool config_IsSafe (const char *name)
 
static module_config_tconfig_FindConfigChecked (const char *psz_name)
 
int64_t config_GetInt (const char *psz_name)
 Gets an integer configuration item's value. More...
 
float config_GetFloat (const char *psz_name)
 Gets a floating point configuration item's value. More...
 
char * config_GetPsz (const char *psz_name)
 Gets a string configuration item's value. More...
 
void config_PutPsz (const char *psz_name, const char *psz_value)
 Sets a string configuration item's value. More...
 
void config_PutInt (const char *psz_name, int64_t i_value)
 Sets an integer configuration item's value. More...
 
void config_PutFloat (const char *psz_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)
 
module_config_tconfig_FindConfig (const char *name)
 Looks up a configuration item. More...
 
void config_Free (module_config_t *tab, size_t confsize)
 Destroys an array of configuration items. More...
 
void config_ResetAll (void)
 Resets the configuration. More...
 

Variables

vlc_rwlock_t config_lock = { { .value = ATOMIC_VAR_INIT(0), .recursion = ATOMIC_VAR_INIT(0), .owner = ATOMIC_VAR_INIT(NULL), } , { NULL, VLC_STATIC_MUTEX } , 0 }
 
bool config_dirty = false
 
struct {
   module_config_t **   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_FindConfigChecked()

static module_config_t* config_FindConfigChecked ( const char *  psz_name)
static

◆ config_Free()

void config_Free ( module_config_t 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, module_config_t::list, module_config_t::list_count, module_config_t::list_text, module_value_t::psz, module_config_t::psz, and module_config_t::value.

Referenced by vlc_plugin_destroy().

◆ config_GetIntChoices()

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

◆ config_GetPszChoices()

ssize_t config_GetPszChoices ( const char *  name,
char ***restrict  values,
char ***restrict  texts 
)

◆ config_IsSafe()

bool config_IsSafe ( const char *  name)

◆ 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, module_config_t::i_type, 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 config_FindConfig().

◆ strdupnull()

static char* strdupnull ( const char *  src)
inlinestatic

References strdup().

Referenced by config_GetPsz(), and config_ResetAll().

Variable Documentation

◆ config

struct { ... } config

◆ config_dirty

bool config_dirty = false

◆ config_lock

vlc_rwlock_t config_lock = { { .value = ATOMIC_VAR_INIT(0), .recursion = ATOMIC_VAR_INIT(0), .owner = ATOMIC_VAR_INIT(NULL), } , { NULL, VLC_STATIC_MUTEX } , 0 }

◆ count

size_t count

Referenced by aout_FiltersPipelineChangeViewpoint(), aout_FiltersPipelineCreate(), aout_FiltersPipelineDrain(), aout_FiltersPipelineFlush(), aout_FiltersPipelinePlay(), 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_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_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_rand_bytes(), 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