VLC  3.0.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
core.c File Reference
Include dependency graph for core.c:

Functions

static char * strdupnull (const char *src)
int config_GetType (((vlc_object_t *)(vlc_object_t *p_this)), const char *psz_name)
bool config_IsSafe (const char *name)
int64_t config_GetInt (((vlc_object_t *)(vlc_object_t *p_this)), const char *psz_name)
float config_GetFloat (((vlc_object_t *)(vlc_object_t *p_this)), const char *psz_name)
char * config_GetPsz (((vlc_object_t *)(vlc_object_t *p_this)), const char *psz_name)
void config_PutPsz (((vlc_object_t *)(vlc_object_t *p_this)), const char *psz_name, const char *psz_value)
void config_PutInt (((vlc_object_t *)(vlc_object_t *p_this)), const char *psz_name, int64_t i_value)
void config_PutFloat (((vlc_object_t *)(vlc_object_t *p_this)), const char *psz_name, float f_value)
ssize_t config_GetIntChoices (vlc_object_t *obj, const char *name, int64_t **restrict values, char ***restrict texts)
 Determines a list of suggested values for an integer configuration item.
static ssize_t config_ListModules (const char *cap, char ***restrict values, char ***restrict texts)
ssize_t config_GetPszChoices (vlc_object_t *obj, const char *name, char ***restrict values, char ***restrict texts)
 Determines a list of suggested values for a string configuration item.
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.
void config_UnsortConfig (void)
module_config_tconfig_FindConfig (vlc_object_t *p_this, const char *name)
void config_Free (module_config_t *config, size_t confsize)
 Destroys an array of configuration items.
void config_ResetAll (((vlc_object_t *)(vlc_object_t *p_this)))

Variables

vlc_rwlock_t config_lock = PTHREAD_RWLOCK_INITIALIZER
bool config_dirty = false
struct {
   module_config_t **   list
   size_t   count
config

Function Documentation

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

Referenced by config_SortConfig().

module_config_t* config_FindConfig ( vlc_object_t p_this,
const char *  name 
)
void config_Free ( module_config_t config,
size_t  confsize 
)
float config_GetFloat ( ((vlc_object_t *)(vlc_object_t *p_this))  ,
const char *  psz_name 
)
int64_t config_GetInt ( ((vlc_object_t *)(vlc_object_t *p_this))  ,
const char *  psz_name 
)
ssize_t config_GetIntChoices ( vlc_object_t obj,
const char *  name,
int64_t **restrict  values,
char ***restrict  texts 
)

Determines a list of suggested values for an integer configuration item.

Parameters
valuespointer to a table of integer values [OUT]
textspointer to a table of descriptions strings [OUT]
Returns
number of choices, or -1 on error
Note
the caller is responsible for calling free() on all descriptions and on both tables. In case of error, both pointers are set to NULL.

References config_FindConfig(), count, module_config_t::i, module_config_t::i_cb, module_config_t::list, module_config_t::list_count, module_config_t::list_text, msg_Warn, strdup(), unlikely, vlc_gettext(), and xmalloc().

char* config_GetPsz ( ((vlc_object_t *)(vlc_object_t *p_this))  ,
const char *  psz_name 
)
ssize_t config_GetPszChoices ( vlc_object_t obj,
const char *  name,
char ***restrict  values,
char ***restrict  texts 
)

Determines a list of suggested values for a string configuration item.

Parameters
valuespointer to a table of value strings [OUT]
textspointer to a table of descriptions strings [OUT]
Returns
number of choices, or -1 on error
Note
the caller is responsible for calling free() on all values, on all descriptions and on both tables. In case of error, both pointers are set to NULL.

References config_FindConfig(), CONFIG_ITEM_MODULE, config_ListModules(), count, module_config_t::i_type, IsConfigStringType, module_config_t::list, module_config_t::list_count, module_config_t::list_text, module_config_t::psz, module_config_t::psz_cb, module_config_t::psz_type, vlc_gettext(), xmalloc(), and xstrdup().

int config_GetType ( ((vlc_object_t *)(vlc_object_t *p_this))  ,
const char *  psz_name 
)
bool config_IsSafe ( const char *  name)
static ssize_t config_ListModules ( const char *  cap,
char ***restrict  values,
char ***restrict  texts 
)
static
void config_PutFloat ( ((vlc_object_t *)(vlc_object_t *p_this))  ,
const char *  psz_name,
float  f_value 
)
void config_PutInt ( ((vlc_object_t *)(vlc_object_t *p_this))  ,
const char *  psz_name,
int64_t  i_value 
)
void config_PutPsz ( ((vlc_object_t *)(vlc_object_t *p_this))  ,
const char *  psz_name,
const char *  psz_value 
)
void config_ResetAll ( ((vlc_object_t *)(vlc_object_t *p_this))  )
int config_SortConfig ( void  )

Index the configuration items by name for faster lookups.

< Not enough memory

< No error

References confcmp(), config, CONFIG_ITEM, module_t::confsize, module_config_t::i_type, module_list_free(), module_list_get(), module_t::p_config, unlikely, VLC_ENOMEM, and VLC_SUCCESS.

Referenced by module_InitBank(), and module_LoadPlugins().

void config_UnsortConfig ( void  )

References config.

Referenced by module_EndBank(), and module_LoadPlugins().

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

Referenced by config_FindConfig().

static char* strdupnull ( const char *  src)
inlinestatic

References strdup().

Referenced by config_GetPsz(), and config_ResetAll().

Variable Documentation

struct { ... } config
bool config_dirty = false
vlc_rwlock_t config_lock = PTHREAD_RWLOCK_INITIALIZER
size_t count