Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Lhomme <robux4@gmail.com>2015-07-26 14:35:47 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-26 23:02:20 +0300
commitc5327df838396e7c43a56bdd141c0f01ba3edc94 (patch)
tree048f11660a1dbd07c4f12e55968a25d834084848 /libavcodec/dxva2_internal.h
parentf21fcf60eca9f9fde80095eea11b0d54b116d683 (diff)
force WINAPI_FAMILY to WINAPI_FAMILY_DESKTOP_APP to use DVXA
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. Building with WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP is disallowed when targeting ARM. ("Compiling Desktop applications for the ARM platform is not supported.") So we set _CRT_BUILD_DESKTOP_APP to 0 to tell the runtime not to detect some issues with this mismatching. The same tweaks to detect if the API is available is done in dxva2_internal.h when compiling each DXVA2/D3D11VA decoders. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dxva2_internal.h')
-rw-r--r--libavcodec/dxva2_internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h
index 426de9dc16..d5cc01ef4f 100644
--- a/libavcodec/dxva2_internal.h
+++ b/libavcodec/dxva2_internal.h
@@ -27,6 +27,9 @@
#include "config.h"
+/* define the proper COM entries before forcing desktop APIs */
+#include <objbase.h>
+
#if CONFIG_DXVA2
#include "dxva2.h"
#endif
@@ -35,6 +38,10 @@
#endif
#if HAVE_DXVA_H
+/* dxva.h defines nothing otherwise but it works */
+#undef WINAPI_FAMILY
+#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
+#define _CRT_BUILD_DESKTOP_APP 0
#include <dxva.h>
#endif