Commit f4ea7434 authored by Thomas Guillem's avatar Thomas Guillem

libvlc: add f_zoom in libvlc_video_viewpoint_t

parent 4ad8cdba
......@@ -1177,6 +1177,7 @@ 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;
/**
......
......@@ -287,7 +287,8 @@ 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 = 0.0f;
p_vp->f_yaw = p_vp->f_pitch = p_vp->f_roll = p_vp->f_field_of_view =
p_vp->f_zoom = 0.0f;
return p_vp;
}
......@@ -300,7 +301,7 @@ 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 = 0.0f,
.zoom = p_viewpoint->f_zoom,
};
input_thread_t *p_input_thread = libvlc_get_input_thread( p_mi );
......@@ -322,6 +323,7 @@ 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;
......
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