From: Steve Lhomme <[email protected]>
The struct definitions in dxva.h, which are necessary in order to
actually use d3d11va, are hidden when WINAPI_FAMILY targets Windows Phone
or WindowsRT.
Since this is only struct definitions, it doesn't affect the runtime
compatibility.
Building with WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP is disallowed
when targeting ARM. ("Compiling Desktop applications for the ARM
platform is not supported.")
Disable this error during the configure test. When actually building
the libavcodec source files, the header that causes the errors
(crtdefs.h or corecrt.h) has already been included before it is
redefined.
---
configure | 2 +-
libavcodec/dxva2_internal.h | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 973edb4..b76f838 100755
--- a/configure
+++ b/configure
@@ -4270,7 +4270,7 @@ check_lib2 "windows.h psapi.h" GetProcessMemoryInfo
-lpsapi
check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
-check_type "windows.h dxva.h" "DXVA_PicParams_HEVC"
+check_type "windows.h dxva.h" "DXVA_PicParams_HEVC"
-DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1
check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0600
diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h
index 3b651a4..d030ec4 100644
--- a/libavcodec/dxva2_internal.h
+++ b/libavcodec/dxva2_internal.h
@@ -34,6 +34,10 @@
#include "d3d11va.h"
#endif
#if HAVE_DXVA_H
+/* When targeting WINAPI_FAMILY_PHONE_APP or WINAPI_FAMILY_APP, dxva.h
+ * defines nothing. Force the struct definitions to be visible. */
+#undef WINAPI_FAMILY
+#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
#include <dxva.h>
#endif
--
1.8.1.2
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel