[vlc-commits] lib: use "zoom" rather than "scale" (like interfaces)
Rémi Denis-Courmont
git at videolan.org
Thu Oct 23 20:19:38 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 23 21:06:26 2014 +0300| [8cffc346abebfb03845212392d5d289c3c97de82] | committer: Rémi Denis-Courmont
lib: use "zoom" rather than "scale" (like interfaces)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8cffc346abebfb03845212392d5d289c3c97de82
---
lib/media_player.c | 6 ++----
lib/video.c | 8 ++++----
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/lib/media_player.c b/lib/media_player.c
index 64240aa..857d9b4 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -526,10 +526,8 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_SetBool (mp, "mouse-events", true);
var_Create (mp, "fullscreen", VLC_VAR_BOOL);
- var_Create (mp, "autoscale", VLC_VAR_BOOL);
- var_SetBool (mp, "autoscale", true);
- var_Create (mp, "scale", VLC_VAR_FLOAT);
- var_SetFloat (mp, "scale", 1.);
+ var_Create (mp, "autoscale", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
+ var_Create (mp, "zoom", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
var_Create (mp, "aspect-ratio", VLC_VAR_STRING);
var_Create (mp, "crop", VLC_VAR_STRING);
var_Create (mp, "deinterlace", VLC_VAR_INTEGER);
diff --git a/lib/video.c b/lib/video.c
index 5b89fd6..6c09ee8 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -230,16 +230,16 @@ unsigned libvlc_media_player_has_vout( libvlc_media_player_t *p_mi )
float libvlc_video_get_scale( libvlc_media_player_t *mp )
{
- float f_scale = var_GetFloat (mp, "scale");
+ float f_scale = var_GetFloat (mp, "zoom");
if (var_GetBool (mp, "autoscale"))
- f_scale = 0.;
+ f_scale = 0.f;
return f_scale;
}
void libvlc_video_set_scale( libvlc_media_player_t *p_mp, float f_scale )
{
if (isfinite(f_scale) && f_scale != 0.f)
- var_SetFloat (p_mp, "scale", f_scale);
+ var_SetFloat (p_mp, "zoom", f_scale);
var_SetBool (p_mp, "autoscale", f_scale == 0.f);
/* Apply to current video outputs (if any) */
@@ -250,7 +250,7 @@ void libvlc_video_set_scale( libvlc_media_player_t *p_mp, float f_scale )
vout_thread_t *p_vout = pp_vouts[i];
if (isfinite(f_scale) && f_scale != 0.f)
- var_SetFloat (p_vout, "scale", f_scale);
+ var_SetFloat (p_vout, "zoom", f_scale);
var_SetBool (p_vout, "autoscale", f_scale == 0.f);
vlc_object_release (p_vout);
}
More information about the vlc-commits
mailing list