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

vout: remove the "scale" option

This duplicates the 7-years older "zoom" option for no good reasons.
parent 6c490e5f
......@@ -1569,8 +1569,7 @@ vlc_module_begin ()
change_safe ()
add_bool( "autoscale", true, AUTOSCALE_TEXT, AUTOSCALE_LONGTEXT, false )
change_safe ()
add_float( "scale", 1.0, SCALEFACTOR_TEXT, SCALEFACTOR_LONGTEXT, false )
change_safe ()
add_obsolete_float( "scale" ) /* since 3.0.0 */
add_string( "monitor-par", NULL,
MASPECT_RATIO_TEXT, MASPECT_RATIO_LONGTEXT, true )
add_string( "custom-aspect-ratios", NULL, CUSTOM_ASPECT_RATIOS_TEXT,
......@@ -1583,6 +1582,7 @@ vlc_module_begin ()
add_integer( "align", 0, ALIGN_TEXT, ALIGN_LONGTEXT, true )
change_integer_list( pi_align_values, ppsz_align_descriptions )
add_float( "zoom", 1., ZOOM_TEXT, ZOOM_LONGTEXT, true )
change_safe()
add_integer( "deinterlace", 0,
DEINTERLACE_TEXT, DEINTERLACE_LONGTEXT, false )
change_integer_list( pi_deinterlace, ppsz_deinterlace_text )
......
......@@ -616,7 +616,7 @@ static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg, cons
cfg->display.sar.num = msar_num;
cfg->display.sar.den = msar_den;
unsigned zoom_den = 1000;
unsigned zoom_num = zoom_den * var_CreateGetFloat(vout, "scale");
unsigned zoom_num = zoom_den * var_CreateGetFloat(vout, "zoom");
vlc_ureduce(&zoom_num, &zoom_den, zoom_num, zoom_den, 0);
cfg->zoom.num = zoom_num;
cfg->zoom.den = zoom_den;
......
......@@ -55,8 +55,6 @@ static int AspectCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int AutoScaleCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int ScaleCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int ZoomCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int AboveCallback( vlc_object_t *, char const *,
......@@ -170,13 +168,6 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Change( p_vout, "autoscale", VLC_VAR_SETTEXT, &text, NULL );
var_AddCallback( p_vout, "autoscale", AutoScaleCallback, NULL );
var_Create( p_vout, "scale", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT
| VLC_VAR_ISCOMMAND );
text.psz_string = _("Scale factor");
var_Change( p_vout, "scale", VLC_VAR_SETTEXT, &text, NULL );
var_AddCallback( p_vout, "scale", ScaleCallback, NULL );
/* Zoom object var */
var_Create( p_vout, "zoom", VLC_VAR_FLOAT | VLC_VAR_ISCOMMAND |
VLC_VAR_DOINHERIT );
......@@ -599,8 +590,8 @@ static int AutoScaleCallback( vlc_object_t *obj, char const *name,
return VLC_SUCCESS;
}
static int ScaleCallback( vlc_object_t *obj, char const *name,
vlc_value_t prev, vlc_value_t cur, void *data )
static int ZoomCallback( vlc_object_t *obj, char const *name,
vlc_value_t prev, vlc_value_t cur, void *data )
{
vout_thread_t *p_vout = (vout_thread_t *)obj;
......@@ -609,13 +600,6 @@ static int ScaleCallback( vlc_object_t *obj, char const *name,
return VLC_SUCCESS;
}
static int ZoomCallback( vlc_object_t *obj, char const *name,
vlc_value_t prev, vlc_value_t cur, void *data )
{
(void) name; (void) prev; (void) data;
return var_SetFloat( obj, "scale", cur.f_float );
}
static int AboveCallback( vlc_object_t *obj, char const *name,
vlc_value_t prev, vlc_value_t cur, void *data )
{
......
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