Commit ca923dce authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Separate string list and string list callback

The configuration system cannot store both a static list and a dynamic
one (and AFAIK, it never could). It only makes to use either a static
list or a callback.
parent e960f0f8
...@@ -470,12 +470,15 @@ VLC_METADATA_EXPORTS ...@@ -470,12 +470,15 @@ VLC_METADATA_EXPORTS
#define change_short( ch ) \ #define change_short( ch ) \
vlc_config_set (VLC_CONFIG_SHORTCUT, (int)(ch)); vlc_config_set (VLC_CONFIG_SHORTCUT, (int)(ch));
#define change_string_list( list, list_text, list_update_func ) \ #define change_string_list( list, list_text ) \
vlc_config_set (VLC_CONFIG_LIST, \ vlc_config_set (VLC_CONFIG_LIST, \
(size_t)(sizeof (list) / sizeof (char *)), \ (size_t)(sizeof (list) / sizeof (char *)), \
(const char *const *)(list), \ (const char *const *)(list), \
(const char *const *)(list_text), \ (const char *const *)(list_text), \
(vlc_callback_t)(list_update_func)); (vlc_callback_t)NULL);
#define change_string_cb( cb ) \
vlc_config_set (VLC_CONFIG_LIST, 0, NULL, NULL, (vlc_callback_t)(cb));
#define change_integer_list( list, list_text ) \ #define change_integer_list( list, list_text ) \
vlc_config_set (VLC_CONFIG_LIST, \ vlc_config_set (VLC_CONFIG_LIST, \
......
...@@ -104,14 +104,14 @@ vlc_module_begin () ...@@ -104,14 +104,14 @@ vlc_module_begin ()
MODE_TEXT, MODE_LONGTEXT, true ) MODE_TEXT, MODE_LONGTEXT, true )
add_string( "decklink-audio-connection", 0, add_string( "decklink-audio-connection", 0,
AUDIO_CONNECTION_TEXT, AUDIO_CONNECTION_LONGTEXT, true ) AUDIO_CONNECTION_TEXT, AUDIO_CONNECTION_LONGTEXT, true )
change_string_list( ppsz_audioconns, ppsz_audioconns_text, 0 ) change_string_list( ppsz_audioconns, ppsz_audioconns_text )
add_integer( "decklink-audio-rate", 48000, add_integer( "decklink-audio-rate", 48000,
RATE_TEXT, RATE_LONGTEXT, true ) RATE_TEXT, RATE_LONGTEXT, true )
add_integer( "decklink-audio-channels", 2, add_integer( "decklink-audio-channels", 2,
CHANNELS_TEXT, CHANNELS_LONGTEXT, true ) CHANNELS_TEXT, CHANNELS_LONGTEXT, true )
add_string( "decklink-video-connection", 0, add_string( "decklink-video-connection", 0,
VIDEO_CONNECTION_TEXT, VIDEO_CONNECTION_LONGTEXT, true ) VIDEO_CONNECTION_TEXT, VIDEO_CONNECTION_LONGTEXT, true )
change_string_list( ppsz_videoconns, ppsz_videoconns_text, 0 ) change_string_list( ppsz_videoconns, ppsz_videoconns_text )
add_string( "decklink-aspect-ratio", NULL, add_string( "decklink-aspect-ratio", NULL,
ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, true ) ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, true )
......
...@@ -87,12 +87,6 @@ static void ConfigTuner( vlc_object_t *, ICaptureGraphBuilder2 *, ...@@ -87,12 +87,6 @@ static void ConfigTuner( vlc_object_t *, ICaptureGraphBuilder2 *,
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
static const char *const ppsz_vdev[] = { "", "none" };
static const char *const ppsz_vdev_text[] = { N_("Default"), N_("None") };
static const char *const ppsz_adev[] = { "", "none" };
static const char *const ppsz_adev_text[] = { N_("Default"), N_("None") };
static const int pi_tuner_input[] = { 0, 1, 2 }; static const int pi_tuner_input[] = { 0, 1, 2 };
static const char *const ppsz_tuner_input_text[] = static const char *const ppsz_tuner_input_text[] =
{N_("Default"), N_("Cable"), N_("Antenna")}; {N_("Default"), N_("Cable"), N_("Antenna")};
...@@ -228,12 +222,12 @@ vlc_module_begin () ...@@ -228,12 +222,12 @@ vlc_module_begin ()
set_subcategory( SUBCAT_INPUT_ACCESS ) set_subcategory( SUBCAT_INPUT_ACCESS )
add_string( CFG_PREFIX "vdev", NULL, VDEV_TEXT, VDEV_LONGTEXT, false) add_string( CFG_PREFIX "vdev", NULL, VDEV_TEXT, VDEV_LONGTEXT, false)
change_string_list( ppsz_vdev, ppsz_vdev_text, FindDevicesCallback ) change_string_cb( FindDevicesCallback )
change_action_add( FindDevicesCallback, N_("Refresh list") ) change_action_add( FindDevicesCallback, N_("Refresh list") )
change_action_add( ConfigDevicesCallback, N_("Configure") ) change_action_add( ConfigDevicesCallback, N_("Configure") )
add_string( CFG_PREFIX "adev", NULL, ADEV_TEXT, ADEV_LONGTEXT, false) add_string( CFG_PREFIX "adev", NULL, ADEV_TEXT, ADEV_LONGTEXT, false)
change_string_list( ppsz_adev, ppsz_adev_text, FindDevicesCallback ) change_string_cb( FindDevicesCallback )
change_action_add( FindDevicesCallback, N_("Refresh list") ) change_action_add( FindDevicesCallback, N_("Refresh list") )
change_action_add( ConfigDevicesCallback, N_("Configure") ) change_action_add( ConfigDevicesCallback, N_("Configure") )
......
...@@ -285,17 +285,17 @@ vlc_module_begin () ...@@ -285,17 +285,17 @@ vlc_module_begin ()
change_integer_list (transmission_vlc, transmission_user) change_integer_list (transmission_vlc, transmission_user)
change_safe () change_safe ()
add_string ("dvb-guard", "", GUARD_TEXT, GUARD_TEXT, true) add_string ("dvb-guard", "", GUARD_TEXT, GUARD_TEXT, true)
change_string_list (guard_vlc, guard_user, NULL) change_string_list (guard_vlc, guard_user)
change_safe () change_safe ()
set_section (N_("DVB-T reception parameters"), NULL) set_section (N_("DVB-T reception parameters"), NULL)
add_string ("dvb-code-rate-hp", "", add_string ("dvb-code-rate-hp", "",
CODE_RATE_HP_TEXT, CODE_RATE_LONGTEXT, true) CODE_RATE_HP_TEXT, CODE_RATE_LONGTEXT, true)
change_string_list (code_rate_vlc, code_rate_user, NULL) change_string_list (code_rate_vlc, code_rate_user)
change_safe () change_safe ()
add_string ("dvb-code-rate-lp", "", add_string ("dvb-code-rate-lp", "",
CODE_RATE_LP_TEXT, CODE_RATE_LONGTEXT, true) CODE_RATE_LP_TEXT, CODE_RATE_LONGTEXT, true)
change_string_list (code_rate_vlc, code_rate_user, NULL) change_string_list (code_rate_vlc, code_rate_user)
change_safe () change_safe ()
add_integer ("dvb-hierarchy", -1, HIERARCHY_TEXT, HIERARCHY_TEXT, true) add_integer ("dvb-hierarchy", -1, HIERARCHY_TEXT, HIERARCHY_TEXT, true)
change_integer_list (hierarchy_vlc, hierarchy_user) change_integer_list (hierarchy_vlc, hierarchy_user)
...@@ -307,10 +307,10 @@ vlc_module_begin () ...@@ -307,10 +307,10 @@ vlc_module_begin ()
set_section (N_("ISDB-T reception parameters"), NULL) set_section (N_("ISDB-T reception parameters"), NULL)
add_string ("dvb-a-modulation", NULL, add_string ("dvb-a-modulation", NULL,
MODULATION_A_TEXT, MODULATION_LONGTEXT, true) MODULATION_A_TEXT, MODULATION_LONGTEXT, true)
change_string_list (modulation_vlc, modulation_user, NULL) change_string_list (modulation_vlc, modulation_user)
change_safe () change_safe ()
add_string ("dvb-a-fec", NULL, CODE_RATE_A_TEXT, CODE_RATE_LONGTEXT, true) add_string ("dvb-a-fec", NULL, CODE_RATE_A_TEXT, CODE_RATE_LONGTEXT, true)
change_string_list (code_rate_vlc, code_rate_user, NULL) change_string_list (code_rate_vlc, code_rate_user)
change_safe () change_safe ()
add_integer ("dvb-a-count", 0, SEGMENT_COUNT_A_TEXT, NULL, true) add_integer ("dvb-a-count", 0, SEGMENT_COUNT_A_TEXT, NULL, true)
change_integer_range (0, 13) change_integer_range (0, 13)
...@@ -320,10 +320,10 @@ vlc_module_begin () ...@@ -320,10 +320,10 @@ vlc_module_begin ()
change_safe () change_safe ()
add_string ("dvb-b-modulation", NULL, add_string ("dvb-b-modulation", NULL,
MODULATION_B_TEXT, MODULATION_LONGTEXT, true) MODULATION_B_TEXT, MODULATION_LONGTEXT, true)
change_string_list (modulation_vlc, modulation_user, NULL) change_string_list (modulation_vlc, modulation_user)
change_safe () change_safe ()
add_string ("dvb-b-fec", NULL, CODE_RATE_B_TEXT, CODE_RATE_LONGTEXT, true) add_string ("dvb-b-fec", NULL, CODE_RATE_B_TEXT, CODE_RATE_LONGTEXT, true)
change_string_list (code_rate_vlc, code_rate_user, NULL) change_string_list (code_rate_vlc, code_rate_user)
change_safe () change_safe ()
add_integer ("dvb-b-count", 0, SEGMENT_COUNT_B_TEXT, NULL, true) add_integer ("dvb-b-count", 0, SEGMENT_COUNT_B_TEXT, NULL, true)
change_integer_range (0, 13) change_integer_range (0, 13)
...@@ -333,10 +333,10 @@ vlc_module_begin () ...@@ -333,10 +333,10 @@ vlc_module_begin ()
change_safe () change_safe ()
add_string ("dvb-c-modulation", NULL, add_string ("dvb-c-modulation", NULL,
MODULATION_C_TEXT, MODULATION_LONGTEXT, true) MODULATION_C_TEXT, MODULATION_LONGTEXT, true)
change_string_list (modulation_vlc, modulation_user, NULL) change_string_list (modulation_vlc, modulation_user)
change_safe () change_safe ()
add_string ("dvb-c-fec", NULL, CODE_RATE_C_TEXT, CODE_RATE_LONGTEXT, true) add_string ("dvb-c-fec", NULL, CODE_RATE_C_TEXT, CODE_RATE_LONGTEXT, true)
change_string_list (code_rate_vlc, code_rate_user, NULL) change_string_list (code_rate_vlc, code_rate_user)
change_safe () change_safe ()
add_integer ("dvb-c-count", 0, SEGMENT_COUNT_C_TEXT, NULL, true) add_integer ("dvb-c-count", 0, SEGMENT_COUNT_C_TEXT, NULL, true)
change_integer_range (0, 13) change_integer_range (0, 13)
...@@ -348,13 +348,13 @@ vlc_module_begin () ...@@ -348,13 +348,13 @@ vlc_module_begin ()
set_section (N_("Cable and satellite reception parameters"), NULL) set_section (N_("Cable and satellite reception parameters"), NULL)
add_string ("dvb-modulation", NULL, add_string ("dvb-modulation", NULL,
MODULATION_TEXT, MODULATION_LONGTEXT, false) MODULATION_TEXT, MODULATION_LONGTEXT, false)
change_string_list (modulation_vlc, modulation_user, NULL) change_string_list (modulation_vlc, modulation_user)
change_safe () change_safe ()
add_integer ("dvb-srate", 0, SRATE_TEXT, SRATE_LONGTEXT, false) add_integer ("dvb-srate", 0, SRATE_TEXT, SRATE_LONGTEXT, false)
change_integer_range (0, UINT64_C(0xffffffff)) change_integer_range (0, UINT64_C(0xffffffff))
change_safe () change_safe ()
add_string ("dvb-fec", "", CODE_RATE_TEXT, CODE_RATE_LONGTEXT, true) add_string ("dvb-fec", "", CODE_RATE_TEXT, CODE_RATE_LONGTEXT, true)
change_string_list (code_rate_vlc, code_rate_user, NULL) change_string_list (code_rate_vlc, code_rate_user)
change_safe () change_safe ()
set_section (N_("DVB-S2 parameters"), NULL) set_section (N_("DVB-S2 parameters"), NULL)
...@@ -373,7 +373,7 @@ vlc_module_begin () ...@@ -373,7 +373,7 @@ vlc_module_begin ()
set_section (N_("Satellite equipment control"), NULL) set_section (N_("Satellite equipment control"), NULL)
add_string ("dvb-polarization", "", add_string ("dvb-polarization", "",
POLARIZATION_TEXT, POLARIZATION_LONGTEXT, false) POLARIZATION_TEXT, POLARIZATION_LONGTEXT, false)
change_string_list (polarization_vlc, polarization_user, NULL) change_string_list (polarization_vlc, polarization_user)
change_safe () change_safe ()
add_integer ("dvb-voltage", 13, "", "", true) add_integer ("dvb-voltage", 13, "", "", true)
change_integer_range (0, 18) change_integer_range (0, 18)
......
...@@ -73,11 +73,11 @@ vlc_module_begin () ...@@ -73,11 +73,11 @@ vlc_module_begin ()
set_capability( "access", 55 ) set_capability( "access", 55 )
add_string( "recursive", "expand" , RECURSIVE_TEXT, add_string( "recursive", "expand" , RECURSIVE_TEXT,
RECURSIVE_LONGTEXT, false ) RECURSIVE_LONGTEXT, false )
change_string_list( psz_recursive_list, psz_recursive_list_text, 0 ) change_string_list( psz_recursive_list, psz_recursive_list_text )
add_string( "ignore-filetypes", "m3u,db,nfo,ini,jpg,jpeg,ljpg,gif,png,pgm,pgmyuv,pbm,pam,tga,bmp,pnm,xpm,xcf,pcx,tif,tiff,lbm,sfv,txt,sub,idx,srt,cue,ssa", add_string( "ignore-filetypes", "m3u,db,nfo,ini,jpg,jpeg,ljpg,gif,png,pgm,pgmyuv,pbm,pam,tga,bmp,pnm,xpm,xcf,pcx,tif,tiff,lbm,sfv,txt,sub,idx,srt,cue,ssa",
IGNORE_TEXT, IGNORE_LONGTEXT, false ) IGNORE_TEXT, IGNORE_LONGTEXT, false )
add_string( "directory-sort", "collate", SORT_TEXT, SORT_LONGTEXT, false ) add_string( "directory-sort", "collate", SORT_TEXT, SORT_LONGTEXT, false )
change_string_list( psz_sort_list, psz_sort_list_text, 0 ) change_string_list( psz_sort_list, psz_sort_list_text )
#ifndef HAVE_FDOPENDIR #ifndef HAVE_FDOPENDIR
add_shortcut( "file", "directory", "dir" ) add_shortcut( "file", "directory", "dir" )
#else #else
......
...@@ -125,7 +125,7 @@ vlc_module_begin () ...@@ -125,7 +125,7 @@ vlc_module_begin ()
change_integer_range (0, 32767) change_integer_range (0, 32767)
add_string ("rtp-dynamic-pt", NULL, RTP_DYNAMIC_PT_TEXT, add_string ("rtp-dynamic-pt", NULL, RTP_DYNAMIC_PT_TEXT,
RTP_DYNAMIC_PT_LONGTEXT, true) RTP_DYNAMIC_PT_LONGTEXT, true)
change_string_list (dynamic_pt_list, dynamic_pt_list_text, NULL) change_string_list (dynamic_pt_list, dynamic_pt_list_text)
/*add_shortcut ("sctp")*/ /*add_shortcut ("sctp")*/
add_shortcut ("dccp", "rtptcp", /* "tcp" is already taken :( */ add_shortcut ("dccp", "rtptcp", /* "tcp" is already taken :( */
......
...@@ -276,7 +276,7 @@ vlc_module_begin () ...@@ -276,7 +276,7 @@ vlc_module_begin ()
change_safe() change_safe()
add_string( CFG_PREFIX "standard", "", add_string( CFG_PREFIX "standard", "",
STANDARD_TEXT, STANDARD_LONGTEXT, false ) STANDARD_TEXT, STANDARD_LONGTEXT, false )
change_string_list( standards_vlc, standards_user, NULL ) change_string_list( standards_vlc, standards_user )
change_safe() change_safe()
add_string( CFG_PREFIX "chroma", NULL, CHROMA_TEXT, CHROMA_LONGTEXT, add_string( CFG_PREFIX "chroma", NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
true ) true )
......
...@@ -85,7 +85,7 @@ vlc_module_begin () ...@@ -85,7 +85,7 @@ vlc_module_begin ()
add_string( "equalizer-preset", "flat", PRESET_TEXT, add_string( "equalizer-preset", "flat", PRESET_TEXT,
PRESET_LONGTEXT, false ) PRESET_LONGTEXT, false )
change_string_list( preset_list, preset_list_text, 0 ) change_string_list( preset_list, preset_list_text )
add_string( "equalizer-bands", NULL, BANDS_TEXT, add_string( "equalizer-bands", NULL, BANDS_TEXT,
BANDS_LONGTEXT, true ) BANDS_LONGTEXT, true )
add_bool( "equalizer-2pass", false, TWOPASS_TEXT, add_bool( "equalizer-2pass", false, TWOPASS_TEXT,
......
...@@ -60,12 +60,6 @@ static void GetDevices (vlc_object_t *, module_config_t *, const char *); ...@@ -60,12 +60,6 @@ static void GetDevices (vlc_object_t *, module_config_t *, const char *);
#define AUDIO_DEV_TEXT N_("Audio output device") #define AUDIO_DEV_TEXT N_("Audio output device")
#define AUDIO_DEV_LONGTEXT N_("Audio output device (using ALSA syntax).") #define AUDIO_DEV_LONGTEXT N_("Audio output device (using ALSA syntax).")
static const char *const devices[] = {
"default",
};
static const char *const devices_text[] = {
N_("Default"),
};
#define AUDIO_CHAN_TEXT N_("Audio output channels") #define AUDIO_CHAN_TEXT N_("Audio output channels")
#define AUDIO_CHAN_LONGTEXT N_("Channels available for audio output." \ #define AUDIO_CHAN_LONGTEXT N_("Channels available for audio output." \
...@@ -87,7 +81,7 @@ vlc_module_begin () ...@@ -87,7 +81,7 @@ vlc_module_begin ()
set_subcategory( SUBCAT_AUDIO_AOUT ) set_subcategory( SUBCAT_AUDIO_AOUT )
add_string ("alsa-audio-device", "default", add_string ("alsa-audio-device", "default",
AUDIO_DEV_TEXT, AUDIO_DEV_LONGTEXT, false) AUDIO_DEV_TEXT, AUDIO_DEV_LONGTEXT, false)
change_string_list( devices, devices_text, FindDevicesCallback ) change_string_cb( FindDevicesCallback )
change_action_add( FindDevicesCallback, N_("Refresh list") ) change_action_add( FindDevicesCallback, N_("Refresh list") )
add_integer ("alsa-audio-channels", AOUT_CHANS_FRONT, add_integer ("alsa-audio-channels", AOUT_CHANS_FRONT,
AUDIO_CHAN_TEXT, AUDIO_CHAN_LONGTEXT, false) AUDIO_CHAN_TEXT, AUDIO_CHAN_LONGTEXT, false)
......
...@@ -119,8 +119,6 @@ static int ReloadDirectXDevices( vlc_object_t *, char const *, ...@@ -119,8 +119,6 @@ static int ReloadDirectXDevices( vlc_object_t *, char const *,
/* Speaker setup override options list */ /* Speaker setup override options list */
static const char *const speaker_list[] = { "Windows default", "Mono", "Stereo", static const char *const speaker_list[] = { "Windows default", "Mono", "Stereo",
"Quad", "5.1", "7.1" }; "Quad", "5.1", "7.1" };
static const char *const ppsz_adev[] = {"default", };
static const char *const ppsz_adev_text[] = {"default", };
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
...@@ -145,14 +143,14 @@ vlc_module_begin () ...@@ -145,14 +143,14 @@ vlc_module_begin ()
add_string( "directx-audio-device", "default", add_string( "directx-audio-device", "default",
DEVICE_TEXT, DEVICE_LONGTEXT, false ) DEVICE_TEXT, DEVICE_LONGTEXT, false )
change_string_list( ppsz_adev, ppsz_adev_text, ReloadDirectXDevices ) change_string_cb( ReloadDirectXDevices )
change_action_add( ReloadDirectXDevices, N_("Refresh list") ) change_action_add( ReloadDirectXDevices, N_("Refresh list") )
add_obsolete_string( "directx-audio-device-name") add_obsolete_string( "directx-audio-device-name")
add_bool( "directx-audio-float32", false, FLOAT_TEXT, add_bool( "directx-audio-float32", false, FLOAT_TEXT,
FLOAT_LONGTEXT, true ) FLOAT_LONGTEXT, true )
add_string( "directx-audio-speaker", "Windows default", add_string( "directx-audio-speaker", "Windows default",
SPEAKER_TEXT, SPEAKER_LONGTEXT, true ) SPEAKER_TEXT, SPEAKER_LONGTEXT, true )
change_string_list( speaker_list, speaker_list, NULL ) change_string_list( speaker_list, speaker_list )
add_integer( "directx-volume", DSBVOLUME_MAX, add_integer( "directx-volume", DSBVOLUME_MAX,
VOLUME_TEXT, VOLUME_LONGTEXT, true ) VOLUME_TEXT, VOLUME_LONGTEXT, true )
change_integer_range( DSBVOLUME_MIN, DSBVOLUME_MAX ) change_integer_range( DSBVOLUME_MIN, DSBVOLUME_MAX )
......
...@@ -113,7 +113,7 @@ vlc_module_begin () ...@@ -113,7 +113,7 @@ vlc_module_begin ()
FILE_LONGTEXT, false ) FILE_LONGTEXT, false )
add_string( "audiofile-format", "s16", add_string( "audiofile-format", "s16",
FORMAT_TEXT, FORMAT_TEXT, true ) FORMAT_TEXT, FORMAT_TEXT, true )
change_string_list( format_list, format_list, NULL ) change_string_list( format_list, format_list )
add_integer( "audiofile-channels", 0, add_integer( "audiofile-channels", 0,
CHANNELS_TEXT, CHANNELS_LONGTEXT, true ) CHANNELS_TEXT, CHANNELS_LONGTEXT, true )
change_integer_range( 0, 6 ) change_integer_range( 0, 6 )
......
...@@ -89,8 +89,7 @@ vlc_module_begin () ...@@ -89,8 +89,7 @@ vlc_module_begin ()
set_subcategory( SUBCAT_AUDIO_AOUT ) set_subcategory( SUBCAT_AUDIO_AOUT )
add_string( "kai-audio-device", ppsz_kai_audio_device[0], add_string( "kai-audio-device", ppsz_kai_audio_device[0],
KAI_AUDIO_DEVICE_TEXT, KAI_AUDIO_DEVICE_LONGTEXT, false ) KAI_AUDIO_DEVICE_TEXT, KAI_AUDIO_DEVICE_LONGTEXT, false )
change_string_list( ppsz_kai_audio_device, ppsz_kai_audio_device_text, change_string_list( ppsz_kai_audio_device, ppsz_kai_audio_device_text )
0 )
add_sw_gain( ) add_sw_gain( )
add_bool( "kai-audio-exclusive-mode", false, add_bool( "kai-audio-exclusive-mode", false,
KAI_AUDIO_EXCLUSIVE_MODE_TEXT, KAI_AUDIO_EXCLUSIVE_MODE_LONGTEXT, KAI_AUDIO_EXCLUSIVE_MODE_TEXT, KAI_AUDIO_EXCLUSIVE_MODE_LONGTEXT,
......
...@@ -79,9 +79,6 @@ static uint32_t findDeviceID(char *); ...@@ -79,9 +79,6 @@ static uint32_t findDeviceID(char *);
static const wchar_t device_name_fmt[] = L"%ls ($%x,$%x)"; static const wchar_t device_name_fmt[] = L"%ls ($%x,$%x)";
static const char *const ppsz_adev[] = { "wavemapper", };
static const char *const ppsz_adev_text[] = { N_("Microsoft Soundmapper") };
/***************************************************************************** /*****************************************************************************
* aout_sys_t: waveOut audio output method descriptor * aout_sys_t: waveOut audio output method descriptor
***************************************************************************** *****************************************************************************
...@@ -147,7 +144,7 @@ vlc_module_begin () ...@@ -147,7 +144,7 @@ vlc_module_begin ()
add_string( "waveout-audio-device", "wavemapper", add_string( "waveout-audio-device", "wavemapper",
DEVICE_TEXT, DEVICE_LONG, false ) DEVICE_TEXT, DEVICE_LONG, false )
change_string_list( ppsz_adev, ppsz_adev_text, ReloadWaveoutDevices ) change_string_cb( ReloadWaveoutDevices )
change_action_add( ReloadWaveoutDevices, N_("Refresh list") ) change_action_add( ReloadWaveoutDevices, N_("Refresh list") )
add_sw_gain( ) add_sw_gain( )
......
...@@ -209,7 +209,7 @@ vlc_module_begin () ...@@ -209,7 +209,7 @@ vlc_module_begin ()
add_string( ENC_CFG_PREFIX "codec", NULL, CODEC_TEXT, CODEC_LONGTEXT, true ) add_string( ENC_CFG_PREFIX "codec", NULL, CODEC_TEXT, CODEC_LONGTEXT, true )
add_string( ENC_CFG_PREFIX "hq", "simple", ENC_HQ_TEXT, add_string( ENC_CFG_PREFIX "hq", "simple", ENC_HQ_TEXT,
ENC_HQ_LONGTEXT, false ) ENC_HQ_LONGTEXT, false )
change_string_list( enc_hq_list, enc_hq_list_text, 0 ) change_string_list( enc_hq_list, enc_hq_list_text )
add_integer( ENC_CFG_PREFIX "keyint", 0, ENC_KEYINT_TEXT, add_integer( ENC_CFG_PREFIX "keyint", 0, ENC_KEYINT_TEXT,
ENC_KEYINT_LONGTEXT, false ) ENC_KEYINT_LONGTEXT, false )
add_integer( ENC_CFG_PREFIX "bframes", 0, ENC_BFRAMES_TEXT, add_integer( ENC_CFG_PREFIX "bframes", 0, ENC_BFRAMES_TEXT,
......
...@@ -221,7 +221,7 @@ vlc_module_begin() ...@@ -221,7 +221,7 @@ vlc_module_begin()
add_string( ENC_CFG_PREFIX ENC_PREFILTER, "diaglp", add_string( ENC_CFG_PREFIX ENC_PREFILTER, "diaglp",
ENC_PREFILTER_TEXT, ENC_PREFILTER_LONGTEXT, false ) ENC_PREFILTER_TEXT, ENC_PREFILTER_LONGTEXT, false )
change_string_list( enc_prefilter_list, enc_prefilter_list_text, 0 ); change_string_list( enc_prefilter_list, enc_prefilter_list_text );
add_integer( ENC_CFG_PREFIX ENC_PREFILTER_STRENGTH, 1, add_integer( ENC_CFG_PREFIX ENC_PREFILTER_STRENGTH, 1,
ENC_PREFILTER_STRENGTH_TEXT, ENC_PREFILTER_STRENGTH_LONGTEXT, false ) ENC_PREFILTER_STRENGTH_TEXT, ENC_PREFILTER_STRENGTH_LONGTEXT, false )
...@@ -229,7 +229,7 @@ vlc_module_begin() ...@@ -229,7 +229,7 @@ vlc_module_begin()
add_string( ENC_CFG_PREFIX ENC_CHROMAFMT, "420", add_string( ENC_CFG_PREFIX ENC_CHROMAFMT, "420",
ENC_CHROMAFMT_TEXT, ENC_CHROMAFMT_LONGTEXT, false ) ENC_CHROMAFMT_TEXT, ENC_CHROMAFMT_LONGTEXT, false )
change_string_list( enc_chromafmt_list, enc_chromafmt_list_text, 0 ); change_string_list( enc_chromafmt_list, enc_chromafmt_list_text );
add_integer( ENC_CFG_PREFIX ENC_L1SEP, -1, add_integer( ENC_CFG_PREFIX ENC_L1SEP, -1,
ENC_L1SEP_TEXT, ENC_L1SEP_LONGTEXT, false ) ENC_L1SEP_TEXT, ENC_L1SEP_LONGTEXT, false )
...@@ -241,11 +241,11 @@ vlc_module_begin() ...@@ -241,11 +241,11 @@ vlc_module_begin()
add_string( ENC_CFG_PREFIX ENC_CODINGMODE, "auto", add_string( ENC_CFG_PREFIX ENC_CODINGMODE, "auto",
ENC_CODINGMODE_TEXT, ENC_CODINGMODE_LONGTEXT, false ) ENC_CODINGMODE_TEXT, ENC_CODINGMODE_LONGTEXT, false )
change_string_list( enc_codingmode_list, enc_codingmode_list_text, 0 ); change_string_list( enc_codingmode_list, enc_codingmode_list_text );
add_string( ENC_CFG_PREFIX ENC_MVPREC, "1/2", add_string( ENC_CFG_PREFIX ENC_MVPREC, "1/2",
ENC_MVPREC_TEXT, ENC_MVPREC_LONGTEXT, false ) ENC_MVPREC_TEXT, ENC_MVPREC_LONGTEXT, false )
change_string_list( enc_mvprec_list, enc_mvprec_list, 0 ); change_string_list( enc_mvprec_list, enc_mvprec_list );
add_integer( ENC_CFG_PREFIX ENC_MCBLK_WIDTH, -1, add_integer( ENC_CFG_PREFIX ENC_MCBLK_WIDTH, -1,
ENC_MCBLK_WIDTH_TEXT, ENC_MCBLK_WIDTH_LONGTEXT, false ) ENC_MCBLK_WIDTH_TEXT, ENC_MCBLK_WIDTH_LONGTEXT, false )
......
...@@ -375,7 +375,7 @@ vlc_module_begin () ...@@ -375,7 +375,7 @@ vlc_module_begin ()
add_string( ENC_CFG_PREFIX ENC_RATE_CONTROL, NULL, add_string( ENC_CFG_PREFIX ENC_RATE_CONTROL, NULL,
ENC_RATE_CONTROL_TEXT, ENC_RATE_CONTROL_LONGTEXT, false ) ENC_RATE_CONTROL_TEXT, ENC_RATE_CONTROL_LONGTEXT, false )
change_string_list( enc_rate_control_list, enc_rate_control_list_text, 0 ); change_string_list( enc_rate_control_list, enc_rate_control_list_text )
add_float( ENC_CFG_PREFIX ENC_QUALITY, -1., add_float( ENC_CFG_PREFIX ENC_QUALITY, -1.,
ENC_QUALITY_TEXT, ENC_QUALITY_LONGTEXT, false ) ENC_QUALITY_TEXT, ENC_QUALITY_LONGTEXT, false )
...@@ -399,7 +399,7 @@ vlc_module_begin () ...@@ -399,7 +399,7 @@ vlc_module_begin ()
add_string( ENC_CFG_PREFIX ENC_GOP_STRUCTURE, NULL, add_string( ENC_CFG_PREFIX ENC_GOP_STRUCTURE, NULL,
ENC_GOP_STRUCTURE_TEXT, ENC_GOP_STRUCTURE_LONGTEXT, false ) ENC_GOP_STRUCTURE_TEXT, ENC_GOP_STRUCTURE_LONGTEXT, false )
change_string_list( enc_gop_structure_list, enc_gop_structure_list_text, 0 ); change_string_list( enc_gop_structure_list, enc_gop_structure_list_text )
add_integer( ENC_CFG_PREFIX ENC_AU_DISTANCE, -1, add_integer( ENC_CFG_PREFIX ENC_AU_DISTANCE, -1,
ENC_AU_DISTANCE_TEXT, ENC_AU_DISTANCE_LONGTEXT, false ) ENC_AU_DISTANCE_TEXT, ENC_AU_DISTANCE_LONGTEXT, false )
...@@ -407,26 +407,26 @@ vlc_module_begin () ...@@ -407,26 +407,26 @@ vlc_module_begin ()
add_string( ENC_CFG_PREFIX ENC_CHROMAFMT, "420", add_string( ENC_CFG_PREFIX ENC_CHROMAFMT, "420",
ENC_CHROMAFMT_TEXT, ENC_CHROMAFMT_LONGTEXT, false ) ENC_CHROMAFMT_TEXT, ENC_CHROMAFMT_LONGTEXT, false )
change_string_list( enc_chromafmt_list, enc_chromafmt_list_text, 0 ); change_string_list( enc_chromafmt_list, enc_chromafmt_list_text )
add_string( ENC_CFG_PREFIX ENC_CODINGMODE, "auto", add_string( ENC_CFG_PREFIX ENC_CODINGMODE, "auto",
ENC_CODINGMODE_TEXT, ENC_CODINGMODE_LONGTEXT, false ) ENC_CODINGMODE_TEXT, ENC_CODINGMODE_LONGTEXT, false )
change_string_list( enc_codingmode_list, enc_codingmode_list_text, 0 ); change_string_list( enc_codingmode_list, enc_codingmode_list_text )
add_string( ENC_CFG_PREFIX ENC_MVPREC, NULL, add_string( ENC_CFG_PREFIX ENC_MVPREC, NULL,
ENC_MVPREC_TEXT, ENC_MVPREC_LONGTEXT, false ) ENC_MVPREC_TEXT, ENC_MVPREC_LONGTEXT, false )
change_string_list( enc_mvprec_list, enc_mvprec_list, 0 ); change_string_list( enc_mvprec_list, enc_mvprec_list )
/* advanced option only */ /* advanced option only */
add_string( ENC_CFG_PREFIX ENC_MCBLK_SIZE, NULL, add_string( ENC_CFG_PREFIX ENC_MCBLK_SIZE, NULL,
ENC_MCBLK_SIZE_TEXT, ENC_MCBLK_SIZE_TEXT, true ) ENC_MCBLK_SIZE_TEXT, ENC_MCBLK_SIZE_TEXT, true )
change_string_list( enc_block_size_list, enc_block_size_list_text, 0 ); change_string_list( enc_block_size_list, enc_block_size_list_text )
/* advanced option only */ /* advanced option only */
add_string( ENC_CFG_PREFIX ENC_MCBLK_OVERLAP, NULL, add_string( ENC_CFG_PREFIX ENC_MCBLK_OVERLAP, NULL,
ENC_MCBLK_OVERLAP_TEXT, ENC_MCBLK_OVERLAP_TEXT, true ) ENC_MCBLK_OVERLAP_TEXT, ENC_MCBLK_OVERLAP_TEXT, true )
change_string_list( enc_block_overlap_list, enc_block_overlap_list_text, 0 ); change_string_list( enc_block_overlap_list, enc_block_overlap_list_text )
/* advanced option only */ /* advanced option only */
add_integer( ENC_CFG_PREFIX ENC_ME_COMBINED, -1, add_integer( ENC_CFG_PREFIX ENC_ME_COMBINED, -1,
...@@ -455,11 +455,11 @@ vlc_module_begin () ...@@ -455,11 +455,11 @@ vlc_module_begin ()
add_string( ENC_CFG_PREFIX ENC_DWTINTRA, NULL, add_string( ENC_CFG_PREFIX ENC_DWTINTRA, NULL,
ENC_DWTINTRA_TEXT, ENC_DWTINTRA_TEXT, false ) ENC_DWTINTRA_TEXT, ENC_DWTINTRA_TEXT, false )
change_string_list( enc_wavelet_list, enc_wavelet_list_text, 0 ); change_string_list( enc_wavelet_list, enc_wavelet_list_text )
add_string( ENC_CFG_PREFIX ENC_DWTINTER, NULL, add_string( ENC_CFG_PREFIX ENC_DWTINTER, NULL,
ENC_DWTINTER_TEXT, ENC_DWTINTER_TEXT, false ) ENC_DWTINTER_TEXT, ENC_DWTINTER_TEXT, false )
change_string_list( enc_wavelet_list, enc_wavelet_list_text, 0 ); change_string_list( enc_wavelet_list, enc_wavelet_list_text )
add_integer( ENC_CFG_PREFIX ENC_DWTDEPTH, -1, add_integer( ENC_CFG_PREFIX ENC_DWTDEPTH, -1,
ENC_DWTDEPTH_TEXT, ENC_DWTDEPTH_LONGTEXT, false ) ENC_DWTDEPTH_TEXT, ENC_DWTDEPTH_LONGTEXT, false )
...@@ -473,11 +473,11 @@ vlc_module_begin () ...@@ -473,11 +473,11 @@ vlc_module_begin ()
/* advanced option only */ /* advanced option only */
add_string( ENC_CFG_PREFIX ENC_SCBLK_SIZE, NULL, add_string( ENC_CFG_PREFIX ENC_SCBLK_SIZE, NULL,
ENC_SCBLK_SIZE_TEXT, ENC_SCBLK_SIZE_TEXT, true ) ENC_SCBLK_SIZE_TEXT, ENC_SCBLK_SIZE_TEXT, true )
change_string_list( enc_codeblock_size_list, enc_codeblock_size_list_text, 0 ); change_string_list( enc_codeblock_size_list, enc_codeblock_size_list_text )
add_string( ENC_CFG_PREFIX ENC_PREFILTER, NULL, add_string( ENC_CFG_PREFIX ENC_PREFILTER, NULL,
ENC_PREFILTER_TEXT, ENC_PREFILTER_LONGTEXT, false ) ENC_PREFILTER_TEXT, ENC_PREFILTER_LONGTEXT, false )
change_string_list( enc_filtering_list, enc_filtering_list_text, 0 ); change_string_list( enc_filtering_list, enc_filtering_list_text )
add_float( ENC_CFG_PREFIX ENC_PREFILTER_STRENGTH, -1., add_float( ENC_CFG_PREFIX ENC_PREFILTER_STRENGTH, -1.,
ENC_PREFILTER_STRENGTH_TEXT, ENC_PREFILTER_STRENGTH_LONGTEXT, false ) ENC_PREFILTER_STRENGTH_TEXT, ENC_PREFILTER_STRENGTH_LONGTEXT, false )
...@@ -491,7 +491,7 @@ vlc_module_begin () ...@@ -491,7 +491,7 @@ vlc_module_begin ()
/* advanced option only */ /* advanced option only */
add_string( ENC_CFG_PREFIX ENC_PWT, NULL, add_string( ENC_CFG_PREFIX ENC_PWT, NULL,
ENC_PWT_TEXT, ENC_PWT_TEXT, true ) ENC_PWT_TEXT, ENC_PWT_TEXT, true )
change_string_list( enc_perceptual_weighting_list, enc_perceptual_weighting_list, 0 ); change_string_list( enc_perceptual_weighting_list, enc_perceptual_weighting_list )
/* advanced option only */ /* advanced option only */
add_float( ENC_CFG_PREFIX ENC_PDIST, -1, add_float( ENC_CFG_PREFIX ENC_PDIST, -1,
...@@ -516,7 +516,7 @@ vlc_module_begin () ...@@ -516,7 +516,7 @@ vlc_module_begin ()
/* advanced option only */ /* advanced option only */
add_string( ENC_CFG_PREFIX ENC_FORCE_PROFILE, NULL, add_string( ENC_CFG_PREFIX ENC_FORCE_PROFILE, NULL,
ENC_FORCE_PROFILE_TEXT, ENC_FORCE_PROFILE_TEXT, true ) ENC_FORCE_PROFILE_TEXT, ENC_FORCE_PROFILE_TEXT, true )
change_string_list( enc_profile_list, enc_profile_list_text, 0 ); change_string_list( enc_profile_list, enc_profile_list_text )
vlc_module_end () vlc_module_end ()
......
...@@ -188,7 +188,7 @@ vlc_module_begin () ...@@ -188,7 +188,7 @@ vlc_module_begin ()
change_integer_list( pi_justification, ppsz_justification_text ) change_integer_list( pi_justification, ppsz_justification_text )
add_string( "subsdec-encoding", "", add_string( "subsdec-encoding", "",
ENCODING_TEXT, ENCODING_LONGTEXT, false ) ENCODING_TEXT, ENCODING_LONGTEXT, false )
change_string_list( ppsz_encodings, ppsz_encoding_names, 0 ) change_string_list( ppsz_encodings, ppsz_encoding_names )
add_bool( "subsdec-autodetect-utf8", true, add_bool( "subsdec-autodetect-utf8", true,
AUTODETECT_UTF8_TEXT, AUTODETECT_UTF8_LONGTEXT, false ) AUTODETECT_UTF8_TEXT, AUTODETECT_UTF8_LONGTEXT, false )
add_bool( "subsdec-formatted", true, FORMAT_TEXT, FORMAT_LONGTEXT, add_bool( "subsdec-formatted", true, FORMAT_TEXT, FORMAT_LONGTEXT,
......
...@@ -459,7 +459,7 @@ vlc_module_begin () ...@@ -459,7 +459,7 @@ vlc_module_begin ()
#if X264_BUILD >= 102 && X264_BUILD <= 114 #if X264_BUILD >= 102 && X264_BUILD <= 114
add_string( SOUT_CFG_PREFIX "opengop", "none", OPENGOP_TEXT, add_string( SOUT_CFG_PREFIX "opengop", "none", OPENGOP_TEXT,
OPENGOP_LONGTEXT, true ) OPENGOP_LONGTEXT, true )
change_string_list( x264_open_gop_names, x264_open_gop_names, 0 ); change_string_list( x264_open_gop_names, x264_open_gop_names )
#elif X264_BUILD > 114 #elif X264_BUILD > 114
add_bool( SOUT_CFG_PREFIX "opengop", false, OPENGOP_TEXT, add_bool( SOUT_CFG_PREFIX "opengop", false, OPENGOP_TEXT,
OPENGOP_LONGTEXT, true ) OPENGOP_LONGTEXT, true )
...@@ -492,7 +492,7 @@ vlc_module_begin () ...@@ -492,7 +492,7 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "bpyramid", "none", BPYRAMID_TEXT, add_string( SOUT_CFG_PREFIX "bpyramid", "none", BPYRAMID_TEXT,
BPYRAMID_LONGTEXT, true ) BPYRAMID_LONGTEXT, true )
#endif #endif
change_string_list( bpyramid_list, bpyramid_list, 0 ); change_string_list( bpyramid_list, bpyramid_list )