[vlc-devel] [PATCH 08/16] opengl: handle VOUT_DISPLAY_CHANGE_VIEWPOINT
Thomas Guillem
thomas at gllm.fr
Wed Nov 9 18:33:02 CET 2016
From: Steve Lhomme <robux4 at videolabs.io>
Handle VOUT_DISPLAY_CHANGE_VIEWPOINT in every vout using our opengl stack.
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
---
modules/video_output/gl.c | 4 ++++
modules/video_output/ios2.m | 4 ++++
modules/video_output/macosx.m | 7 ++++++-
modules/video_output/win32/glwin32.c | 13 ++++++++++++-
modules/video_output/xcb/glx.c | 4 ++++
5 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/gl.c b/modules/video_output/gl.c
index 082aa78..91787cb 100644
--- a/modules/video_output/gl.c
+++ b/modules/video_output/gl.c
@@ -249,6 +249,10 @@ static int Control (vout_display_t *vd, int query, va_list ap)
vlc_gl_ReleaseCurrent (sys->gl);
return VLC_SUCCESS;
}
+ case VOUT_DISPLAY_CHANGE_VIEWPOINT:
+ return vout_display_opengl_SetViewpoint (sys->vgl,
+ &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+
default:
msg_Err (vd, "Unknown request %d", query);
}
diff --git a/modules/video_output/ios2.m b/modules/video_output/ios2.m
index 797c615..7c77b1b 100644
--- a/modules/video_output/ios2.m
+++ b/modules/video_output/ios2.m
@@ -425,6 +425,10 @@ static int Control(vout_display_t *vd, int query, va_list ap)
return VLC_SUCCESS;
}
+ case VOUT_DISPLAY_CHANGE_VIEWPOINT:
+ return vout_display_opengl_SetViewpoint(sys->vgl,
+ &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+
case VOUT_DISPLAY_RESET_PICTURES:
vlc_assert_unreachable ();
default:
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 2c3dcd3..c93c57b 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -432,9 +432,14 @@ static int Control (vout_display_t *vd, int query, va_list ap)
[NSCursor setHiddenUntilMouseMoves: YES];
return VLC_SUCCESS;
}
-
+
+ case VOUT_DISPLAY_CHANGE_VIEWPOINT:
+ return vout_display_opengl_SetViewpoint (sys->vgl,
+ &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+
case VOUT_DISPLAY_RESET_PICTURES:
vlc_assert_unreachable ();
+
default:
msg_Err (vd, "Unknown request in Mac OS X vout display");
return VLC_EGENERIC;
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 01bae19..cd7339b 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -147,6 +147,17 @@ 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)
+ return vout_display_opengl_SetViewpoint(sys->vgl,
+ &va_arg (args, const vout_display_cfg_t* )->viewpoint);
+
+ return CommonControl(vd, query, args);
+}
+
/**
* It creates an OpenGL vout display.
*/
@@ -227,7 +238,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;
diff --git a/modules/video_output/xcb/glx.c b/modules/video_output/xcb/glx.c
index 469f9ec..e87704a 100644
--- a/modules/video_output/xcb/glx.c
+++ b/modules/video_output/xcb/glx.c
@@ -247,6 +247,10 @@ static int Control (vout_display_t *vd, int query, va_list ap)
xcb_flush (sys->conn);
return VLC_SUCCESS;
+ case VOUT_DISPLAY_CHANGE_VIEWPOINT:
+ return vout_display_opengl_SetViewpoint (sys->vgl,
+ &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+
case VOUT_DISPLAY_RESET_PICTURES:
vlc_assert_unreachable ();
default:
--
2.9.3
More information about the vlc-devel
mailing list