[vlc-devel] [PATCH 05/10] glwin32: handle VOUT_DISPLAY_CHANGE_VIEWPOINT events
Steve Lhomme
robux4 at videolabs.io
Fri Sep 16 18:00:31 CEST 2016
--
replaces https://patches.videolan.org/patch/14423/ using vout_display_cfg_t
replaces https://patches.videolan.org/patch/14446/ using vlc_viewpoint
---
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;
More information about the vlc-devel
mailing list