[vlc-commits] core: vout: initialize viewpoint from input
Thomas Guillem
git at videolan.org
Wed Nov 16 17:50:45 CET 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Nov 16 17:48:03 2016 +0100| [2d32661b145718b2d31dbf9a2f23b7f7af39799c] | committer: Thomas Guillem
core: vout: initialize viewpoint from input
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2d32661b145718b2d31dbf9a2f23b7f7af39799c
---
src/video_output/video_output.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 1fd9e68..0ce4a4d 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -558,8 +558,6 @@ static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg, cons
const vlc_viewpoint_t *p_viewpoint = var_InheritAddress(vout, "viewpoint");
if (p_viewpoint != NULL)
cfg->viewpoint = *p_viewpoint;
- else
- vlc_viewpoint_init(&cfg->viewpoint);
cfg->display.title = title;
const int display_width = var_CreateGetInteger(vout, "width");
const int display_height = var_CreateGetInteger(vout, "height");
@@ -1470,6 +1468,16 @@ static int ThreadReinit(vout_thread_t *vout,
state.cfg.zoom.den = 1;
}
+ if (original.projection_mode == PROJECTION_MODE_EQUIRECTANGULAR
+ || original.projection_mode == PROJECTION_MODE_CUBEMAP_LAYOUT_STANDARD)
+ {
+ state.cfg.viewpoint.yaw = original.f_pose_yaw_degrees;
+ state.cfg.viewpoint.pitch = original.f_pose_pitch_degrees;
+ state.cfg.viewpoint.roll = original.f_pose_roll_degrees;
+ state.cfg.viewpoint.fov = original.f_pose_fov_degrees;
+ state.cfg.viewpoint.zoom = 0.f;
+ }
+
vout->p->original = original;
vout->p->dpb_size = cfg->dpb_size;
if (ThreadStart(vout, &state)) {
More information about the vlc-commits
mailing list