[vlc-devel] [PATCH 04/22] d3d11va: fix the device creation under Windows Phone
Steve Lhomme
robux4 at gmail.com
Fri Jul 31 16:54:48 CEST 2015
---
modules/codec/avcodec/d3d11va.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 6f7d760..e6c270f 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -32,6 +32,9 @@
# include "config.h"
#endif
+# undef WINAPI_FAMILY
+# define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
+
#include <assert.h>
#include <vlc_common.h>
@@ -62,6 +65,10 @@ vlc_module_begin()
set_callbacks(Open, Close)
vlc_module_end()
+#if VLC_WINSTORE_APP
+#define pf_CreateDevice D3D11CreateDevice
+#endif
+
#include <initguid.h> /* must be last included to not redefine existing GUIDs */
/* dxva2api.h GUIDs: http://msdn.microsoft.com/en-us/library/windows/desktop/ms697067(v=vs100).aspx
@@ -435,6 +442,7 @@ static int D3dCreateDevice(vlc_va_t *va)
return VLC_SUCCESS;
}
+#if !VLC_WINSTORE_APP
/* */
PFN_D3D11_CREATE_DEVICE pf_CreateDevice;
pf_CreateDevice = (void *)GetProcAddress(dx_sys->hdecoder_dll, "D3D11CreateDevice");
@@ -442,6 +450,7 @@ static int D3dCreateDevice(vlc_va_t *va)
msg_Err(va, "Cannot locate reference to D3D11CreateDevice ABI in DLL");
return VLC_EGENERIC;
}
+#endif
UINT creationFlags = D3D11_CREATE_DEVICE_VIDEO_SUPPORT;
#if !defined(NDEBUG) //&& defined(_MSC_VER)
--
2.4.2
More information about the vlc-devel
mailing list