vlc_configuration.h File Reference

This file describes the programming interface for the configuration module. More...

Include dependency graph for vlc_configuration.h:

Go to the source code of this file.

Data Structures

struct  config_category_t
union  module_value_t
union  module_nvalue_t
struct  module_config_t
struct  config_chain_t

Defines

#define VLC_CONFIGURATION_H   1
#define CONFIG_HINT_CATEGORY   0x0002
#define CONFIG_HINT_SUBCATEGORY   0x0003
#define CONFIG_HINT_SUBCATEGORY_END   0x0004
#define CONFIG_HINT_USAGE   0x0005
#define CONFIG_CATEGORY   0x0006
#define CONFIG_SUBCATEGORY   0x0007
#define CONFIG_SECTION   0x0008
#define CONFIG_HINT   0x000F
#define CONFIG_ITEM_STRING   0x0010
#define CONFIG_ITEM_FILE   0x0020
#define CONFIG_ITEM_MODULE   0x0030
#define CONFIG_ITEM_INTEGER   0x0040
#define CONFIG_ITEM_BOOL   0x0050
#define CONFIG_ITEM_FLOAT   0x0060
#define CONFIG_ITEM_DIRECTORY   0x0070
#define CONFIG_ITEM_KEY   0x0080
#define CONFIG_ITEM_MODULE_CAT   0x0090
#define CONFIG_ITEM_MODULE_LIST   0x00A0
#define CONFIG_ITEM_MODULE_LIST_CAT   0x00B0
#define CONFIG_ITEM_FONT   0x00C0
#define CONFIG_ITEM_PASSWORD   0x00D0
#define CONFIG_ITEM   0x00F0
#define CAT_INTERFACE   1
#define SUBCAT_INTERFACE_GENERAL   101
#define SUBCAT_INTERFACE_MAIN   102
#define SUBCAT_INTERFACE_CONTROL   103
#define SUBCAT_INTERFACE_HOTKEYS   104
#define CAT_AUDIO   2
#define SUBCAT_AUDIO_GENERAL   201
#define SUBCAT_AUDIO_AOUT   202
#define SUBCAT_AUDIO_AFILTER   203
#define SUBCAT_AUDIO_VISUAL   204
#define SUBCAT_AUDIO_MISC   205
#define CAT_VIDEO   3
#define SUBCAT_VIDEO_GENERAL   301
#define SUBCAT_VIDEO_VOUT   302
#define SUBCAT_VIDEO_VFILTER   303
#define SUBCAT_VIDEO_TEXT   304
#define SUBCAT_VIDEO_SUBPIC   305
#define SUBCAT_VIDEO_VFILTER2   306
#define CAT_INPUT   4
#define SUBCAT_INPUT_GENERAL   401
#define SUBCAT_INPUT_ACCESS   402
#define SUBCAT_INPUT_DEMUX   403
#define SUBCAT_INPUT_VCODEC   404
#define SUBCAT_INPUT_ACODEC   405
#define SUBCAT_INPUT_SCODEC   406
#define SUBCAT_INPUT_STREAM_FILTER   407
#define CAT_SOUT   5
#define SUBCAT_SOUT_GENERAL   501
#define SUBCAT_SOUT_STREAM   502
#define SUBCAT_SOUT_MUX   503
#define SUBCAT_SOUT_ACO   504
#define SUBCAT_SOUT_PACKETIZER   505
#define SUBCAT_SOUT_SAP   506
#define SUBCAT_SOUT_VOD   507
#define CAT_ADVANCED   6
#define SUBCAT_ADVANCED_CPU   601
#define SUBCAT_ADVANCED_MISC   602
#define SUBCAT_ADVANCED_NETWORK   603
#define SUBCAT_ADVANCED_XML   604
#define CAT_PLAYLIST   7
#define SUBCAT_PLAYLIST_GENERAL   701
#define SUBCAT_PLAYLIST_SD   702
#define SUBCAT_PLAYLIST_EXPORT   703
#define CAT_OSD   8
#define SUBCAT_OSD_IMPORT   801
#define config_SaveConfigFile(a, b)   __config_SaveConfigFile(VLC_OBJECT(a),b)
#define config_ResetAll(a)   __config_ResetAll(VLC_OBJECT(a))
#define config_GetType(a, b)   __config_GetType(VLC_OBJECT(a),b)
#define config_GetInt(a, b)   __config_GetInt(VLC_OBJECT(a),b)
#define config_PutInt(a, b, c)   __config_PutInt(VLC_OBJECT(a),b,c)
#define config_GetFloat(a, b)   __config_GetFloat(VLC_OBJECT(a),b)
#define config_PutFloat(a, b, c)   __config_PutFloat(VLC_OBJECT(a),b,c)
#define config_GetPsz(a, b)   __config_GetPsz(VLC_OBJECT(a),b)
#define config_PutPsz(a, b, c)   __config_PutPsz(VLC_OBJECT(a),b,c)
#define config_AddIntf(a, b)   __config_AddIntf(VLC_OBJECT(a),b)
#define config_RemoveIntf(a, b)   __config_RemoveIntf(VLC_OBJECT(a),b)
#define config_ExistIntf(a, b)   __config_ExistIntf(VLC_OBJECT(a),b)
#define config_ChainParse(a, b, c, d)   __config_ChainParse( VLC_OBJECT(a), b, c, d )
 This function will
  • create all options in the array ppsz_options (var_Create).


Typedefs

typedef enum vlc_userdir vlc_userdir_t

Enumerations

enum  vlc_userdir {
  VLC_HOME_DIR, VLC_CONFIG_DIR, VLC_DATA_DIR, VLC_CACHE_DIR,
  VLC_DESKTOP_DIR = 0x80, VLC_DOWNLOAD_DIR, VLC_TEMPLATES_DIR, VLC_PUBLICSHARE_DIR,
  VLC_DOCUMENTS_DIR, VLC_MUSIC_DIR, VLC_PICTURES_DIR, VLC_VIDEOS_DIR
}

Functions

int __config_GetType (vlc_object_t *, const char *)
int __config_GetInt (vlc_object_t *, const char *)
void __config_PutInt (vlc_object_t *, const char *, int)
float __config_GetFloat (vlc_object_t *, const char *)
void __config_PutFloat (vlc_object_t *, const char *, float)
char * __config_GetPsz (vlc_object_t *, const char *)
void __config_PutPsz (vlc_object_t *, const char *, const char *)
int __config_SaveConfigFile (vlc_object_t *, const char *)
void __config_ResetAll (vlc_object_t *)
module_config_tconfig_FindConfig (vlc_object_t *, const char *)
const char * config_GetDataDir (void)
 Determines the shared data directory.
const char * config_GetConfDir (void)
 Determines the system configuration directory.
char * config_GetUserDir (vlc_userdir_t)
void __config_AddIntf (vlc_object_t *, const char *)
void __config_RemoveIntf (vlc_object_t *, const char *)
bool __config_ExistIntf (vlc_object_t *, const char *)
void __config_ChainParse (vlc_object_t *, const char *psz_prefix, const char *const *ppsz_options, config_chain_t *)
char * config_ChainCreate (char **ppsz_name, config_chain_t **pp_cfg, const char *psz_string)
 This function will parse a configuration string (psz_string) and
  • set the module name (*ppsz_name)
  • set all options for this module in a chained list (*pp_cfg)
  • returns a pointer on the next module if any.

void config_ChainDestroy (config_chain_t *)
 This function will release a linked list of config_chain_t (Including the head).
config_chain_tconfig_ChainDuplicate (const config_chain_t *)
 This function will duplicate a linked list of config_chain_t.
char * config_StringUnescape (char *psz_string)
 This function will unescape a string in place and will return a pointer on the given string.
char * config_StringEscape (const char *psz_string)
 This function will escape a string that can be unescaped by config_StringUnescape.


Detailed Description

This file describes the programming interface for the configuration module.

It includes functions allowing to declare, get or set configuration options.


Define Documentation

#define CAT_ADVANCED   6

Referenced by PrefsTree::PrefsTree().

#define CAT_AUDIO   2

Referenced by PrefsTree::PrefsTree().

#define CAT_INPUT   4

Referenced by PrefsTree::PrefsTree().

#define CAT_INTERFACE   1

Referenced by PrefsTree::PrefsTree().

#define CAT_OSD   8

#define CAT_PLAYLIST   7

Referenced by PrefsTree::PrefsTree().

#define CAT_SOUT   5

Referenced by PrefsTree::PrefsTree().

#define CAT_VIDEO   3

Referenced by PrefsTree::PrefsTree().

#define config_AddIntf ( a,
 )     __config_AddIntf(VLC_OBJECT(a),b)

#define CONFIG_CATEGORY   0x0006

#define config_ChainParse ( a,
b,
c,
 )     __config_ChainParse( VLC_OBJECT(a), b, c, d )

This function will

  • create all options in the array ppsz_options (var_Create).

  • parse the given linked list of config_chain_t and set the value (var_Set).

The option names will be created by adding the psz_prefix prefix.

Referenced by Activate(), Create(), CreateFilter(), Open(), Open_LuaIntf(), OpenCommon(), OpenFilter(), OpenIn(), OpenMux(), OpenOut(), and OpenPostproc().

#define config_ExistIntf ( a,
 )     __config_ExistIntf(VLC_OBJECT(a),b)

#define config_GetFloat ( a,
 )     __config_GetFloat(VLC_OBJECT(a),b)

#define config_GetInt ( a,
 )     __config_GetInt(VLC_OBJECT(a),b)

Referenced by __aout_ToggleMute(), __aout_VolumeGet(), __aout_VolumeUp(), __osd_MenuActivate(), __osd_MenuCreate(), __osd_MenuDown(), __osd_MenuUp(), __osd_Volume(), __vlc_thread_set_priority(), __vout_OSDMessage(), _sout_stream_url_to_chain(), AccessOpen(), Activate(), aout_new_buffer(), aout_OutputNew(), aout_VolumeSoftInit(), ConfigWidget::Apply(), VLCEqualizer::bandSliderUpdated:, BoolConfigControl::BoolConfigControl, CDDAFixupPlaylist(), CDDAOpen(), VLCEqualizer::changePreset:, CheckAndSend(), VLCApplication::coreChangedMediaKeySupportSetting:, create_menu(), decoder_SynchroInit(), DecoderOpen(), DemuxOpen(), EbmlParser::EbmlParser(), VLCEmbeddedWindow::enterFullscreen, VLCEqualizer::equalizerUpdated, EvaluateRPN(), VLCFSPanel::fadeIn, FileOpenPanel::FileOpenPanel(), FullscreenControllerWidget::FullscreenControllerWidget(), gnutls_ServerSessionPrepare(), Import_ASX(), InheritValue(), Init(), InitDisplay(), VLCInfo::initPanel, InitVideoDec(), InputManager::jumpBwd(), InputManager::jumpFwd(), libvlc_InternalInit(), ListModules(), MacroDo(), MainInterface::MainInterface(), VLCMain::manageIntf:, Mapping(), MediaControlView::MediaControlView(), module_EndBank(), module_LoadPlugins(), NetOpenPanel::NetOpenPanel(), OpenDialog::NetPanel(), Notify(), Open(), OpenDecoder(), OpenDisplay(), VLCOpen::openFile, OpenFilter(), OpenIntf(), VLCOpen::openNetInfoChanged:, VLCOpen::openNetUDPButtonAction:, OpenServer(), VLCOpen::openTarget:, OpenVideo(), osd_VolumeStep(), Interpreter::parseAction(), matroska_segment_c::ParseChapters(), Playlist(), playlist_Create(), playlist_MLDump(), playlist_MLLoad(), VLCEqualizer::preampSliderUpdated:, PrefsDialog::PrefsDialog(), Probe(), Process(), RenderText(), EbmlParser::Reset(), VLCSimplePrefs::resetControls, Run(), RunIntf(), VLCSimplePrefs::saveChangedSettings, Seek(), VideoWidget::SetFullScreen(), VLCExtended::showPanel, SoundWidget::SoundWidget(), spectrometer_Run(), spectrum_Run(), SPrefsPanel::SPrefsPanel(), WindowManager::startMove(), WindowManager::stopMove(), system_Configure(), Thread(), VLCEqualizer::twopass:, OpenDialog::UpdateMRL(), Equalizer::updateUIFromCore(), Usage(), VCDOpen(), VCDParse(), VideoWindow::VideoWindow(), vlc_threads_setup(), vlclua_config_get(), VolumeChanged(), VolumeMove(), VLCControls::volumeSliderUpdated:, vout_DisplayTitle(), vout_NewDisplayWindow(), vout_OSDIcon(), vout_OSDSlider(), WindowOpen(), SubsFileDialog::WndProc(), Interface::WndProc(), and PrefsDialog::WndProc().

#define config_GetPsz ( a,
 )     __config_GetPsz(VLC_OBJECT(a),b)

#define config_GetType ( a,
 )     __config_GetType(VLC_OBJECT(a),b)

#define CONFIG_HINT   0x000F

#define CONFIG_HINT_CATEGORY   0x0002

Referenced by Usage().

#define CONFIG_HINT_SUBCATEGORY   0x0003

Referenced by Usage().

#define CONFIG_HINT_SUBCATEGORY_END   0x0004

#define CONFIG_HINT_USAGE   0x0005

Referenced by Usage().

#define CONFIG_ITEM   0x00F0

#define CONFIG_ITEM_BOOL   0x0050

#define CONFIG_ITEM_DIRECTORY   0x0070

#define CONFIG_ITEM_FILE   0x0020

#define CONFIG_ITEM_FLOAT   0x0060

#define CONFIG_ITEM_FONT   0x00C0

#define CONFIG_ITEM_INTEGER   0x0040

#define CONFIG_ITEM_KEY   0x0080

#define CONFIG_ITEM_MODULE   0x0030

#define CONFIG_ITEM_MODULE_CAT   0x0090

#define CONFIG_ITEM_MODULE_LIST   0x00A0

#define CONFIG_ITEM_MODULE_LIST_CAT   0x00B0

#define CONFIG_ITEM_PASSWORD   0x00D0

#define CONFIG_ITEM_STRING   0x0010

#define config_PutFloat ( a,
b,
 )     __config_PutFloat(VLC_OBJECT(a),b,c)

#define config_PutInt ( a,
b,
 )     __config_PutInt(VLC_OBJECT(a),b,c)

#define config_PutPsz ( a,
b,
 )     __config_PutPsz(VLC_OBJECT(a),b,c)

#define config_RemoveIntf ( a,
 )     __config_RemoveIntf(VLC_OBJECT(a),b)

#define config_ResetAll (  )     __config_ResetAll(VLC_OBJECT(a))

#define config_SaveConfigFile ( a,
 )     __config_SaveConfigFile(VLC_OBJECT(a),b)

#define CONFIG_SECTION   0x0008

#define CONFIG_SUBCATEGORY   0x0007

#define SUBCAT_ADVANCED_CPU   601

#define SUBCAT_ADVANCED_MISC   602

#define SUBCAT_ADVANCED_NETWORK   603

#define SUBCAT_ADVANCED_XML   604

#define SUBCAT_AUDIO_AFILTER   203

#define SUBCAT_AUDIO_AOUT   202

#define SUBCAT_AUDIO_GENERAL   201

#define SUBCAT_AUDIO_MISC   205

#define SUBCAT_AUDIO_VISUAL   204

#define SUBCAT_INPUT_ACCESS   402

#define SUBCAT_INPUT_ACODEC   405

#define SUBCAT_INPUT_DEMUX   403

#define SUBCAT_INPUT_GENERAL   401

#define SUBCAT_INPUT_SCODEC   406

#define SUBCAT_INPUT_STREAM_FILTER   407

#define SUBCAT_INPUT_VCODEC   404

#define SUBCAT_INTERFACE_CONTROL   103

#define SUBCAT_INTERFACE_GENERAL   101

#define SUBCAT_INTERFACE_HOTKEYS   104

#define SUBCAT_INTERFACE_MAIN   102

#define SUBCAT_OSD_IMPORT   801

#define SUBCAT_PLAYLIST_EXPORT   703

#define SUBCAT_PLAYLIST_GENERAL   701

#define SUBCAT_PLAYLIST_SD   702

#define SUBCAT_SOUT_ACO   504

#define SUBCAT_SOUT_GENERAL   501

#define SUBCAT_SOUT_MUX   503

#define SUBCAT_SOUT_PACKETIZER   505

#define SUBCAT_SOUT_SAP   506

#define SUBCAT_SOUT_STREAM   502

#define SUBCAT_SOUT_VOD   507

#define SUBCAT_VIDEO_GENERAL   301

#define SUBCAT_VIDEO_SUBPIC   305

#define SUBCAT_VIDEO_TEXT   304

#define SUBCAT_VIDEO_VFILTER   303

#define SUBCAT_VIDEO_VFILTER2   306

#define SUBCAT_VIDEO_VOUT   302

#define VLC_CONFIGURATION_H   1


Typedef Documentation

typedef enum vlc_userdir vlc_userdir_t


Enumeration Type Documentation

Enumerator:
VLC_HOME_DIR 
VLC_CONFIG_DIR 
VLC_DATA_DIR 
VLC_CACHE_DIR 
VLC_DESKTOP_DIR 
VLC_DOWNLOAD_DIR 
VLC_TEMPLATES_DIR 
VLC_PUBLICSHARE_DIR 
VLC_DOCUMENTS_DIR 
VLC_MUSIC_DIR 
VLC_PICTURES_DIR 
VLC_VIDEOS_DIR 


Function Documentation

void __config_AddIntf ( vlc_object_t ,
const char *   
)

void __config_ChainParse ( vlc_object_t ,
const char *  psz_prefix,
const char *const *  ppsz_options,
config_chain_t  
)

bool __config_ExistIntf ( vlc_object_t ,
const char *   
)

float __config_GetFloat ( vlc_object_t ,
const char *   
)

int __config_GetInt ( vlc_object_t ,
const char *   
)

char* __config_GetPsz ( vlc_object_t ,
const char *   
)

int __config_GetType ( vlc_object_t ,
const char *   
)

void __config_PutFloat ( vlc_object_t ,
const char *  ,
float   
)

void __config_PutInt ( vlc_object_t ,
const char *  ,
int   
)

void __config_PutPsz ( vlc_object_t ,
const char *  ,
const char *   
)

void __config_RemoveIntf ( vlc_object_t ,
const char *   
)

void __config_ResetAll ( vlc_object_t  ) 

int __config_SaveConfigFile ( vlc_object_t ,
const char *   
)

References SaveConfigFile().

char* config_ChainCreate ( char **  ppsz_name,
config_chain_t **  pp_cfg,
const char *  psz_string 
)

This function will parse a configuration string (psz_string) and

  • set the module name (*ppsz_name)
  • set all options for this module in a chained list (*pp_cfg)
  • returns a pointer on the next module if any.

The string format is module{option=*,option=*}[:modulenext{option=*,...}]

The options values are unescaped using config_StringUnescape.

References ChainGetValue(), config_chain_t::p_next, config_chain_t::psz_name, config_chain_t::psz_value, strdup(), and strndup().

Referenced by __vout_Create(), filter_chain_AppendFromStringInternal(), intf_Create(), sout_AccessOutNew(), sout_MuxNew(), and sout_StreamNew().

void config_ChainDestroy ( config_chain_t  ) 

config_chain_t* config_ChainDuplicate ( const config_chain_t  ) 

This function will duplicate a linked list of config_chain_t.

References p_dst, config_chain_t::p_next, config_chain_t::psz_name, config_chain_t::psz_value, and strdup().

module_config_t* config_FindConfig ( vlc_object_t ,
const char *   
)

const char* config_GetConfDir ( void   ) 

Determines the system configuration directory.

Returns:
a string (always succeeds).

References DIR_SEP, MAX_PATH, and psz_vlcpath.

Referenced by OpenClient().

const char* config_GetDataDir ( void   ) 

Determines the shared data directory.

Returns:
a string (always succeeds).

References DIR_SEP, psz_vlcpath, and strlcpy().

Referenced by ItemChange(), LoadMessages(), Run(), vlclua_datadir(), and vlclua_dir_list().

char* config_GetUserDir ( vlc_userdir_t   ) 

char* config_StringEscape ( const char *  psz_string  ) 

This function will escape a string that can be unescaped by config_StringUnescape.

The returned value is allocated by it. You have to free it once you do not need it anymore (unlike config_StringUnescape). If NULL is given as parameter nothing will be done (NULL will be returned).

The escaped characters are ' " and \

References IsEscapeNeeded().

Referenced by SoutMrl::option().

char* config_StringUnescape ( char *  psz_string  ) 

This function will unescape a string in place and will return a pointer on the given string.

No memory is allocated by it (unlike config_StringEscape). If NULL is given as parameter nothing will be done (NULL will be returned).

The following sequences will be unescaped (only one time): \ \' and \"

References IsEscape().

Referenced by ChainGetValue().


Generated on Sat Nov 21 08:05:26 2009 for VLC by  doxygen 1.5.6