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

Steve Lhomme robux4 at videolabs.io
Tue Sep 13 13:43:36 CEST 2016


--
replaces https://patches.videolan.org/patch/14423/ using vout_display_cfg_t
---
 modules/video_output/win32/glwin32.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 01bae19..ee17e46 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -147,6 +147,22 @@ 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 vout_display_cfg_t *p_cfg = va_arg (args, const vout_display_cfg_t *);
+      vout_display_opengl_SetViewpoint(sys->vgl, p_cfg->viewpoint.f_yaw_degrees,
+                                       p_cfg->viewpoint.f_pitch_degrees,
+                                       p_cfg->viewpoint.f_roll_degrees);
+      return VLC_SUCCESS;
+    }
+
+    return CommonControl(vd, query, args);
+}
+
 /**
  * It creates an OpenGL vout display.
  */
@@ -227,7 +243,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.7.2.windows.1



More information about the vlc-devel mailing list