summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2017-07-04 20:03:00 +0300
committerwm4 <nfxjfg@googlemail.com>2017-08-10 11:58:25 +0200
commit9042402ec78ad050eb7ad129610450ef90371df4 (patch)
tree7497236ff765a77c692dca0f98d7d63edf43cebe /configure
parentc100330a8ff4deef2a4994a9e55d387a00ea3cff (diff)
downloadffmpeg-streaming-9042402ec78ad050eb7ad129610450ef90371df4.zip
ffmpeg-streaming-9042402ec78ad050eb7ad129610450ef90371df4.tar.gz
d3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY
If using the winstore compat library, a fallback LoadLibrary function does exist, that only calls LoadPackagedLibrary though (which doesn't work for dynamically loading d3d11 DLLs). Therefore explicitly check the targeted API family instead. Make this check a reusable HAVE_* component which other parts of the libraries can check when necessary as well. Signed-off-by: Martin Storsjö <martin@martin.st> Merged from Libav commit 4d330da006fe48178.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure b/configure
index 66c7b94..7201941 100755
--- a/configure
+++ b/configure
@@ -2072,6 +2072,7 @@ HAVE_LIST="
sndio
texi2html
threads
+ uwp
vaapi_drm
vaapi_x11
vdpau_x11
@@ -6134,7 +6135,18 @@ check_func_headers "windows.h" CreateDIBSection "$gdigrab_indev_extralibs"
# d3d11va requires linking directly to dxgi and d3d11 if not building for
# the desktop api partition
-enabled LoadLibrary || d3d11va_extralibs="-ldxgi -ld3d11"
+check_cpp <<EOF && enable uwp && d3d11va_extralibs="-ldxgi -ld3d11"
+#ifdef WINAPI_FAMILY
+#include <winapifamily.h>
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+#error desktop, not uwp
+#else
+// WINAPI_FAMILY_APP, WINAPI_FAMILY_PHONE_APP => UWP
+#endif
+#else
+#error no family set
+#endif
+EOF
enabled vaapi &&
check_lib vaapi va/va.h vaInitialize -lva
OpenPOWER on IntegriCloud