msdk: meson: check whether mfxExtVP9Param is defined
authorHaihao Xiang <haihao.xiang@intel.com>
Wed, 12 Feb 2020 03:23:18 +0000 (11:23 +0800)
committerHaihao Xiang <haihao.xiang@intel.com>
Fri, 13 Mar 2020 01:29:04 +0000 (01:29 +0000)
User reported MFX_VERSION is 1026 however the build is broken[1], so add
the check for mfxExtVP9Param to make sure it can be build without
compiler error.

In addtion, it fixes a stupid typo (#endif') introduced by me.

[1] https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/988#note_408093

sys/msdk/meson.build

index de02e03..33596c9 100644 (file)
@@ -77,12 +77,16 @@ if cxx.has_header('mfxvp9.h', args: '-I' + mfx_incdir)
   cdata.set10('USE_MSDK_VP9_DEC', 1)
 endif
 
-# mfx 1.26+ is required to support raw VP9 stream
+# Usually MFX_VERSION 1026+ is required to support raw VP9 stream, however Fedora 30 has MFX_VERSION==1026
+# but without support for raw VP9 stream, so mfxExtVP9Param is checked as well.
+# See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/988#note_408093
 mfx_ver126_check_code = '''
 #include <mfxdefs.h>
+#include <mfxstructures.h>
 #if MFX_VERSION < 1026
 #error "The current version of mfx doesn't support raw vp9 stream"
-#endif'
+#endif
+mfxExtVP9Param ext;
 '''
 
 have_mfx_ver126 = cc.compiles(mfx_ver126_check_code,