[vlc-commits] vout: remove the "scale" option
Rémi Denis-Courmont
git at videolan.org
Thu Oct 23 21:11:56 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 23 21:18:44 2014 +0300| [c320bf790eca7829f79c44dd7c85d9cc70b65619] | committer: Rémi Denis-Courmont
vout: remove the "scale" option
This duplicates the 7-years older "zoom" option for no good reasons.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c320bf790eca7829f79c44dd7c85d9cc70b65619
---
src/libvlc-module.c | 4 ++--
src/video_output/video_output.c | 2 +-
src/video_output/vout_intf.c | 20 ++------------------
3 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 539d52e..e29f1ba 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -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 )
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index b27fd38..ec6fc3d 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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;
diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index f51550b..af6d476 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -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 )
{
More information about the vlc-commits
mailing list