[vlc-commits] vout: opengl: handle VOUT_DISPLAY_CHANGE_VIEWPOINT
Steve Lhomme
git at videolan.org
Tue Nov 15 18:14:01 CET 2016
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Tue Nov 15 17:43:33 2016 +0100| [c194d6d7591aee3b5fa9384666a1564270936511] | committer: Thomas Guillem
vout: opengl: handle VOUT_DISPLAY_CHANGE_VIEWPOINT
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c194d6d7591aee3b5fa9384666a1564270936511
---
modules/video_output/caopengllayer.m | 4 ++++
modules/video_output/gl.c | 3 +++
modules/video_output/ios2.m | 4 ++++
modules/video_output/macosx.m | 6 +++++-
modules/video_output/win32/glwin32.c | 13 ++++++++++++-
modules/video_output/xcb/glx.c | 4 ++++
6 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index 0c39fde..1be3ee6 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -405,6 +405,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/gl.c b/modules/video_output/gl.c
index d9e48d3..e272396 100644
--- a/modules/video_output/gl.c
+++ b/modules/video_output/gl.c
@@ -250,6 +250,9 @@ 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 1f7c24b..3e1c8b4 100644
--- a/modules/video_output/ios2.m
+++ b/modules/video_output/ios2.m
@@ -426,6 +426,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 0e7a67c..3ba8fd0 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -435,7 +435,11 @@ 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:
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 810c063..07c2425 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.
*/
@@ -228,7 +239,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 7919311..a7fb71b 100644
--- a/modules/video_output/xcb/glx.c
+++ b/modules/video_output/xcb/glx.c
@@ -248,6 +248,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:
More information about the vlc-commits
mailing list