Commit e5622718 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

Remove unused change_integer_list parameter

Changing the choice list of a configuration item is not thread-safe.
Plus it does not make much sense to use a strict choice list if the
choices change dynamically.

If ever needed, we can invent a suggestions list system later, just
like we already do for SD plugins enumeration.
parent 3c659c53
......@@ -406,12 +406,12 @@ enum vlc_module_properties
(const char *const *)(list_text), \
(vlc_callback_t)(list_update_func));
#define change_integer_list( list, list_text, list_update_func ) \
#define change_integer_list( list, list_text ) \
vlc_config_set (p_config, VLC_CONFIG_LIST, \
(size_t)(sizeof (list) / sizeof (int)), \
(const int *)(list), \
(const char *const *)(list_text), \
(vlc_callback_t)(list_update_func));
(vlc_callback_t)(NULL));
#define change_integer_range( minv, maxv ) \
vlc_config_set (p_config, VLC_CONFIG_RANGE, \
......
......@@ -221,7 +221,7 @@ vlc_module_begin ()
/* DVB-S (satellite) */
add_integer( "dvb-inversion", 2, NULL, INVERSION_TEXT,
INVERSION_LONGTEXT, true )
change_integer_list( i_inversion_list, ppsz_inversion_text, NULL )
change_integer_list( i_inversion_list, ppsz_inversion_text )
# if defined(WIN32) || defined(WINCE)
add_string( "dvb-polarisation", NULL, NULL, POLARISATION_TEXT,
POLARISATION_LONGTEXT, false )
......@@ -262,7 +262,7 @@ vlc_module_begin ()
/* DVB-C (cable) */
add_integer( "dvb-modulation", -1, NULL, MODULATION_TEXT,
MODULATION_LONGTEXT, true )
change_integer_list( i_mod_list, ppsz_mod_text, NULL )
change_integer_list( i_mod_list, ppsz_mod_text )
/* ATSC */
add_integer( "dvb-major-channel", 0, NULL, MAJOR_CHANNEL_TEXT,
......@@ -275,22 +275,22 @@ vlc_module_begin ()
/* DVB-T (terrestrial) */
add_integer( "dvb-code-rate-hp", -1, NULL, CODE_RATE_HP_TEXT,
CODE_RATE_HP_LONGTEXT, true )
change_integer_list( i_hp_fec_list, ppsz_hp_fec_text, NULL )
change_integer_list( i_hp_fec_list, ppsz_hp_fec_text )
add_integer( "dvb-code-rate-lp", -1, NULL, CODE_RATE_LP_TEXT,
CODE_RATE_LP_LONGTEXT, true )
change_integer_list( i_lp_fec_list, ppsz_lp_fec_text, NULL )
change_integer_list( i_lp_fec_list, ppsz_lp_fec_text )
add_integer( "dvb-bandwidth", 0, NULL, BANDWIDTH_TEXT, BANDWIDTH_LONGTEXT,
false )
change_integer_list( i_band_list, ppsz_band_text, NULL )
change_integer_list( i_band_list, ppsz_band_text )
change_safe()
add_integer( "dvb-guard", -1, NULL, GUARD_TEXT, GUARD_LONGTEXT, true )
change_integer_list( i_guard_list, ppsz_guard_text, NULL )
change_integer_list( i_guard_list, ppsz_guard_text )
add_integer( "dvb-transmission", -1, NULL, TRANSMISSION_TEXT,
TRANSMISSION_LONGTEXT, true )
change_integer_list( i_transmission_list, ppsz_transmission_text, NULL )
change_integer_list( i_transmission_list, ppsz_transmission_text )
add_integer( "dvb-hierarchy", -1, NULL, HIERARCHY_TEXT, HIERARCHY_LONGTEXT,
true )
change_integer_list( i_hierarchy_list, ppsz_hierarchy_text, NULL )
change_integer_list( i_hierarchy_list, ppsz_hierarchy_text )
set_capability( "access", 0 )
add_shortcut( "dvb", /* Generic name */
......
......@@ -259,11 +259,11 @@ vlc_module_begin ()
add_integer( CFG_PREFIX "tuner-standard", 0, NULL, STANDARD_TEXT, STANDARD_LONGTEXT,
false )
change_integer_list( i_standards_list, ppsz_standards_list_text, NULL )
change_integer_list( i_standards_list, ppsz_standards_list_text )
add_integer( CFG_PREFIX "tuner-input", 0, NULL, TUNER_INPUT_TEXT,
TUNER_INPUT_LONGTEXT, true )
change_integer_list( pi_tuner_input, ppsz_tuner_input_text, NULL )
change_integer_list( pi_tuner_input, ppsz_tuner_input_text )
add_integer( CFG_PREFIX "video-input", -1, NULL, VIDEO_IN_TEXT,
VIDEO_IN_LONGTEXT, true )
......@@ -279,7 +279,7 @@ vlc_module_begin ()
add_integer( CFG_PREFIX "amtuner-mode", AMTUNER_MODE_TV, NULL,
AMTUNER_MODE_TEXT, AMTUNER_MODE_LONGTEXT, false)
change_integer_list( pi_amtuner_mode, ppsz_amtuner_mode_text, NULL )
change_integer_list( pi_amtuner_mode, ppsz_amtuner_mode_text )
add_integer( CFG_PREFIX "audio-channels", 0, NULL, AUDIO_CHANNELS_TEXT,
AUDIO_CHANNELS_LONGTEXT, true )
......
......@@ -144,7 +144,7 @@ vlc_module_begin()
change_private()
change_safe()
add_integer("imem-cat", 0, NULL, CAT_TEXT, CAT_LONGTEXT, true)
change_integer_list(cat_values, cat_texts, NULL)
change_integer_list(cat_values, cat_texts)
change_private()
change_safe()
add_string ("imem-codec", NULL, NULL, CODEC_TEXT, CODEC_LONGTEXT, true)
......
......@@ -140,7 +140,7 @@ vlc_module_begin ()
RADIO_DEVICE_LONGTEXT, false )
add_integer( "pvr-norm", V4L2_STD_UNKNOWN , NULL, NORM_TEXT,
NORM_LONGTEXT, false )
change_integer_list( i_norm_list, psz_norm_list_text, NULL )
change_integer_list( i_norm_list, psz_norm_list_text )
add_integer( "pvr-width", -1, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, true )
add_integer( "pvr-height", -1, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT,
true )
......@@ -158,7 +158,7 @@ vlc_module_begin ()
BITRATE_PEAK_LONGTEXT, true )
add_integer( "pvr-bitrate-mode", -1, NULL, BITRATE_MODE_TEXT,
BITRATE_MODE_LONGTEXT, true )
change_integer_list( i_bitrates, psz_bitrates_list_text, NULL )
change_integer_list( i_bitrates, psz_bitrates_list_text )
add_integer( "pvr-audio-bitmask", -1, NULL, BITMASK_TEXT,
BITMASK_LONGTEXT, true )
add_integer( "pvr-audio-volume", -1, NULL, VOLUME_TEXT,
......
......@@ -283,7 +283,7 @@ vlc_module_begin ()
set_section( N_( "Video input" ), NULL )
add_integer( CFG_PREFIX "standard", 0, NULL, STANDARD_TEXT,
STANDARD_LONGTEXT, false )
change_integer_list( i_standards_list, psz_standards_list_text, NULL )
change_integer_list( i_standards_list, psz_standards_list_text )
add_string( CFG_PREFIX "chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT,
true )
add_integer( CFG_PREFIX "input", 0, NULL, INPUT_TEXT, INPUT_LONGTEXT,
......@@ -292,7 +292,7 @@ vlc_module_begin ()
AUDIO_INPUT_LONGTEXT, true )
add_integer( CFG_PREFIX "io", IO_METHOD_AUTO, NULL, IOMETHOD_TEXT,
IOMETHOD_LONGTEXT, true )
change_integer_list( i_iomethod_list, psz_iomethod_list_text, NULL )
change_integer_list( i_iomethod_list, psz_iomethod_list_text )
add_integer( CFG_PREFIX "width", DEFAULT_WIDTH, NULL, WIDTH_TEXT,
WIDTH_LONGTEXT, true )
add_integer( CFG_PREFIX "height", DEFAULT_HEIGHT, NULL, HEIGHT_TEXT,
......@@ -314,7 +314,7 @@ vlc_module_begin ()
add_integer( CFG_PREFIX "tuner-audio-mode", -1, NULL, TUNER_AUDIO_MODE_TEXT,
TUNER_AUDIO_MODE_LONGTEXT, true )
change_integer_list( i_tuner_audio_modes_list,
psz_tuner_audio_modes_list_text, 0 )
psz_tuner_audio_modes_list_text )
set_section( N_( "Controls" ),
N_( "v4l2 driver controls, if supported by your v4l2 driver." ) )
......
......@@ -116,7 +116,7 @@ vlc_module_begin ()
MONO_DOWNMIX_LONGTEXT, false )
add_integer( MONO_CFG "channel", -1, NULL, MONO_CHANNEL_TEXT,
MONO_CHANNEL_LONGTEXT, false )
change_integer_list( pi_pos_values, ppsz_pos_descriptions, NULL )
change_integer_list( pi_pos_values, ppsz_pos_descriptions )
vlc_module_end ()
......
......@@ -132,7 +132,7 @@ vlc_module_begin ()
add_integer ( "ffmpeg-skiploopfilter", 0, NULL, SKIPLOOPF_TEXT,
SKIPLOOPF_LONGTEXT, true )
change_safe ()
change_integer_list( nloopf_list, nloopf_list_text, NULL )
change_integer_list( nloopf_list, nloopf_list_text )
add_integer( "ffmpeg-debug", 0, NULL, DEBUG_TEXT, DEBUG_LONGTEXT,
true )
......
......@@ -123,7 +123,7 @@ vlc_module_begin ()
set_callbacks( Open, Close )
add_integer( DVBSUB_CFG_PREFIX "position", 8, NULL, POS_TEXT, POS_LONGTEXT, true )
change_integer_list( pi_pos_values, ppsz_pos_descriptions, NULL )
change_integer_list( pi_pos_values, ppsz_pos_descriptions )
add_integer( DVBSUB_CFG_PREFIX "x", -1, NULL, POSX_TEXT, POSX_LONGTEXT, false )
add_integer( DVBSUB_CFG_PREFIX "y", -1, NULL, POSY_TEXT, POSY_LONGTEXT, false )
......
......@@ -297,7 +297,7 @@ vlc_module_begin ()
0, sizeof(pi_font_effects)/sizeof(pi_font_effects[0])-1, TigerConfigurationCallback,
TIGER_DEFAULT_FONT_EFFECT_TEXT, TIGER_DEFAULT_FONT_EFFECT_LONGTEXT,
true )
change_integer_list( pi_font_effects, ppsz_font_effect_names, NULL );
change_integer_list( pi_font_effects, ppsz_font_effect_names );
add_float_with_range( "kate-tiger-default-font-effect-strength",
TIGER_DEFAULT_FONT_EFFECT_STRENGTH_DEFAULT, 0.0f, 1.0f, TigerConfigurationCallback,
TIGER_DEFAULT_FONT_EFFECT_STRENGTH_TEXT, TIGER_DEFAULT_FONT_EFFECT_STRENGTH_LONGTEXT,
......@@ -306,7 +306,7 @@ vlc_module_begin ()
TIGER_DEFAULT_FONT_COLOR_DEFAULT, 0, 0x00ffffff, TigerConfigurationCallback,
TIGER_DEFAULT_FONT_COLOR_TEXT, TIGER_DEFAULT_FONT_COLOR_LONGTEXT,
true);
change_integer_list( pi_color_values, ppsz_color_descriptions, NULL );
change_integer_list( pi_color_values, ppsz_color_descriptions );
add_integer_with_range( "kate-tiger-default-font-alpha",
TIGER_DEFAULT_FONT_ALPHA_DEFAULT, 0, 255, TigerConfigurationCallback,
TIGER_DEFAULT_FONT_ALPHA_TEXT, TIGER_DEFAULT_FONT_ALPHA_LONGTEXT,
......@@ -315,7 +315,7 @@ vlc_module_begin ()
TIGER_DEFAULT_BACKGROUND_COLOR_DEFAULT, 0, 0x00ffffff, TigerConfigurationCallback,
TIGER_DEFAULT_BACKGROUND_COLOR_TEXT, TIGER_DEFAULT_BACKGROUND_COLOR_LONGTEXT,
true);
change_integer_list( pi_color_values, ppsz_color_descriptions, NULL );
change_integer_list( pi_color_values, ppsz_color_descriptions );
add_integer_with_range( "kate-tiger-default-background-alpha",
TIGER_DEFAULT_BACKGROUND_ALPHA_DEFAULT, 0, 255, TigerConfigurationCallback,
TIGER_DEFAULT_BACKGROUND_ALPHA_TEXT, TIGER_DEFAULT_BACKGROUND_ALPHA_LONGTEXT,
......
......@@ -110,7 +110,7 @@ vlc_module_begin ()
add_integer( ENC_CFG_PREFIX "mode", 0, NULL, ENC_MODE_TEXT,
ENC_MODE_LONGTEXT, false )
change_integer_list( pi_enc_mode_values, ppsz_enc_mode_descriptions, NULL )
change_integer_list( pi_enc_mode_values, ppsz_enc_mode_descriptions )
add_integer( ENC_CFG_PREFIX "complexity", 3, NULL, ENC_COMPLEXITY_TEXT,
ENC_COMPLEXITY_LONGTEXT, false )
......
......@@ -214,7 +214,7 @@ vlc_module_begin ()
add_integer( "subsdec-align", 0, NULL, ALIGN_TEXT, ALIGN_LONGTEXT,
false )
change_integer_list( pi_justification, ppsz_justification_text, NULL )
change_integer_list( pi_justification, ppsz_justification_text )
add_string( "subsdec-encoding", "", NULL,
ENCODING_TEXT, ENCODING_LONGTEXT, false )
change_string_list( ppsz_encodings, ppsz_encoding_names, 0 )
......
......@@ -83,7 +83,7 @@ vlc_module_begin ()
ENC_QUALITY_LONGTEXT, false )
add_integer( ENC_CFG_PREFIX "mode", 0, NULL, ENC_MODE_TEXT,
ENC_MODE_LONGTEXT, false )
change_integer_list( pi_stereo_values, ppsz_stereo_descriptions, NULL );
change_integer_list( pi_stereo_values, ppsz_stereo_descriptions );
add_bool( ENC_CFG_PREFIX "vbr", false, NULL, ENC_VBR_TEXT,
ENC_VBR_LONGTEXT, false )
add_integer( ENC_CFG_PREFIX "psy", 3, NULL, ENC_PSY_TEXT,
......
......@@ -91,7 +91,7 @@ vlc_module_begin ()
add_bool( "vbi-opaque", true, NULL,
OPAQUE_TEXT, OPAQUE_LONGTEXT, false )
add_integer( "vbi-position", 4, NULL, POS_TEXT, POS_LONGTEXT, false )
change_integer_list( pi_pos_values, ppsz_pos_descriptions, NULL );
change_integer_list( pi_pos_values, ppsz_pos_descriptions );
add_bool( "vbi-text", false, NULL,
TELX_TEXT, TELX_LONGTEXT, false )
vlc_module_end ()
......
......@@ -108,7 +108,7 @@ vlc_module_begin ()
N_("MouseWheel x-axis Control"),
N_("MouseWheel x-axis can control volume, position or "
"mousewheel event can be ignored"), false )
change_integer_list( i_mode_list, psz_mode_list_text, NULL )
change_integer_list( i_mode_list, psz_mode_list_text )
vlc_module_end ()
......
......@@ -75,7 +75,7 @@ vlc_module_begin ()
INTERLEAVE_TEXT, INTERLEAVE_LONGTEXT, true )
add_integer( "avi-index", 0, NULL,
INDEX_TEXT, INDEX_LONGTEXT, false )
change_integer_list( pi_index, ppsz_indexes, NULL )
change_integer_list( pi_index, ppsz_indexes )
set_callbacks( Open, Close )
vlc_module_end ()
......
......@@ -199,14 +199,14 @@ vlc_module_begin ()
add_integer( "fbosd-y", 0, NULL, POSY_TEXT,
POSY_LONGTEXT, false )
add_integer( "fbosd-position", 8, NULL, POS_TEXT, POS_LONGTEXT, true )
change_integer_list( pi_pos_values, ppsz_pos_descriptions, NULL );
change_integer_list( pi_pos_values, ppsz_pos_descriptions );
set_section( N_("Font"), NULL )
add_integer_with_range( "fbosd-font-opacity", 255, 0, 255, NULL,
OPACITY_TEXT, OPACITY_LONGTEXT, false )
add_integer( "fbosd-font-color", 0x00FFFFFF, NULL, COLOR_TEXT, COLOR_LONGTEXT,
false )
change_integer_list( pi_color_values, ppsz_color_descriptions, NULL );
change_integer_list( pi_color_values, ppsz_color_descriptions );
add_integer( "fbosd-font-size", -1, NULL, SIZE_TEXT, SIZE_LONGTEXT,
false )
......
......@@ -161,14 +161,14 @@ vlc_module_begin ()
/* hook to the color values list, with default 0x00ffffff = white */
add_integer( "freetype-color", 0x00FFFFFF, NULL, COLOR_TEXT,
COLOR_LONGTEXT, false )
change_integer_list( pi_color_values, ppsz_color_descriptions, NULL )
change_integer_list( pi_color_values, ppsz_color_descriptions )
add_integer( "freetype-rel-fontsize", 16, NULL, FONTSIZER_TEXT,
FONTSIZER_LONGTEXT, false )
change_integer_list( pi_sizes, ppsz_sizes_text, NULL )
change_integer_list( pi_sizes, ppsz_sizes_text )
add_integer( "freetype-effect", 2, NULL, EFFECT_TEXT,
EFFECT_LONGTEXT, false )
change_integer_list( pi_effects, ppsz_effects_text, NULL )
change_integer_list( pi_effects, ppsz_effects_text )
add_bool( "freetype-yuvp", false, NULL, YUVP_TEXT,
YUVP_LONGTEXT, true )
......
......@@ -113,10 +113,10 @@ vlc_module_begin ()
false )
add_integer( "quartztext-rel-fontsize", DEFAULT_REL_FONT_SIZE, NULL, FONTSIZER_TEXT,
FONTSIZER_LONGTEXT, false )
change_integer_list( pi_sizes, ppsz_sizes_text, NULL );
change_integer_list( pi_sizes, ppsz_sizes_text )
add_integer( "quartztext-color", 0x00FFFFFF, NULL, COLOR_TEXT,
COLOR_LONGTEXT, false )
change_integer_list( pi_color_values, ppsz_color_descriptions, NULL );
change_integer_list( pi_color_values, ppsz_color_descriptions )
set_capability( "text renderer", 150 )
add_shortcut( "text" )
set_callbacks( Create, Destroy )
......
......@@ -105,11 +105,11 @@ vlc_module_begin ()
/* hook to the color values list, with default 0x00ffffff = white */
add_integer( "win32text-color", 0x00FFFFFF, NULL, COLOR_TEXT,
COLOR_LONGTEXT, true )
change_integer_list( pi_color_values, ppsz_color_descriptions, NULL );
change_integer_list( pi_color_values, ppsz_color_descriptions )
add_integer( "win32text-rel-fontsize", 16, NULL, FONTSIZER_TEXT,
FONTSIZER_LONGTEXT, false )
change_integer_list( pi_sizes, ppsz_sizes_text, NULL );
change_integer_list( pi_sizes, ppsz_sizes_text )
set_capability( "text renderer", 50 )
add_shortcut( "text" )
......
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