[vlc-devel] [PATCH 6/8] glwin32: handle VOUT_DISPLAY_CHANGE_VIEWPOINT events

Steve Lhomme robux4 at videolabs.io
Thu Sep 8 17:35:33 CEST 2016


---
 modules/video_output/win32/glwin32.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 01bae19..2674531 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -147,6 +147,21 @@ static void DestroyGPUAffinityDC(vout_display_t *vd) {
     fncDeleteDCNV(vd->sys->affinityHDC);
 }
 
+static int Control(vout_display_t *vd, int query, va_list args)
+{
+    vout_display_sys_t *sys = vd->sys;
+
+    if (query == VOUT_DISPLAY_CHANGE_VIEWPOINT)
+    {
+      const video_format_t *src = va_arg (args, const video_format_t *);
+      vout_display_opengl_SetViewpoint(sys->vgl, src->f_pose_yaw_degrees,
+                                       src->f_pose_pitch_degrees, src->f_pose_roll_degrees);
+      return VLC_SUCCESS;
+    }
+
+    return CommonControl(vd, query, args);
+}
+
 /**
  * It creates an OpenGL vout display.
  */
@@ -227,7 +242,7 @@ static int Open(vlc_object_t *object)
     vd->pool    = Pool;
     vd->prepare = Prepare;
     vd->display = Display;
-    vd->control = CommonControl;
+    vd->control = Control;
     vd->manage  = Manage;
 
     return VLC_SUCCESS;
-- 
2.8.2



More information about the vlc-devel mailing list