[vlc-commits] core: remove the 360 video viewpoint zoom
Adrien Maglo
git at videolan.org
Fri Nov 25 10:55:41 CET 2016
vlc | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Nov 25 10:33:40 2016 +0100| [24dddc303deb11d3bb4acd0c4dba18df4cdfde23] | committer: Thomas Guillem
core: remove the 360 video viewpoint zoom
The functionality is provided by the fov parameter.
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=24dddc303deb11d3bb4acd0c4dba18df4cdfde23
---
include/vlc/libvlc_media_player.h | 1 -
include/vlc_keys.h | 2 --
include/vlc_vout.h | 3 +--
lib/video.c | 5 +----
modules/control/hotkeys.c | 13 -------------
modules/video_output/win32/direct3d11.c | 2 +-
src/config/keys.c | 2 --
src/input/input.c | 2 --
src/libvlc-module.c | 6 ------
src/video_output/display.c | 1 -
src/video_output/video_output.c | 1 -
11 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index 038e254..b6e697e 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -1177,7 +1177,6 @@ typedef struct libvlc_video_viewpoint_t
float f_pitch; /**< view point pitch in degrees */
float f_roll; /**< view point roll in degrees */
float f_field_of_view; /**< field of view in degrees (default 80.0f) */
- float f_zoom; /**< zoom factor, [-1.f, 1.f] range, default to 0.f */
} libvlc_video_viewpoint_t;
/**
diff --git a/include/vlc_keys.h b/include/vlc_keys.h
index c91229e..8d8df53 100644
--- a/include/vlc_keys.h
+++ b/include/vlc_keys.h
@@ -230,8 +230,6 @@ typedef enum vlc_action {
/* Viewpoint */
ACTIONID_VIEWPOINT_FOV_IN,
ACTIONID_VIEWPOINT_FOV_OUT,
- ACTIONID_VIEWPOINT_ZOOM_IN,
- ACTIONID_VIEWPOINT_ZOOM_OUT,
ACTIONID_VIEWPOINT_ROLL_CLOCK,
ACTIONID_VIEWPOINT_ROLL_ANTICLOCK,
/* Combo Actions */
diff --git a/include/vlc_vout.h b/include/vlc_vout.h
index 38b00b2..d236d51 100644
--- a/include/vlc_vout.h
+++ b/include/vlc_vout.h
@@ -90,12 +90,11 @@ struct vlc_viewpoint_t {
float pitch; /* pitch in degrees */
float roll; /* roll in degrees */
float fov; /* field of view in degrees */
- float zoom; /* zoom factor, [-1.f, 1.f] range, default to 0.f */
};
static inline void vlc_viewpoint_init( vlc_viewpoint_t *p_vp )
{
- p_vp->yaw = p_vp->pitch = p_vp->roll = p_vp->zoom = 0.0f;
+ p_vp->yaw = p_vp->pitch = p_vp->roll = 0.0f;
p_vp->fov = FIELD_OF_VIEW_DEGREES_DEFAULT;
}
diff --git a/lib/video.c b/lib/video.c
index 0c5948f..a0882cf 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -287,8 +287,7 @@ libvlc_video_viewpoint_t *libvlc_video_new_viewpoint(void)
libvlc_video_viewpoint_t *p_vp = malloc(sizeof *p_vp);
if (unlikely(p_vp == NULL))
return NULL;
- p_vp->f_yaw = p_vp->f_pitch = p_vp->f_roll = p_vp->f_field_of_view =
- p_vp->f_zoom = 0.0f;
+ p_vp->f_yaw = p_vp->f_pitch = p_vp->f_roll = p_vp->f_field_of_view = 0.0f;
return p_vp;
}
@@ -301,7 +300,6 @@ int libvlc_video_update_viewpoint( libvlc_media_player_t *p_mi,
.pitch = p_viewpoint->f_pitch,
.roll = p_viewpoint->f_roll,
.fov = p_viewpoint->f_field_of_view,
- .zoom = p_viewpoint->f_zoom,
};
input_thread_t *p_input_thread = libvlc_get_input_thread( p_mi );
@@ -323,7 +321,6 @@ int libvlc_video_update_viewpoint( libvlc_media_player_t *p_mi,
p_mi->viewpoint.pitch += p_mi->viewpoint.pitch;
p_mi->viewpoint.roll += p_mi->viewpoint.roll;
p_mi->viewpoint.fov += p_mi->viewpoint.fov;
- p_mi->viewpoint.zoom += p_mi->viewpoint.zoom;
}
else
p_mi->viewpoint = update;
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index b40e5e0..d0391a3 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -1115,19 +1115,6 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
false );
break;
- case ACTIONID_VIEWPOINT_ZOOM_IN:
- if( p_vout )
- input_UpdateViewpoint( p_input,
- &(vlc_viewpoint_t) { .zoom = 0.01f },
- false );
- break;
- case ACTIONID_VIEWPOINT_ZOOM_OUT:
- if( p_vout )
- input_UpdateViewpoint( p_input,
- &(vlc_viewpoint_t) { .zoom = -0.01f },
- false );
- break;
-
case ACTIONID_VIEWPOINT_ROLL_CLOCK:
if( p_vout )
input_UpdateViewpoint( p_input,
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index a8601fa..f720da4 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -944,7 +944,7 @@ static void SetQuadVSProjection(vout_display_t *vd, d3d_quad_t *quad, const vlc_
getXRotMatrix(-RAD(p_vp->pitch), dst_data->RotX);
getYRotMatrix(-RAD(p_vp->yaw), dst_data->RotY);
getZRotMatrix(-RAD(p_vp->roll), dst_data->RotZ);
- getZoomMatrix(SPHERE_RADIUS * p_vp->zoom, dst_data->View);
+ getZoomMatrix(SPHERE_RADIUS, dst_data->View); /* FIXME */
float sar = (float) vd->cfg->display.width / vd->cfg->display.height;
getProjectionMatrix(sar, RAD(p_vp->fov), dst_data->Projection);
#undef RAD
diff --git a/src/config/keys.c b/src/config/keys.c
index 4af2895..336466b 100644
--- a/src/config/keys.c
+++ b/src/config/keys.c
@@ -372,8 +372,6 @@ static const struct action actions[] =
{ "viewpoint-fov-out", ACTIONID_VIEWPOINT_FOV_OUT, },
{ "viewpoint-roll-anticlock", ACTIONID_VIEWPOINT_ROLL_ANTICLOCK, },
{ "viewpoint-roll-clock", ACTIONID_VIEWPOINT_ROLL_CLOCK, },
- { "viewpoint-zoom-in", ACTIONID_VIEWPOINT_ZOOM_IN, },
- { "viewpoint-zoom-out", ACTIONID_VIEWPOINT_ZOOM_OUT, },
{ "vol-down", ACTIONID_VOL_DOWN, },
{ "vol-mute", ACTIONID_VOL_MUTE, },
{ "vol-up", ACTIONID_VOL_UP, },
diff --git a/src/input/input.c b/src/input/input.c
index aebeea2..118612c 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1942,7 +1942,6 @@ static bool Control( input_thread_t *p_input,
priv->viewpoint.pitch += p_vp->pitch;
priv->viewpoint.roll += p_vp->roll;
priv->viewpoint.fov += p_vp->fov;
- priv->viewpoint.zoom += p_vp->zoom;
}
priv->viewpoint.yaw = fmodf( priv->viewpoint.yaw, 360.f );
@@ -1951,7 +1950,6 @@ static bool Control( input_thread_t *p_input,
priv->viewpoint.fov = VLC_CLIP( priv->viewpoint.fov,
FIELD_OF_VIEW_DEGREES_MIN,
FIELD_OF_VIEW_DEGREES_MAX );
- priv->viewpoint.zoom = VLC_CLIP( priv->viewpoint.zoom, -1.f, 1.f );
vout_thread_t **pp_vout;
size_t i_vout;
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index c06412a..50ae1e0 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -1425,8 +1425,6 @@ static const char *const mouse_wheel_texts[] = {
/* 360° Viewpoint */
#define VIEWPOINT_FOV_IN_KEY_TEXT N_("Shrink the viewpoint field of view (360°)")
#define VIEWPOINT_FOV_OUT_KEY_TEXT N_("Expand the viewpoint field of view (360°)")
-#define VIEWPOINT_ZOOM_IN_KEY_TEXT N_("Increase the viewpoint zoom (360°)")
-#define VIEWPOINT_ZOOM_OUT_KEY_TEXT N_("Decrease the viewpoint zoom (360°)")
#define VIEWPOINT_ROLL_CLOCK_KEY_TEXT N_("Roll the viewpoint clockwise (360°)")
#define VIEWPOINT_ROLL_ANTICLOCK_KEY_TEXT N_("Roll the viewpoint anti-clockwise (360°)")
@@ -2582,10 +2580,6 @@ vlc_module_begin ()
VIEWPOINT_FOV_IN_KEY_TEXT, VIEWPOINT_FOV_IN_KEY_TEXT, true )
add_key( "key-viewpoint-fov-out", KEY_VIEWPOINT_FOV_OUT,
VIEWPOINT_FOV_OUT_KEY_TEXT, VIEWPOINT_FOV_OUT_KEY_TEXT, true )
- add_key( "key-viewpoint-zoom-in", KEY_VIEWPOINT_ZOOM_IN,
- VIEWPOINT_ZOOM_IN_KEY_TEXT, VIEWPOINT_ZOOM_IN_KEY_TEXT, true )
- add_key( "key-viewpoint-zoom-out", KEY_VIEWPOINT_ZOOM_OUT,
- VIEWPOINT_ZOOM_OUT_KEY_TEXT, VIEWPOINT_ZOOM_OUT_KEY_TEXT, true )
add_key( "key-viewpoint-roll-clock", NULL,
VIEWPOINT_ROLL_CLOCK_KEY_TEXT, VIEWPOINT_ROLL_CLOCK_KEY_TEXT, true )
add_key( "key-viewpoint-roll-anticlock", NULL,
diff --git a/src/video_output/display.c b/src/video_output/display.c
index b877db5..71ceeff 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1224,7 +1224,6 @@ void vout_SetDisplayViewpoint(vout_display_t *vd,
if (osys->viewpoint.yaw != p_viewpoint->yaw ||
osys->viewpoint.pitch != p_viewpoint->pitch ||
osys->viewpoint.roll != p_viewpoint->roll ||
- osys->viewpoint.zoom != p_viewpoint->zoom ||
osys->viewpoint.fov != p_viewpoint->fov) {
osys->viewpoint = *p_viewpoint;
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 4a9f34e..ef111ec 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -564,7 +564,6 @@ static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg, cons
cfg->viewpoint.pitch = vout->p->original.pose.f_pitch_degrees;
cfg->viewpoint.roll = vout->p->original.pose.f_roll_degrees;
cfg->viewpoint.fov = vout->p->original.pose.f_fov_degrees;
- cfg->viewpoint.zoom = 0.f;
}
cfg->display.title = title;
const int display_width = var_CreateGetInteger(vout, "width");
More information about the vlc-commits
mailing list