Commit 87038073 authored by Rafaël Carré's avatar Rafaël Carré

Dxva2 is only available in Windows Vista and above

Define _WIN32_WINNT to 0x600 when checking/using dxva2 headers
Continue to use a lower version to retain XP compatibility for the rest of VLC
parent 8cd8da63
......@@ -2443,7 +2443,9 @@ AS_IF([test "${enable_dxva2}" != "no"], [
AS_IF([test "${enable_dxva2}" = "yes"],
[AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
[AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
])
], [#undef _WIN32_WINNT
/* DXVA2 is only available in Vista and above */
#define _WIN32_WINNT 0x600])
],[
AS_IF([test "${enable_dxva2}" = "yes"],
[AC_MSG_ERROR([Could not find required dxva2api.h])],
......
......@@ -27,6 +27,15 @@
# include "config.h"
#endif
#if defined(HAVE_LIBAVCODEC_AVCODEC_H) && defined(HAVE_AVCODEC_DXVA2)
# if _WIN32_WINNT < 0x600
/* dxva2 needs Vista support */
# undef _WIN32_WINNT
# define _WIN32_WINNT 0x600
# endif
#endif
#include <vlc_common.h>
#include <vlc_picture.h>
#include <vlc_fourcc.h>
......@@ -37,6 +46,7 @@
# include <libavcodec/avcodec.h>
# ifdef HAVE_AVCODEC_DXVA2
# define DXVA2API_USE_BITFIELDS
# define COBJMACROS
# include <libavcodec/dxva2.h>
# endif
#else
......
......@@ -29,6 +29,14 @@
# include "config.h"
#endif
#if defined(HAVE_LIBAVCODEC_AVCODEC_H) && defined(HAVE_AVCODEC_DXVA2)
# if _WIN32_WINNT < 0x600
/* dxva2 needs Vista support */
# undef _WIN32_WINNT
# define _WIN32_WINNT 0x600
# endif
#endif
#include <vlc_common.h>
#include <vlc_codec.h>
#include <vlc_avcodec.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment