diff --git a/configure.ac b/configure.ac index 1d386f96fe..a1c7df5d7f 100644 --- a/configure.ac +++ b/configure.ac @@ -1088,6 +1088,14 @@ AG_GST_CHECK_FEATURE(MSDK, [Intel MediaSDK], msdk, [ [ AC_DEFINE(HAVE_LIBMFX, 1, [Define if mfx_dispatcher is available]) HAVE_MSDK="yes" + dnl external msdk dispatchers sometimes install headers into prefix/mfx/ + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$LIBMFX_CFLAGS $save_CPPFLAGS" + AC_CHECK_HEADER(mfx/mfxdefs.h, [HAVE_MFX_MFXDEFS_H=1], [HAVE_MFX_MFXDEFS_H=0]) + if test $HAVE_MFX_MFXDEFS_H -eq 1; then + AC_DEFINE(HAVE_MFX_MFXDEFS_H, 1, [Define if mfx/mfxdefs.h available]) + fi + CPPFLAGS="$save_CPPFLAGS" ], [ AC_ARG_WITH([msdk-prefix], AS_HELP_STRING([--with-msdk-prefix], diff --git a/sys/msdk/gstmsdkh265dec.c b/sys/msdk/gstmsdkh265dec.c index f89cf0acc6..66c9e138c6 100644 --- a/sys/msdk/gstmsdkh265dec.c +++ b/sys/msdk/gstmsdkh265dec.c @@ -33,7 +33,7 @@ # include #endif -#ifdef HAVE_LIBMFX +#ifdef HAVE_MFX_MFXDEFS_H # include #else # include "mfxplugin.h" diff --git a/sys/msdk/gstmsdkh265enc.c b/sys/msdk/gstmsdkh265enc.c index 7cd39061d6..3ae9bbd257 100644 --- a/sys/msdk/gstmsdkh265enc.c +++ b/sys/msdk/gstmsdkh265enc.c @@ -33,7 +33,7 @@ # include #endif -#ifdef HAVE_LIBMFX +#ifdef HAVE_MFX_MFXDEFS_H # include #else # include "mfxplugin.h" diff --git a/sys/msdk/gstmsdkmjpegdec.c b/sys/msdk/gstmsdkmjpegdec.c index ef377751e4..84e00ef3b9 100644 --- a/sys/msdk/gstmsdkmjpegdec.c +++ b/sys/msdk/gstmsdkmjpegdec.c @@ -33,7 +33,7 @@ # include #endif -#ifdef HAVE_LIBMFX +#ifdef HAVE_MFX_MFXDEFS_H # include # include #else diff --git a/sys/msdk/gstmsdkmjpegenc.c b/sys/msdk/gstmsdkmjpegenc.c index 00230f8bf5..aed53d2cf4 100644 --- a/sys/msdk/gstmsdkmjpegenc.c +++ b/sys/msdk/gstmsdkmjpegenc.c @@ -33,7 +33,7 @@ # include #endif -#ifdef HAVE_LIBMFX +#ifdef HAVE_MFX_MFXDEFS_H # include # include #else diff --git a/sys/msdk/gstmsdkvp8dec.c b/sys/msdk/gstmsdkvp8dec.c index 1b5a1f07de..abe7402329 100644 --- a/sys/msdk/gstmsdkvp8dec.c +++ b/sys/msdk/gstmsdkvp8dec.c @@ -34,7 +34,7 @@ # include #endif -#ifdef HAVE_LIBMFX +#ifdef HAVE_MFX_MFXDEFS_H # include # include #else diff --git a/sys/msdk/gstmsdkvp8enc.c b/sys/msdk/gstmsdkvp8enc.c index 4c161564fc..bc51ab59e9 100644 --- a/sys/msdk/gstmsdkvp8enc.c +++ b/sys/msdk/gstmsdkvp8enc.c @@ -33,7 +33,7 @@ # include #endif -#ifdef HAVE_LIBMFX +#ifdef HAVE_MFX_MFXDEFS_H # include # include #else diff --git a/sys/msdk/msdk.h b/sys/msdk/msdk.h index d1c874cbaf..d56bb3a814 100644 --- a/sys/msdk/msdk.h +++ b/sys/msdk/msdk.h @@ -41,7 +41,7 @@ #include #include -#ifdef HAVE_LIBMFX +#ifdef HAVE_MFX_MFXDEFS_H # include #else # include "mfxvideo.h" diff --git a/sys/msdk/msdk_libva.h b/sys/msdk/msdk_libva.h index 9f0187076b..691ea25a00 100644 --- a/sys/msdk/msdk_libva.h +++ b/sys/msdk/msdk_libva.h @@ -40,7 +40,7 @@ #include #include -#ifdef HAVE_LIBMFX +#ifdef HAVE_MFX_MFXDEFS_H # include #else # include "mfxvideo.h"