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

- Cleanup and fixes deprecated options:

 - Removed the gross SUPPRESSED hack
 - Remove support for strict deprecated aliases (that was not used anyway)
parent 37ce2848
......@@ -340,32 +340,32 @@ VLC_EXPORT(const char *, __config_GetDataDir, ( const vlc_object_t * ));
p_config[i_config].value.i = v
/* For renamed option */
#define add_deprecated( name, strict ) \
#define add_deprecated_alias( name ) \
add_config_inner( ); \
p_config[ i_config ].i_type = p_config[ i_config -1 ].i_type; \
p_config[ i_config ].psz_name = name; \
p_config[i_config].b_strict = strict; \
p_config[ i_config ].psz_current = p_config[ i_config-1].psz_current \
p_config[i_config].b_strict = VLC_FALSE; \
p_config[ i_config ].psz_current = p_config[ i_config-1 ].psz_current \
? p_config[ i_config-1 ].psz_current \
: p_config[ i_config-1 ].psz_name;
/* For removed option */
#define add_suppressed_inner( name, type ) \
#define add_obsolete_inner( name, type ) \
add_type_inner( type ); \
p_config[ i_config ].psz_name = name; \
p_config[ i_config ].psz_current = "SUPPRESSED";
#define add_suppressed_bool( name ) \
add_suppressed_inner( name, CONFIG_ITEM_BOOL )
#define add_obsolete_bool( name ) \
add_obsolete_inner( name, CONFIG_ITEM_BOOL )
#define add_suppressed_integer( name ) \
add_suppressed_inner( name, CONFIG_ITEM_INTEGER )
#define add_obsolete_integer( name ) \
add_obsolete_inner( name, CONFIG_ITEM_INTEGER )
#define add_suppressed_float( name ) \
add_suppressed_inner( name, CONFIG_ITEM_FLOAT )
#define add_obsolete_float( name ) \
add_obsolete_inner( name, CONFIG_ITEM_FLOAT )
#define add_suppressed_string( name ) \
add_suppressed_inner( name, CONFIG_ITEM_STRING )
#define add_obsolete_string( name ) \
add_obsolete_inner( name, CONFIG_ITEM_STRING )
/* Modifier macros for the config options (used for fine tuning) */
#define change_short( ch ) \
......@@ -428,7 +428,7 @@ struct config_chain_t
};
#define config_ChainParse( a, b, c, d ) __config_ChainParse( VLC_OBJECT(a), b, c, d )
VLC_EXPORT( void, __config_ChainParse, ( vlc_object_t *, const char *psz_prefix, const char **ppsz_options, config_chain_t * ) );
VLC_EXPORT( void, __config_ChainParse, ( vlc_object_t *, const char *psz_prefix, const char *const *ppsz_options, config_chain_t * ) );
VLC_EXPORT( char *, config_ChainCreate, ( char **, config_chain_t **, const char * ) );
VLC_EXPORT( void, config_ChainDestroy, ( config_chain_t * ) );
......
......@@ -46,7 +46,7 @@ typedef shl_t module_handle_t;
/**
* Module descriptor
*/
#ifndef __PLUGIN__FIXME
#ifndef __PLUGIN__
/* FIXME: scheduled for privatization */
struct module_t
{
......
......@@ -91,7 +91,7 @@ vlc_module_begin();
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_ACCESS );
add_integer( "file-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_deprecated( "file-cat", VLC_TRUE );
add_obsolete_string( "file-cat" );
set_capability( "access2", 50 );
add_shortcut( "file" );
add_shortcut( "stream" );
......
......@@ -91,8 +91,8 @@ vlc_module_begin();
RECONNECT_LONGTEXT, VLC_TRUE );
add_bool( "http-continuous", 0, NULL, CONTINUOUS_TEXT,
CONTINUOUS_LONGTEXT, VLC_TRUE );
add_suppressed_string("http-user");
add_suppressed_string("http-pwd");
add_obsolete_string("http-user");
add_obsolete_string("http-pwd");
add_shortcut( "http" );
add_shortcut( "https" );
add_shortcut( "unsv" );
......
......@@ -120,7 +120,7 @@ vlc_module_begin();
add_integer( SOUT_CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_integer( SOUT_CFG_PREFIX "group", 1, NULL, GROUP_TEXT, GROUP_LONGTEXT,
VLC_TRUE );
add_suppressed_integer( SOUT_CFG_PREFIX "late" );
add_obsolete_integer( SOUT_CFG_PREFIX "late" );
add_bool( SOUT_CFG_PREFIX "raw", VLC_FALSE, NULL, RAW_TEXT, RAW_LONGTEXT,
VLC_TRUE );
add_integer( SOUT_CFG_PREFIX "rtcp", 0, NULL, RTCP_TEXT, RTCP_LONGTEXT,
......@@ -140,7 +140,7 @@ vlc_module_end();
* Exported prototypes
*****************************************************************************/
static const char *ppsz_sout_options[] = {
static const char *const ppsz_sout_options[] = {
"auto-mcast",
"caching",
"group",
......@@ -152,7 +152,7 @@ static const char *ppsz_sout_options[] = {
};
/* Options handled by the libvlc network core */
static const char *ppsz_core_options[] = {
static const char *const ppsz_core_options[] = {
"dscp",
"ttl",
"miface",
......
......@@ -102,7 +102,7 @@ vlc_module_begin();
add_integer( ENC_CFG_PREFIX "x", -1, NULL, ENC_POSX_TEXT, ENC_POSX_LONGTEXT, VLC_FALSE );
add_integer( ENC_CFG_PREFIX "y", -1, NULL, ENC_POSY_TEXT, ENC_POSY_LONGTEXT, VLC_FALSE );
add_suppressed_integer( ENC_CFG_PREFIX "timeout" ); /* Suppressed since 0.8.5 */
add_obsolete_integer( ENC_CFG_PREFIX "timeout" ); /* Suppressed since 0.8.5 */
vlc_module_end();
static const char *ppsz_enc_options[] = { "x", "y", NULL };
......
......@@ -379,7 +379,7 @@ vlc_module_begin();
add_integer( SOUT_CFG_PREFIX "min-keyint", 25, NULL, MIN_KEYINT_TEXT,
MIN_KEYINT_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "keyint-min", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_deprecated_alias( SOUT_CFG_PREFIX "keyint-min" ); /* Deprecated since 0.8.5 */
add_integer( SOUT_CFG_PREFIX "scenecut", 40, NULL, SCENE_TEXT,
SCENE_LONGTEXT, VLC_FALSE );
......@@ -412,15 +412,15 @@ vlc_module_begin();
add_integer( SOUT_CFG_PREFIX "ref", 1, NULL, REF_TEXT,
REF_LONGTEXT, VLC_FALSE );
change_integer_range( 1, 16 );
add_deprecated( SOUT_CFG_PREFIX "frameref", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_deprecated_alias( SOUT_CFG_PREFIX "frameref" ); /* Deprecated since 0.8.5 */
add_bool( SOUT_CFG_PREFIX "nf", 0, NULL, NF_TEXT,
NF_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "loopfilter", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_deprecated_alias( SOUT_CFG_PREFIX "loopfilter" ); /* Deprecated since 0.8.5 */
add_string( SOUT_CFG_PREFIX "deblock", "0:0", NULL, FILTER_TEXT,
FILTER_LONGTEXT, VLC_FALSE );
add_deprecated( SOUT_CFG_PREFIX "filter", VLC_FALSE ); /* Deprecated since 0.8.6 */
add_deprecated_alias( SOUT_CFG_PREFIX "filter" ); /* Deprecated since 0.8.6 */
add_string( SOUT_CFG_PREFIX "level", "5.1", NULL, LEVEL_TEXT,
LEVEL_LONGTEXT, VLC_FALSE );
......@@ -445,12 +445,12 @@ vlc_module_begin();
add_integer( SOUT_CFG_PREFIX "qpmin", 10, NULL, QPMIN_TEXT,
QPMIN_LONGTEXT, VLC_FALSE );
change_integer_range( 0, 51 );
add_deprecated( SOUT_CFG_PREFIX "qp-min", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_deprecated_alias( SOUT_CFG_PREFIX "qp-min" ); /* Deprecated since 0.8.5 */
add_integer( SOUT_CFG_PREFIX "qpmax", 51, NULL, QPMAX_TEXT,
QPMAX_LONGTEXT, VLC_FALSE );
change_integer_range( 0, 51 );
add_deprecated( SOUT_CFG_PREFIX "qp-max", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_deprecated_alias( SOUT_CFG_PREFIX "qp-max" ); /* Deprecated since 0.8.5 */
add_integer( SOUT_CFG_PREFIX "qpstep", 4, NULL, QPSTEP_TEXT,
QPSTEP_LONGTEXT, VLC_FALSE );
......@@ -459,7 +459,7 @@ vlc_module_begin();
add_float( SOUT_CFG_PREFIX "ratetol", 1.0, NULL, RATETOL_TEXT,
RATETOL_LONGTEXT, VLC_FALSE );
change_float_range( 0, 100 );
add_deprecated( SOUT_CFG_PREFIX "tolerance", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_deprecated_alias( SOUT_CFG_PREFIX "tolerance" ); /* Deprecated since 0.8.5 */
add_integer( SOUT_CFG_PREFIX "vbv-maxrate", 0, NULL, VBV_MAXRATE_TEXT,
VBV_MAXRATE_LONGTEXT, VLC_FALSE );
......@@ -504,7 +504,7 @@ vlc_module_begin();
add_string( SOUT_CFG_PREFIX "partitions", "normal", NULL, ANALYSE_TEXT,
ANALYSE_LONGTEXT, VLC_FALSE );
change_string_list( enc_analyse_list, enc_analyse_list_text, 0 );
add_deprecated( SOUT_CFG_PREFIX "analyse", VLC_FALSE ); /* Deprecated since 0.8.6 */
add_deprecated_alias( SOUT_CFG_PREFIX "analyse" ); /* Deprecated since 0.8.6 */
add_string( SOUT_CFG_PREFIX "direct", "spatial", NULL, DIRECT_PRED_TEXT,
DIRECT_PRED_LONGTEXT, VLC_FALSE );
......@@ -542,7 +542,7 @@ vlc_module_begin();
add_integer( SOUT_CFG_PREFIX "subme", 5, NULL, SUBME_TEXT,
SUBME_LONGTEXT, VLC_FALSE );
change_integer_range( 1, SUBME_MAX );
add_deprecated( SOUT_CFG_PREFIX "subpel", VLC_FALSE ); /* Deprecated since 0.8.5 */
add_deprecated_alias( SOUT_CFG_PREFIX "subpel" ); /* Deprecated since 0.8.5 */
#if X264_BUILD >= 41 /* r368 */
add_bool( SOUT_CFG_PREFIX "b-rdo", 0, NULL, B_RDO_TEXT,
......
......@@ -130,30 +130,30 @@ vlc_module_begin();
add_bool( "wx-embed", 1, NULL,
EMBED_TEXT, EMBED_LONGTEXT, VLC_FALSE );
add_deprecated( "wxwin-enbed", VLC_FALSE); /*Deprecated since 0.8.4*/
add_deprecated_alias( "wxwin-enbed" ); /*Deprecated since 0.8.4*/
add_bool( "wx-bookmarks", 0, NULL,
BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, VLC_FALSE );
add_deprecated( "wxwin-bookmarks", VLC_FALSE); /*Deprecated since 0.8.4*/
add_deprecated_alias( "wxwin-bookmarks" ); /*Deprecated since 0.8.4*/
add_bool( "wx-taskbar", 1, NULL,
TASKBAR_TEXT, TASKBAR_LONGTEXT, VLC_FALSE );
add_deprecated( "wxwin-taskbar", VLC_FALSE); /*Deprecated since 0.8.4*/
add_deprecated_alias( "wxwin-taskbar" ); /*Deprecated since 0.8.4*/
add_bool( "wx-extended", 0, NULL,
EXTENDED_TEXT, EXTENDED_LONGTEXT, VLC_FALSE );
add_bool( "wx-minimal", 0, NULL,
MINIMAL_TEXT, MINIMAL_LONGTEXT, VLC_TRUE );
add_deprecated( "wxwin-minimal", VLC_FALSE); /*Deprecated since 0.8.4*/
add_deprecated_alias( "wxwin-minimal" ); /*Deprecated since 0.8.4*/
add_bool( "wx-autosize", 1, NULL,
SIZE_TO_VIDEO_TEXT, SIZE_TO_VIDEO_LONGTEXT, VLC_TRUE );
add_deprecated_alias( "wxwin-autosize" ); /*Deprecated since 0.8.4*/
add_integer( "wx-playlist-view", 0, NULL, PLAYLIST_TEXT, PLAYLIST_LONGTEXT,
VLC_FALSE );
change_integer_list( pi_playlist_views, psz_playlist_views, 0 );
add_deprecated( "wxwin-autosize", VLC_FALSE); /*Deprecated since 0.8.4*/
/* wxCocoa pretends to support this, but at least 2.6.x doesn't */
#ifndef __APPLE__
#ifdef wxHAS_TASK_BAR_ICON
add_bool( "wx-systray", 0, NULL,
SYSTRAY_TEXT, SYSTRAY_LONGTEXT, VLC_FALSE );
add_deprecated( "wxwin-systray", VLC_FALSE); /*Deprecated since 0.8.4*/
add_deprecated_alias( "wxwin-systray" ); /*Deprecated since 0.8.4*/
#endif
#endif
add_bool( "wx-labels", 0, NULL, LABEL_TEXT, LABEL_LONGTEXT, VLC_TRUE);
......@@ -161,7 +161,7 @@ vlc_module_begin();
N_("last config"), N_("last config"), VLC_TRUE );
change_autosave();
change_internal();
add_deprecated( "wxwin-config-last", VLC_FALSE); /*Deprecated since 0.8.4*/
add_deprecated_alias( "wxwin-config-last" ); /*Deprecated since 0.8.4*/
add_submodule();
set_description( _("wxWidgets dialogs provider") );
......
......@@ -67,7 +67,7 @@ vlc_module_begin();
set_category( CAT_PLAYLIST );
set_subcategory( SUBCAT_PLAYLIST_SD );
add_suppressed_integer( "shoutcast-limit" );
add_obsolete_integer( "shoutcast-limit" );
set_capability( "services_discovery", 0 );
set_callbacks( OpenRadio, Close );
......
......@@ -112,7 +112,7 @@ vlc_module_begin();
VLC_TRUE );
add_string( SOUT_CFG_PREFIX "phone", "", NULL, PHONE_TEXT, PHONE_LONGTEXT,
VLC_TRUE );
add_suppressed_bool( SOUT_CFG_PREFIX "sap-ipv6" );
add_obsolete_bool( SOUT_CFG_PREFIX "sap-ipv6" );
set_callbacks( Open, Close );
vlc_module_end();
......
......@@ -202,10 +202,10 @@ vlc_module_begin();
add_integer( CFG_PREFIX "borderw", 0, NULL,
BORDERW_TEXT, BORDERW_LONGTEXT, VLC_TRUE );
add_deprecated( CFG_PREFIX "vborder", VLC_FALSE );
add_deprecated_alias( CFG_PREFIX "vborder" );
add_integer( CFG_PREFIX "borderh", 0, NULL,
BORDERH_TEXT, BORDERH_LONGTEXT, VLC_TRUE );
add_deprecated( CFG_PREFIX "hborder", VLC_FALSE );
add_deprecated_alias( CFG_PREFIX "hborder" );
add_integer( CFG_PREFIX "position", 0, NULL,
POS_TEXT, POS_LONGTEXT, VLC_FALSE );
......
......@@ -90,10 +90,10 @@ vlc_module_begin( );
change_string_list( psz_format_list, psz_format_list_text, 0 );
add_integer( CFG_PREFIX "width", -1, NULL,
WIDTH_TEXT, WIDTH_LONGTEXT, VLC_TRUE );
add_deprecated( "image-width", VLC_FALSE ); /* since 0.9.0 */
add_deprecated_alias( "image-width" ); /* since 0.9.0 */
add_integer( CFG_PREFIX "height", -1, NULL,
HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_TRUE );
add_deprecated( "image-height", VLC_FALSE ); /* since 0.9.0 */
add_deprecated_alias( "image-height" ); /* since 0.9.0 */
add_integer( CFG_PREFIX "ratio", 3, NULL,
RATIO_TEXT, RATIO_LONGTEXT, VLC_FALSE );
add_string( CFG_PREFIX "prefix", "img", NULL,
......
......@@ -1438,8 +1438,8 @@ vlc_module_begin();
set_subcategory( SUBCAT_VIDEO_VFILTER );
add_module_list_cat( "video-filter", SUBCAT_VIDEO_VFILTER, NULL, NULL,
VIDEO_FILTER_TEXT, VIDEO_FILTER_LONGTEXT, VLC_FALSE );
add_deprecated( "filter", VLC_FALSE ); /*deprecated since 0.8.2 */
// add_deprecated( "vout-filter", VLC_FALSE ); /* deprecated since 0.8.6 *// While the "video-filter" chain isn't parsed for both vfilter and vfilter2, keep both options
add_deprecated_alias( "filter" ); /*deprecated since 0.8.2 */
// add_deprecated_alias( "vout-filter" ); /* deprecated since 0.8.6 *// While the "video-filter" chain isn't parsed for both vfilter and vfilter2, keep both options
add_module_list_cat( "vout-filter", SUBCAT_VIDEO_VFILTER, NULL, NULL,
NULL, NULL, VLC_FALSE );
#if 0
......@@ -1472,7 +1472,7 @@ vlc_module_begin();
SUB_PATH_TEXT, SUB_PATH_LONGTEXT, VLC_TRUE );
add_integer( "sub-margin", 0, NULL, SUB_MARGIN_TEXT,
SUB_MARGIN_LONGTEXT, VLC_TRUE );
add_deprecated( "spu-margin", VLC_FALSE ); /*Deprecated since 0.8.2 */
add_deprecated_alias( "spu-margin" ); /*Deprecated since 0.8.2 */
set_section( N_( "Overlays" ) , NULL );
add_module_list_cat( "sub-filter", SUBCAT_VIDEO_SUBPIC, NULL, NULL,
SUB_FILTER_TEXT, SUB_FILTER_LONGTEXT, VLC_FALSE );
......@@ -1490,10 +1490,10 @@ vlc_module_begin();
INPUT_PROGRAMS_TEXT, INPUT_PROGRAMS_LONGTEXT, VLC_TRUE );
add_integer( "audio-track", -1, NULL,
INPUT_AUDIOTRACK_TEXT, INPUT_AUDIOTRACK_LONGTEXT, VLC_TRUE );
add_deprecated( "audio-channel", VLC_FALSE ); /*deprecated since 0.8.2 */
add_deprecated_alias( "audio-channel" ); /*deprecated since 0.8.2 */
add_integer( "sub-track", -1, NULL,
INPUT_SUBTRACK_TEXT, INPUT_SUBTRACK_LONGTEXT, VLC_TRUE );
add_deprecated("spu-channel",VLC_FALSE); /*deprecated since 0.8.2*/
add_deprecated_alias("spu-channel" ); /*deprecated since 0.8.2*/
add_string( "audio-language", "", NULL,
INPUT_AUDIOTRACK_LANG_TEXT, INPUT_AUDIOTRACK_LANG_LONGTEXT,
VLC_FALSE );
......@@ -2062,7 +2062,7 @@ vlc_module_begin();
add_key( "key-toggle-fullscreen", KEY_TOGGLE_FULLSCREEN, NULL, TOGGLE_FULLSCREEN_KEY_TEXT,
TOGGLE_FULLSCREEN_KEY_LONGTEXT, VLC_FALSE );
add_deprecated( "key-fullscreen", VLC_FALSE ); /*deprecated since 0.9.0 */
add_deprecated_alias( "key-fullscreen" ); /*deprecated since 0.9.0 */
add_key( "key-leave-fullscreen", KEY_LEAVE_FULLSCREEN, NULL, LEAVE_FULLSCREEN_KEY_TEXT,
LEAVE_FULLSCREEN_KEY_LONGTEXT, VLC_FALSE );
add_key( "key-play-pause", KEY_PLAY_PAUSE, NULL, PLAY_PAUSE_KEY_TEXT,
......
......@@ -226,7 +226,7 @@ void config_ChainDestroy( config_chain_t *p_cfg )
}
void __config_ChainParse( vlc_object_t *p_this, const char *psz_prefix,
const char **ppsz_options, config_chain_t *cfg )
const char *const *ppsz_options, config_chain_t *cfg )
{
char *psz_name;
int i_type;
......
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