[vlc-devel] [PATCH 10/16] vout: win32: fallback to glwin32 for non rectangular projections
Thomas Guillem
thomas at gllm.fr
Wed Nov 9 18:33:04 CET 2016
From: Steve Lhomme <robux4 at videolabs.io>
The modified vouts are not written to handle anything but
PROJECTION_MODE_RECTANGULAR, if any other projection mode is desired, these
changes will allow for glwin32 to take precedence.
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
---
modules/video_output/win32/direct2d.c | 5 +++++
modules/video_output/win32/direct3d11.c | 5 +++++
modules/video_output/win32/direct3d9.c | 5 +++++
modules/video_output/win32/directdraw.c | 5 +++++
modules/video_output/win32/wingdi.c | 5 +++++
5 files changed, 25 insertions(+)
diff --git a/modules/video_output/win32/direct2d.c b/modules/video_output/win32/direct2d.c
index 0e489b8..38bb434 100644
--- a/modules/video_output/win32/direct2d.c
+++ b/modules/video_output/win32/direct2d.c
@@ -83,6 +83,11 @@ static int Open(vlc_object_t *object)
vout_display_t *vd = (vout_display_t *)object;
vout_display_sys_t *sys;
+ if (!vd->obj.force && vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR) {
+ msg_Dbg(vd, "non rectangular projection not supported");
+ return VLC_EBADVAR;
+ }
+
vd->sys = sys = calloc(1, sizeof(*sys));
if (!sys)
return VLC_ENOMEM;
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index d551e15..45c79ea 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -488,6 +488,11 @@ static int Open(vlc_object_t *object)
{
vout_display_t *vd = (vout_display_t *)object;
+ if (!vd->obj.force && vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR) {
+ msg_Dbg(vd, "non rectangular projection not supported");
+ return VLC_EBADVAR;
+ }
+
#if !VLC_WINSTORE_APP
int ret = OpenHwnd(vd);
#else
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 6800e9a..ad40892 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -178,6 +178,11 @@ static int Open(vlc_object_t *object)
if(GetVersionEx(&winVer) && winVer.dwMajorVersion < 6 && !object->obj.force)
return VLC_EGENERIC;
+ if (!vd->obj.force && vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR) {
+ msg_Dbg(vd, "non rectangular projection not supported");
+ return VLC_EBADVAR;
+ }
+
/* Allocate structure */
vd->sys = sys = calloc(1, sizeof(vout_display_sys_t));
if (!sys)
diff --git a/modules/video_output/win32/directdraw.c b/modules/video_output/win32/directdraw.c
index c2f5eea..e660851d 100644
--- a/modules/video_output/win32/directdraw.c
+++ b/modules/video_output/win32/directdraw.c
@@ -166,6 +166,11 @@ static int Open(vlc_object_t *object)
vout_display_t *vd = (vout_display_t *)object;
vout_display_sys_t *sys;
+ if (!vd->obj.force && vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR) {
+ msg_Dbg(vd, "non rectangular projection not supported");
+ return VLC_EBADVAR;
+ }
+
/* Allocate structure */
vd->sys = sys = calloc(1, sizeof(*sys));
if (!sys)
diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c
index ea4b237..67011e8 100644
--- a/modules/video_output/win32/wingdi.c
+++ b/modules/video_output/win32/wingdi.c
@@ -72,6 +72,11 @@ static int Open(vlc_object_t *object)
vout_display_t *vd = (vout_display_t *)object;
vout_display_sys_t *sys;
+ if (!vd->obj.force && vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR) {
+ msg_Dbg(vd, "non rectangular projection not supported");
+ return VLC_EBADVAR;
+ }
+
vd->sys = sys = calloc(1, sizeof(*sys));
if (!sys)
return VLC_ENOMEM;
--
2.9.3
More information about the vlc-devel
mailing list