#include <gst/vaapi/gstvaapiminiobject.h>
#include <gst/vaapi/gstvaapidecoder.h>
-#if USE_VP8_DECODER
-#include <va/va_dec_vp8.h>
-#endif
G_BEGIN_DECLS
#include <va/va_drmcommon.h>
#endif
+/* VA-API < 0.37 doesn't include sub core APIs in va.h */
+#if !VA_CHECK_VERSION(0,37,0)
#ifdef HAVE_VA_VA_DEC_HEVC_H
# include <va/va_dec_hevc.h>
#endif
+#ifdef HAVE_VA_VA_DEC_JPEG_H
+# include <va/va_dec_jpeg.h>
+#endif
+#ifdef HAVE_VA_VA_DEC_VP8_H
+# include <va/va_dec_vp8.h>
+#endif
+#ifdef HAVE_VA_VA_DEC_VP9_H
+# include <va/va_dec_vp9.h>
+#endif
+#ifdef HAVE_VA_VA_ENC_HEVC_H
+# include <va/va_enc_hevc.h>
+#endif
+#ifdef HAVE_VA_VA_ENC_H264_H
+# include <va/va_enc_h264.h>
+#endif
+#ifdef HAVE_VA_VA_ENC_JPEG_H
+# include <va/va_enc_jpeg.h>
+#endif
+#ifdef HAVE_VA_VA_ENC_MPEG2_H
+# include <va/va_enc_mpeg2.h>
+#endif
+#ifdef HAVE_VA_VA_ENC_VP8_H
+# include <va/va_enc_vp8.h>
+#endif
+#ifdef HAVE_VA_VA_ENC_VP9_H
+# include <va/va_enc_vp9.h>
+#endif
+#ifdef HAVE_VA_VA_VPP_H
+# include <va/va_vpp.h>
+#endif
+#endif
#endif /* GST_VAAPI_COMPAT_H */
#include "gstvaapidisplay_priv.h"
#include "gstvaapiobject_priv.h"
-#ifdef HAVE_VA_VA_DEC_JPEG_H
-# include <va/va_dec_jpeg.h>
-#endif
-
#define DEBUG 1
#include "gstvaapidebug.h"
#include "gstvaapiobject_priv.h"
#include "gstvaapicompat.h"
-#ifdef HAVE_VA_VA_DEC_VP8_H
-#include <va/va_dec_vp8.h>
-#endif
#define DEBUG 1
#include "gstvaapidebug.h"
#include "gstvaapiobject_priv.h"
#include "gstvaapicompat.h"
-#ifdef HAVE_VA_VA_DEC_VP9_H
-#include <va/va_dec_vp9.h>
-#endif
#define DEBUG 1
#include "gstvaapidebug.h"
#include "sysdeps.h"
#include <va/va.h>
-#include <va/va_enc_h264.h>
#include <gst/base/gstbitwriter.h>
#include <gst/codecparsers/gsth264parser.h>
#include "gstvaapicompat.h"
#include "sysdeps.h"
#include <math.h>
#include <va/va.h>
-#include <va/va_enc_hevc.h>
#include <gst/base/gstbitwriter.h>
#include <gst/codecparsers/gsth265parser.h>
#include "gstvaapicompat.h"
#include "sysdeps.h"
#include <va/va.h>
-#include <va/va_enc_jpeg.h>
#include <gst/base/gstbitwriter.h>
#include <gst/codecparsers/gstjpegparser.h>
#include "gstvaapicompat.h"
#include "sysdeps.h"
#include <math.h>
#include <va/va.h>
-#include <va/va_enc_mpeg2.h>
#include <gst/base/gstbitwriter.h>
#include "gstvaapicompat.h"
#include "gstvaapiencoder_mpeg2.h"
#include "sysdeps.h"
#include <va/va.h>
-#include <va/va_enc_vp8.h>
#include <gst/base/gstbitwriter.h>
#include <gst/codecparsers/gstvp8parser.h>
#include "gstvaapicompat.h"
#include "sysdeps.h"
#include <va/va.h>
-#include <va/va_enc_vp9.h>
#include <gst/base/gstbitwriter.h>
#include <gst/codecparsers/gstvp9parser.h>
#include "gstvaapicompat.h"
*/
#include "sysdeps.h"
+#include "gstvaapicompat.h"
#include "gstvaapifilter.h"
#include "gstvaapiutils.h"
#include "gstvaapivalue.h"
#include "gstvaapisurface_priv.h"
#include "gstvaapiutils_core.h"
-#if USE_VA_VPP
-# include <va/va_vpp.h>
-#endif
-
#define DEBUG 1
#include "gstvaapidebug.h"
#include <stdio.h>
#include <stdarg.h>
-#if USE_VA_VPP
-# include <va/va_vpp.h>
-#endif
-
#define DEBUG 1
#include "gstvaapidebug.h"
cdata.set('VA_DRIVERS_PATH', '"@0@"'.format(runcmd.stdout().strip()))
endif
+if libva_dep.version().version_compare('< 0.38.0')
+ check_headers = [
+ [USE_H265_DECODER, 'HAVE_VA_VA_DEC_HEVC_H'],
+ [USE_H265_ENCODER, 'HAVE_VA_VA_ENC_HEVC_H'],
+ [USE_JPEG_DECODER, 'HAVE_VA_VA_DEC_JPEG_H'],
+ [USE_JPEG_ENCODER, 'HAVE_VA_VA_ENC_JPEG_H'],
+ [USE_VP8_DECODER, 'HAVE_VA_VA_DEC_VP8_H'],
+ [USE_VP8_ENCODER, 'HAVE_VA_VA_ENC_VP8_H'],
+ [USE_VP9_DECODER, 'HAVE_VA_VA_DEC_VP9_H'],
+ [USE_VP9_ENCODER, 'HAVE_VA_VA_DEC_VP9_H'],
+ [USE_VPP, 'HAVE_VA_VA_VPP_H'],
+ ]
+ foreach h : check_headers
+ if h.get(0)
+ cdata.set(h.get(1), 1)
+ endif
+ endforeach
+
+ if USE_ENCODERS
+ check_headers = [
+ ['HAVE_VA_VA_ENC_MPEG2_H', 'va/va_enc_mpeg2.h'],
+ ['HAVE_VA_VA_ENC_H264_H', 'va/va_enc_h264.h'],
+ ]
+ foreach h : check_headers
+ if cc.has_header(h.get(1), dependencies: libva_dep, prefix: '#include <va/va.h>')
+ cdata.set(h.get(0), 1)
+ endif
+ endforeach
+ endif
+endif
+
api_version = '1.0'
soversion = 0
# maintaining compatibility with the previous libtool versioning