[vlc-devel] [PATCH 05/15] glwin32: handle VOUT_DISPLAY_CHANGE_VIEWPOINT events

Steve Lhomme robux4 at videolabs.io
Mon Nov 7 10:51:54 CET 2016


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

diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 01bae19..ba2c967 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -147,6 +147,20 @@ 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);
+      return VLC_SUCCESS;
+    }
+
+    return CommonControl(vd, query, args);
+}
+
 /**
  * It creates an OpenGL vout display.
  */
@@ -227,7 +241,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.10.1



More information about the vlc-devel mailing list