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
#define change_short( 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, \
(size_t)(sizeof (list) / sizeof (char *)), \
(const char *const *)(list), \
(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 ) \
vlc_config_set (VLC_CONFIG_LIST, \
......
......@@ -104,14 +104,14 @@ vlc_module_begin ()
MODE_TEXT, MODE_LONGTEXT, true )
add_string( "decklink-audio-connection", 0,
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,
RATE_TEXT, RATE_LONGTEXT, true )
add_integer( "decklink-audio-channels", 2,
CHANNELS_TEXT, CHANNELS_LONGTEXT, true )
add_string( "decklink-video-connection", 0,
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,
ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, true )
......
......@@ -87,12 +87,6 @@ static void ConfigTuner( vlc_object_t *, ICaptureGraphBuilder2 *,
/*****************************************************************************
* 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 char *const ppsz_tuner_input_text[] =
{N_("Default"), N_("Cable"), N_("Antenna")};
......@@ -228,12 +222,12 @@ vlc_module_begin ()
set_subcategory( SUBCAT_INPUT_ACCESS )
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( ConfigDevicesCallback, N_("Configure") )
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( ConfigDevicesCallback, N_("Configure") )
......
......@@ -285,17 +285,17 @@ vlc_module_begin ()
change_integer_list (transmission_vlc, transmission_user)
change_safe ()
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 ()
set_section (N_("DVB-T reception parameters"), NULL)
add_string ("dvb-code-rate-hp", "",
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 ()
add_string ("dvb-code-rate-lp", "",
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 ()
add_integer ("dvb-hierarchy", -1, HIERARCHY_TEXT, HIERARCHY_TEXT, true)
change_integer_list (hierarchy_vlc, hierarchy_user)
......@@ -307,10 +307,10 @@ vlc_module_begin ()
set_section (N_("ISDB-T reception parameters"), NULL)
add_string ("dvb-a-modulation", NULL,
MODULATION_A_TEXT, MODULATION_LONGTEXT, true)
change_string_list (modulation_vlc, modulation_user, NULL)
change_string_list (modulation_vlc, modulation_user)
change_safe ()
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 ()
add_integer ("dvb-a-count", 0, SEGMENT_COUNT_A_TEXT, NULL, true)
change_integer_range (0, 13)
......@@ -320,10 +320,10 @@ vlc_module_begin ()
change_safe ()
add_string ("dvb-b-modulation", NULL,
MODULATION_B_TEXT, MODULATION_LONGTEXT, true)
change_string_list (modulation_vlc, modulation_user, NULL)
change_string_list (modulation_vlc, modulation_user)
change_safe ()
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 ()
add_integer ("dvb-b-count", 0, SEGMENT_COUNT_B_TEXT, NULL, true)
change_integer_range (0, 13)
......@@ -333,10 +333,10 @@ vlc_module_begin ()
change_safe ()
add_string ("dvb-c-modulation", NULL,
MODULATION_C_TEXT, MODULATION_LONGTEXT, true)
change_string_list (modulation_vlc, modulation_user, NULL)
change_string_list (modulation_vlc, modulation_user)
change_safe ()
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 ()
add_integer ("dvb-c-count", 0, SEGMENT_COUNT_C_TEXT, NULL, true)
change_integer_range (0, 13)
......@@ -348,13 +348,13 @@ vlc_module_begin ()
set_section (N_("Cable and satellite reception parameters"), NULL)
add_string ("dvb-modulation", NULL,
MODULATION_TEXT, MODULATION_LONGTEXT, false)
change_string_list (modulation_vlc, modulation_user, NULL)
change_string_list (modulation_vlc, modulation_user)
change_safe ()
add_integer ("dvb-srate", 0, SRATE_TEXT, SRATE_LONGTEXT, false)
change_integer_range (0, UINT64_C(0xffffffff))
change_safe ()
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 ()
set_section (N_("DVB-S2 parameters"), NULL)
......@@ -373,7 +373,7 @@ vlc_module_begin ()
set_section (N_("Satellite equipment control"), NULL)
add_string ("dvb-polarization", "",
POLARIZATION_TEXT, POLARIZATION_LONGTEXT, false)
change_string_list (polarization_vlc, polarization_user, NULL)
change_string_list (polarization_vlc, polarization_user)
change_safe ()
add_integer ("dvb-voltage", 13, "", "", true)
change_integer_range (0, 18)
......
......@@ -73,11 +73,11 @@ vlc_module_begin ()
set_capability( "access", 55 )
add_string( "recursive", "expand" , RECURSIVE_TEXT,
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",
IGNORE_TEXT, IGNORE_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
add_shortcut( "file", "directory", "dir" )
#else
......
......@@ -125,7 +125,7 @@ vlc_module_begin ()
change_integer_range (0, 32767)
add_string ("rtp-dynamic-pt", NULL, RTP_DYNAMIC_PT_TEXT,
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 ("dccp", "rtptcp", /* "tcp" is already taken :( */
......
......@@ -276,7 +276,7 @@ vlc_module_begin ()
change_safe()
add_string( CFG_PREFIX "standard", "",
STANDARD_TEXT, STANDARD_LONGTEXT, false )
change_string_list( standards_vlc, standards_user, NULL )
change_string_list( standards_vlc, standards_user )
change_safe()
add_string( CFG_PREFIX "chroma", NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
true )
......
......@@ -85,7 +85,7 @@ vlc_module_begin ()
add_string( "equalizer-preset", "flat", PRESET_TEXT,
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,
BANDS_LONGTEXT, true )
add_bool( "equalizer-2pass", false, TWOPASS_TEXT,
......
......@@ -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_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_LONGTEXT N_("Channels available for audio output." \
......@@ -87,7 +81,7 @@ vlc_module_begin ()
set_subcategory( SUBCAT_AUDIO_AOUT )
add_string ("alsa-audio-device", "default",
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") )
add_integer ("alsa-audio-channels", AOUT_CHANS_FRONT,
AUDIO_CHAN_TEXT, AUDIO_CHAN_LONGTEXT, false)
......
......@@ -119,8 +119,6 @@ static int ReloadDirectXDevices( vlc_object_t *, char const *,
/* Speaker setup override options list */
static const char *const speaker_list[] = { "Windows default", "Mono", "Stereo",
"Quad", "5.1", "7.1" };
static const char *const ppsz_adev[] = {"default", };
static const char *const ppsz_adev_text[] = {"default", };
/*****************************************************************************
* Module descriptor
......@@ -145,14 +143,14 @@ vlc_module_begin ()
add_string( "directx-audio-device", "default",
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") )
add_obsolete_string( "directx-audio-device-name")
add_bool( "directx-audio-float32", false, FLOAT_TEXT,
FLOAT_LONGTEXT, true )
add_string( "directx-audio-speaker", "Windows default",
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,
VOLUME_TEXT, VOLUME_LONGTEXT, true )
change_integer_range( DSBVOLUME_MIN, DSBVOLUME_MAX )
......
......@@ -113,7 +113,7 @@ vlc_module_begin ()
FILE_LONGTEXT, false )
add_string( "audiofile-format", "s16",
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,
CHANNELS_TEXT, CHANNELS_LONGTEXT, true )
change_integer_range( 0, 6 )
......
......@@ -89,8 +89,7 @@ vlc_module_begin ()
set_subcategory( SUBCAT_AUDIO_AOUT )
add_string( "kai-audio-device", ppsz_kai_audio_device[0],
KAI_AUDIO_DEVICE_TEXT, KAI_AUDIO_DEVICE_LONGTEXT, false )
change_string_list( ppsz_kai_audio_device, ppsz_kai_audio_device_text,
0 )
change_string_list( ppsz_kai_audio_device, ppsz_kai_audio_device_text )
add_sw_gain( )
add_bool( "kai-audio-exclusive-mode", false,
KAI_AUDIO_EXCLUSIVE_MODE_TEXT, KAI_AUDIO_EXCLUSIVE_MODE_LONGTEXT,
......
......@@ -79,9 +79,6 @@ static uint32_t findDeviceID(char *);
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
*****************************************************************************
......@@ -147,7 +144,7 @@ vlc_module_begin ()
add_string( "waveout-audio-device", "wavemapper",
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") )
add_sw_gain( )
......
......@@ -209,7 +209,7 @@ vlc_module_begin ()
add_string( ENC_CFG_PREFIX "codec", NULL, CODEC_TEXT, CODEC_LONGTEXT, true )
add_string( ENC_CFG_PREFIX "hq", "simple", ENC_HQ_TEXT,
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,
ENC_KEYINT_LONGTEXT, false )
add_integer( ENC_CFG_PREFIX "bframes", 0, ENC_BFRAMES_TEXT,
......
......@@ -221,7 +221,7 @@ vlc_module_begin()
add_string( ENC_CFG_PREFIX ENC_PREFILTER, "diaglp",
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,
ENC_PREFILTER_STRENGTH_TEXT, ENC_PREFILTER_STRENGTH_LONGTEXT, false )
......@@ -229,7 +229,7 @@ vlc_module_begin()
add_string( ENC_CFG_PREFIX ENC_CHROMAFMT, "420",
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,
ENC_L1SEP_TEXT, ENC_L1SEP_LONGTEXT, false )
......@@ -241,11 +241,11 @@ vlc_module_begin()
add_string( ENC_CFG_PREFIX ENC_CODINGMODE, "auto",
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",
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,
ENC_MCBLK_WIDTH_TEXT, ENC_MCBLK_WIDTH_LONGTEXT, false )
......
......@@ -375,7 +375,7 @@ vlc_module_begin ()
add_string( ENC_CFG_PREFIX ENC_RATE_CONTROL, NULL,
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.,
ENC_QUALITY_TEXT, ENC_QUALITY_LONGTEXT, false )
......@@ -399,7 +399,7 @@ vlc_module_begin ()
add_string( ENC_CFG_PREFIX ENC_GOP_STRUCTURE, NULL,
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,
ENC_AU_DISTANCE_TEXT, ENC_AU_DISTANCE_LONGTEXT, false )
......@@ -407,26 +407,26 @@ vlc_module_begin ()
add_string( ENC_CFG_PREFIX ENC_CHROMAFMT, "420",
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",
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,
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 */
add_string( ENC_CFG_PREFIX ENC_MCBLK_SIZE, NULL,
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 */
add_string( ENC_CFG_PREFIX ENC_MCBLK_OVERLAP, NULL,
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 */
add_integer( ENC_CFG_PREFIX ENC_ME_COMBINED, -1,
......@@ -455,11 +455,11 @@ vlc_module_begin ()
add_string( ENC_CFG_PREFIX ENC_DWTINTRA, NULL,
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,
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,
ENC_DWTDEPTH_TEXT, ENC_DWTDEPTH_LONGTEXT, false )
......@@ -473,11 +473,11 @@ vlc_module_begin ()
/* advanced option only */
add_string( ENC_CFG_PREFIX ENC_SCBLK_SIZE, NULL,
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,
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.,
ENC_PREFILTER_STRENGTH_TEXT, ENC_PREFILTER_STRENGTH_LONGTEXT, false )
......@@ -491,7 +491,7 @@ vlc_module_begin ()
/* advanced option only */
add_string( ENC_CFG_PREFIX ENC_PWT, NULL,
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 */
add_float( ENC_CFG_PREFIX ENC_PDIST, -1,
......@@ -516,7 +516,7 @@ vlc_module_begin ()
/* advanced option only */
add_string( ENC_CFG_PREFIX ENC_FORCE_PROFILE, NULL,
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 ()
......
......@@ -188,7 +188,7 @@ vlc_module_begin ()
change_integer_list( pi_justification, ppsz_justification_text )
add_string( "subsdec-encoding", "",
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,
AUTODETECT_UTF8_TEXT, AUTODETECT_UTF8_LONGTEXT, false )
add_bool( "subsdec-formatted", true, FORMAT_TEXT, FORMAT_LONGTEXT,
......
......@@ -459,7 +459,7 @@ vlc_module_begin ()
#if X264_BUILD >= 102 && X264_BUILD <= 114
add_string( SOUT_CFG_PREFIX "opengop", "none", OPENGOP_TEXT,
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
add_bool( SOUT_CFG_PREFIX "opengop", false, OPENGOP_TEXT,
OPENGOP_LONGTEXT, true )
......@@ -492,7 +492,7 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "bpyramid", "none", BPYRAMID_TEXT,
BPYRAMID_LONGTEXT, true )
#endif
change_string_list( bpyramid_list, bpyramid_list, 0 );
change_string_list( bpyramid_list, bpyramid_list )
add_bool( SOUT_CFG_PREFIX "cabac", true, CABAC_TEXT, CABAC_LONGTEXT,
true )
......@@ -517,7 +517,7 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "profile", "high", PROFILE_TEXT,
PROFILE_LONGTEXT, false )
change_string_list( x264_profile_names, x264_profile_names, 0 );
change_string_list( x264_profile_names, x264_profile_names )
add_bool( SOUT_CFG_PREFIX "interlaced", false, INTERLACED_TEXT, INTERLACED_LONGTEXT,
true )
......@@ -534,7 +534,7 @@ vlc_module_begin ()
#if X264_BUILD >= 89
add_string( SOUT_CFG_PREFIX "hrd", "none", HRD_TEXT, HRD_TEXT, true )
change_string_list( x264_nal_hrd_names, x264_nal_hrd_names, 0 );
change_string_list( x264_nal_hrd_names, x264_nal_hrd_names )
#endif
......@@ -610,11 +610,11 @@ vlc_module_begin ()
/* x264 partitions = none (default). set at least "normal" mode. */
add_string( SOUT_CFG_PREFIX "partitions", "normal", ANALYSE_TEXT,
ANALYSE_LONGTEXT, true )
change_string_list( enc_analyse_list, enc_analyse_list_text, 0 );
change_string_list( enc_analyse_list, enc_analyse_list_text )
add_string( SOUT_CFG_PREFIX "direct", "spatial", DIRECT_PRED_TEXT,
DIRECT_PRED_LONGTEXT, true )
change_string_list( direct_pred_list, direct_pred_list_text, 0 );
change_string_list( direct_pred_list, direct_pred_list_text )
add_integer( SOUT_CFG_PREFIX "direct-8x8", 1, DIRECT_PRED_SIZE_TEXT,
DIRECT_PRED_SIZE_LONGTEXT, true )
......@@ -629,7 +629,7 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "me", "hex", ME_TEXT,
ME_LONGTEXT, true )
change_string_list( enc_me_list, enc_me_list_text, 0 );
change_string_list( enc_me_list, enc_me_list_text )
add_integer( SOUT_CFG_PREFIX "merange", 16, MERANGE_TEXT,
MERANGE_LONGTEXT, true )
......@@ -720,9 +720,9 @@ vlc_module_begin ()
STATS_LONGTEXT, true )
add_string( SOUT_CFG_PREFIX "preset", NULL , PRESET_TEXT , PRESET_TEXT, false )
change_string_list( x264_preset_names, x264_preset_names, 0 );
change_string_list( x264_preset_names, x264_preset_names )
add_string( SOUT_CFG_PREFIX "tune", NULL , TUNE_TEXT, TUNE_TEXT, false )
change_string_list( x264_tune_names, x264_tune_names, 0 );
change_string_list( x264_tune_names, x264_tune_names )
add_string( SOUT_CFG_PREFIX "options", NULL, X264_OPTIONS_TEXT,
X264_OPTIONS_LONGTEXT, true )
......
......@@ -95,7 +95,7 @@ vlc_module_begin ()
THRESHOLD_TEXT, THRESHOLD_LONGTEXT, true )
add_string( "gestures-button", BUTTON_DEFAULT,
BUTTON_TEXT, BUTTON_LONGTEXT, false )
change_string_list( button_list, button_list_text, 0 )
change_string_list( button_list, button_list_text )
set_description( N_("Mouse gestures control interface") )
set_capability( "interface", 0 )
......
......@@ -79,7 +79,7 @@ vlc_module_begin ()
SUB_DELAY_LONGTEXT, true )
add_string( "sub-type", "auto", N_("Subtitles format"),
SUB_TYPE_LONGTEXT, true )
change_string_list( ppsz_sub_type, ppsz_sub_type, NULL )
change_string_list( ppsz_sub_type, ppsz_sub_type )
add_string( "sub-description", NULL, N_("Subtitles description"),
SUB_DESCRIPTION_LONGTEXT, true )
set_callbacks( Open, Close )
......
......@@ -100,7 +100,7 @@ vlc_module_begin ()
add_string ("gnutls-priorities", "NORMAL", PRIORITIES_TEXT,
PRIORITIES_LONGTEXT, false)
change_string_list (priorities_values, priorities_text, NULL)
change_string_list (priorities_values, priorities_text)
vlc_module_end ()
static vlc_mutex_t gnutls_mutex = VLC_STATIC_MUTEX;
......
......@@ -162,11 +162,11 @@ vlc_module_begin ()
N_("Log filename"), N_("Specify the log filename."), false )
add_string( "logmode", "text", LOGMODE_TEXT, LOGMODE_LONGTEXT,
false )
change_string_list( mode_list, mode_list_text, 0 )
change_string_list( mode_list, mode_list_text )
#ifdef HAVE_SYSLOG_H
add_string( "syslog-facility", fac_name[0], SYSLOG_FACILITY_TEXT,
SYSLOG_FACILITY_LONGTEXT, true )
change_string_list( fac_name, fac_name, 0 )
change_string_list( fac_name, fac_name )
#endif
add_integer( "log-verbose", -1, LOGVERBOSE_TEXT, LOGVERBOSE_LONGTEXT,
false )
......
......@@ -218,7 +218,7 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "proto", "udp", PROTO_TEXT,
PROTO_LONGTEXT, false )
change_string_list( ppsz_protos, ppsz_protocols, NULL )
change_string_list( ppsz_protos, ppsz_protocols )
add_integer( SOUT_CFG_PREFIX "port", 5004, PORT_TEXT,
PORT_LONGTEXT, true )
add_integer( SOUT_CFG_PREFIX "port-audio", 0, PORT_AUDIO_TEXT,
......
......@@ -176,7 +176,7 @@ vlc_module_begin ()
add_string( SOUT_CFG_PREFIX "deinterlace-module", "deinterlace",
DEINTERLACE_MODULE_TEXT, DEINTERLACE_MODULE_LONGTEXT,
false )
change_string_list( ppsz_deinterlace_type, ppsz_deinterlace_type, NULL )
change_string_list( ppsz_deinterlace_type, ppsz_deinterlace_type )
add_integer( SOUT_CFG_PREFIX "width", 0, WIDTH_TEXT,
WIDTH_LONGTEXT, true )
add_integer( SOUT_CFG_PREFIX "height", 0, HEIGHT_TEXT,
......
......@@ -75,7 +75,7 @@ vlc_module_begin()
set_subcategory(SUBCAT_VIDEO_VFILTER)
set_capability("video filter2", 0)
add_string(FILTER_PREFIX "scheme", "red-cyan", SCHEME_TEXT, SCHEME_LONGTEXT, false)
change_string_list(ppsz_scheme_values, ppsz_scheme_descriptions, 0)
change_string_list(ppsz_scheme_values, ppsz_scheme_descriptions)
set_callbacks(Create, Destroy)
vlc_module_end()
......
......@@ -129,7 +129,7 @@ vlc_module_begin ()
add_string( FILTER_PREFIX "color", "red",
BALL_COLOR_TEXT, BALL_COLOR_TEXT, false )
change_string_list( mode_list, mode_list_text, 0 )
change_string_list( mode_list, mode_list_text )
add_integer_with_range( FILTER_PREFIX "speed", 4, 1, 15,
BALL_SPEED_TEXT, BALL_SPEED_LONGTEXT, false )
......
......@@ -102,7 +102,7 @@ vlc_module_begin ()
add_string( FILTER_CFG_PREFIX "mode", "blend", SOUT_MODE_TEXT,
SOUT_MODE_LONGTEXT, false )
change_string_list( mode_list, mode_list_text, 0 )
change_string_list( mode_list, mode_list_text )
change_safe ()
add_integer( FILTER_CFG_PREFIX "phosphor-chroma", 2, PHOSPHOR_CHROMA_TEXT,
PHOSPHOR_CHROMA_LONGTEXT, true )
......
......@@ -87,7 +87,7 @@ vlc_module_begin ()
add_string( FILTER_PREFIX "mode", "gradient",
MODE_TEXT, MODE_LONGTEXT, false )
change_string_list( mode_list, mode_list_text, 0 )
change_string_list( mode_list, mode_list_text )
add_integer_with_range( FILTER_PREFIX "type", 0, 0, 1,
GRADIENT_TEXT, GRADIENT_LONGTEXT, false )
......
......@@ -84,11 +84,11 @@ vlc_module_begin ()
add_string( "opencv-chroma", "input",
N_("OpenCV filter chroma"),
N_("Chroma to convert picture to before sending it to the internal OpenCV filter"), false);
change_string_list( chroma_list, chroma_list_text, 0);
change_string_list( chroma_list, chroma_list_text )
add_string( "opencv-output", "input",
N_("Wrapper filter output"),
N_("Determines what (if any) video is displayed by the wrapper filter"), false);
change_string_list( output_list, output_list_text, 0);
change_string_list( output_list, output_list_text )
add_string( "opencv-filter-name", "none",
N_("OpenCV internal filter name"),
N_("Name of internal OpenCV plugin filter to use"), false);
......
......@@ -61,7 +61,7 @@ vlc_module_begin()
set_subcategory(SUBCAT_VIDEO_VFILTER)
add_string(CFG_PREFIX "type", "90", TYPE_TEXT, TYPE_TEXT, false)
change_string_list(type_list, type_list_text, 0)
change_string_list(type_list, type_list_text)
change_safe()
add_shortcut("transform")
......
......@@ -67,8 +67,8 @@ vlc_module_begin ()
set_subcategory( SUBCAT_VIDEO_VOUT )
add_string( "kva-video-mode", ppsz_kva_video_mode[0], KVA_VIDEO_MODE_TEXT,
KVA_VIDEO_MODE_LONGTEXT, false )
change_string_list( ppsz_kva_video_mode, ppsz_kva_video_mode_text, 0 )
add_bool( "kva-fixt23", false, KVA_FIXT23_TEXT, KVA_FIXT23_LONGTEXT, true );
change_string_list( ppsz_kva_video_mode, ppsz_kva_video_mode_text )
add_bool( "kva-fixt23", false, KVA_FIXT23_TEXT, KVA_FIXT23_LONGTEXT, true )
set_description( N_("K Video Acceleration video output") )
set_capability( "vout display", 100 )
add_shortcut( "kva" )
......
......@@ -84,9 +84,6 @@
#define DX_HELP N_("Recommended video output for Windows XP. " \
"Incompatible with Vista's Aero interface" )
static const char * const device[] = { "" };
static const char * const device_text[] = { N_("Default") };
static int Open (vlc_object_t *);
static void Close(vlc_object_t *);
......@@ -105,7 +102,7 @@ vlc_module_begin()
add_bool("directx-3buffering", true, TRIPLEBUF_TEXT,
TRIPLEBUF_LONGTEXT, true)
add_string("directx-device", "", DEVICE_TEXT, DEVICE_LONGTEXT, true)
change_string_list(device, device_text, FindDevicesCallback)
change_string_cb(FindDevicesCallback)
change_action_add(FindDevicesCallback, N_("Refresh list"))
set_capability("vout display", 230)
......
......@@ -1501,7 +1501,7 @@ vlc_module_begin ()
/* FIXME TODO create a subcat replay gain ? */
add_string( "audio-replay-gain-mode", ppsz_replay_gain_mode[0], AUDIO_REPLAY_GAIN_MODE_TEXT,
AUDIO_REPLAY_GAIN_MODE_LONGTEXT, false )
change_string_list( ppsz_replay_gain_mode, ppsz_replay_gain_mode_text, 0 )
change_string_list( ppsz_replay_gain_mode, ppsz_replay_gain_mode_text )
add_float( "audio-replay-gain-preamp", 0.0,
AUDIO_REPLAY_GAIN_PREAMP_TEXT, AUDIO_REPLAY_GAIN_PREAMP_LONGTEXT, false )
add_float( "audio-replay-gain-default", -7.0,
......@@ -1589,7 +1589,7 @@ vlc_module_begin ()
SNAP_PREFIX_LONGTEXT, false )
add_string( "snapshot-format", "png", SNAP_FORMAT_TEXT,
SNAP_FORMAT_LONGTEXT, false )
change_string_list( ppsz_snap_formats, ppsz_snap_formats, NULL )
change_string_list( ppsz_snap_formats, ppsz_snap_formats )
add_bool( "snapshot-preview", true, SNAP_PREVIEW_TEXT,
SNAP_PREVIEW_LONGTEXT, false )
add_bool( "snapshot-sequential", false, SNAP_SEQUENTIAL_TEXT,
......@@ -1637,7 +1637,7 @@ vlc_module_begin ()
change_safe()
add_string( "deinterlace-mode", "blend",
DEINTERLACE_MODE_TEXT, DEINTERLACE_MODE_LONGTEXT, false )
change_string_list( ppsz_deinterlace_mode, ppsz_deinterlace_mode_text, 0 )
change_string_list( ppsz_deinterlace_mode, ppsz_deinterlace_mode_text )
change_safe()
set_subcategory( SUBCAT_VIDEO_VOUT )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment