core: remove the 360 video viewpoint zoom
authorAdrien Maglo <magsoft@videolan.org>
Fri, 25 Nov 2016 09:33:40 +0000 (10:33 +0100)
committerThomas Guillem <thomas@gllm.fr>
Fri, 25 Nov 2016 09:55:29 +0000 (10:55 +0100)
The functionality is provided by the fov parameter.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
include/vlc/libvlc_media_player.h
include/vlc_keys.h
include/vlc_vout.h
lib/video.c
modules/control/hotkeys.c
modules/video_output/win32/direct3d11.c
src/config/keys.c
src/input/input.c
src/libvlc-module.c
src/video_output/display.c
src/video_output/video_output.c

index 038e254..b6e697e 100644 (file)
@@ -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;
 
 /**
index c91229e..8d8df53 100644 (file)
@@ -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 */
index 38b00b2..d236d51 100644 (file)
@@ -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;
 }
 
index 0c5948f..a0882cf 100644 (file)
@@ -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;
index b40e5e0..d0391a3 100644 (file)
@@ -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,
index a8601fa..f720da4 100644 (file)
@@ -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
index 4af2895..336466b 100644 (file)
@@ -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, },
index aebeea2..118612c 100644 (file)
@@ -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;
index c06412a..50ae1e0 100644 (file)
@@ -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,
index b877db5..71ceeff 100644 (file)
@@ -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;
 
index 4a9f34e..ef111ec 100644 (file)
@@ -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");