[vlc-devel] [PATCH 3.0 14/16] direct3d9: Disable OpenGL interop if OpenGL is unavailable
Martin Storsjö
martin at martin.st
Fri Jun 19 23:27:05 CEST 2020
On Windows on ARM/ARM64, OpenGL isn't available. (For emulation
of i386 binaries, there is an opengl32.dll, but it's only the
fallback software renderer, nothing else. For ARM and ARM64, there
is no opengl32.dll.)
(cherry picked from commit 0d0aef05c157c0225a4a0ca1c9b2d91797616f35)
---
configure.ac | 3 +++
modules/video_output/win32/direct3d9.c | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/configure.ac b/configure.ac
index ac4ba8209d..50f40e2d98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3103,6 +3103,9 @@ PKG_CHECK_MODULES([GL], [gl], [
AC_MSG_RESULT([${have_gl}])
])
AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])
+AS_IF([test "${have_gl}" = "yes"], [
+ AC_DEFINE([HAVE_GL], 1, [Defined if having OpenGL])
+])
dnl OpenGL ES 2: depends on EGL 1.1
PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled])
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 0548738207..669af0f27d 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -110,10 +110,12 @@ vlc_module_begin ()
add_shortcut("direct3d9", "direct3d")
set_callbacks(Open, Close)
+#ifdef HAVE_GL
add_submodule()
set_description("DX OpenGL surface converter for D3D9")
set_capability("glconv", 1)
set_callbacks(GLConvOpen, GLConvClose)
+#endif
vlc_module_end ()
/*****************************************************************************
@@ -2031,6 +2033,7 @@ static int FindShadersCallback(vlc_object_t *object, const char *name,
}
+#ifdef HAVE_GL
#include "../opengl/converter.h"
#include <GL/wglew.h>
@@ -2249,3 +2252,4 @@ error:
GLConvClose(obj);
return VLC_EGENERIC;
}
+#endif
--
2.17.1
More information about the vlc-devel
mailing list