[FFmpeg-devel] [PATCH] force WINAPI_FAMILY to WINAPI_FAMILY_DESKTOP_APP to use DVXA
Steve Lhomme
robux4 at gmail.com
Thu Jul 23 19:09:50 CEST 2015
otherwise the API is hidden for Windows Phone / WindowsRT when in fact
it's there and working
---
configure | 2 +-
libavcodec/dxva2_internal.h | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 84b7826..d2ebfa9 100755
--- a/configure
+++ b/configure
@@ -4264,7 +4264,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
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..9b6bbbc3 100644
--- a/libavcodec/dxva2_internal.h
+++ b/libavcodec/dxva2_internal.h
@@ -34,6 +34,9 @@
#include "d3d11va.h"
#endif
#if HAVE_DXVA_H
+/* dxva.h defines nothing otherwise but it works */
+#undef WINAPI_FAMILY
+#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
#include <dxva.h>
#endif
--
2.4.5
More information about the ffmpeg-devel
mailing list