build: consolidate the VA sub API includes

Include all VA sub APIs headers in a single point (gstvaapicompat.h),
since they are all already included in va.h after VA-API 0.38.

https://bugzilla.gnome.org/show_bug.cgi?id=786119
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-08-10 13:11:04 +02:00
parent 1789c6090f
commit 9891f1a9e2
14 changed files with 65 additions and 27 deletions

View file

@ -27,9 +27,6 @@
#include <gst/vaapi/gstvaapiminiobject.h> #include <gst/vaapi/gstvaapiminiobject.h>
#include <gst/vaapi/gstvaapidecoder.h> #include <gst/vaapi/gstvaapidecoder.h>
#if USE_VP8_DECODER
#include <va/va_dec_vp8.h>
#endif
G_BEGIN_DECLS G_BEGIN_DECLS

View file

@ -46,8 +46,41 @@
#include <va/va_drmcommon.h> #include <va/va_drmcommon.h>
#endif #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 #ifdef HAVE_VA_VA_DEC_HEVC_H
# include <va/va_dec_hevc.h> # include <va/va_dec_hevc.h>
#endif #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 */ #endif /* GST_VAAPI_COMPAT_H */

View file

@ -36,10 +36,6 @@
#include "gstvaapidisplay_priv.h" #include "gstvaapidisplay_priv.h"
#include "gstvaapiobject_priv.h" #include "gstvaapiobject_priv.h"
#ifdef HAVE_VA_VA_DEC_JPEG_H
# include <va/va_dec_jpeg.h>
#endif
#define DEBUG 1 #define DEBUG 1
#include "gstvaapidebug.h" #include "gstvaapidebug.h"

View file

@ -35,9 +35,6 @@
#include "gstvaapiobject_priv.h" #include "gstvaapiobject_priv.h"
#include "gstvaapicompat.h" #include "gstvaapicompat.h"
#ifdef HAVE_VA_VA_DEC_VP8_H
#include <va/va_dec_vp8.h>
#endif
#define DEBUG 1 #define DEBUG 1
#include "gstvaapidebug.h" #include "gstvaapidebug.h"

View file

@ -34,9 +34,6 @@
#include "gstvaapiobject_priv.h" #include "gstvaapiobject_priv.h"
#include "gstvaapicompat.h" #include "gstvaapicompat.h"
#ifdef HAVE_VA_VA_DEC_VP9_H
#include <va/va_dec_vp9.h>
#endif
#define DEBUG 1 #define DEBUG 1
#include "gstvaapidebug.h" #include "gstvaapidebug.h"

View file

@ -28,7 +28,6 @@
#include "sysdeps.h" #include "sysdeps.h"
#include <va/va.h> #include <va/va.h>
#include <va/va_enc_h264.h>
#include <gst/base/gstbitwriter.h> #include <gst/base/gstbitwriter.h>
#include <gst/codecparsers/gsth264parser.h> #include <gst/codecparsers/gsth264parser.h>
#include "gstvaapicompat.h" #include "gstvaapicompat.h"

View file

@ -23,7 +23,6 @@
#include "sysdeps.h" #include "sysdeps.h"
#include <math.h> #include <math.h>
#include <va/va.h> #include <va/va.h>
#include <va/va_enc_hevc.h>
#include <gst/base/gstbitwriter.h> #include <gst/base/gstbitwriter.h>
#include <gst/codecparsers/gsth265parser.h> #include <gst/codecparsers/gsth265parser.h>
#include "gstvaapicompat.h" #include "gstvaapicompat.h"

View file

@ -22,7 +22,6 @@
#include "sysdeps.h" #include "sysdeps.h"
#include <va/va.h> #include <va/va.h>
#include <va/va_enc_jpeg.h>
#include <gst/base/gstbitwriter.h> #include <gst/base/gstbitwriter.h>
#include <gst/codecparsers/gstjpegparser.h> #include <gst/codecparsers/gstjpegparser.h>
#include "gstvaapicompat.h" #include "gstvaapicompat.h"

View file

@ -24,7 +24,6 @@
#include "sysdeps.h" #include "sysdeps.h"
#include <math.h> #include <math.h>
#include <va/va.h> #include <va/va.h>
#include <va/va_enc_mpeg2.h>
#include <gst/base/gstbitwriter.h> #include <gst/base/gstbitwriter.h>
#include "gstvaapicompat.h" #include "gstvaapicompat.h"
#include "gstvaapiencoder_mpeg2.h" #include "gstvaapiencoder_mpeg2.h"

View file

@ -22,7 +22,6 @@
#include "sysdeps.h" #include "sysdeps.h"
#include <va/va.h> #include <va/va.h>
#include <va/va_enc_vp8.h>
#include <gst/base/gstbitwriter.h> #include <gst/base/gstbitwriter.h>
#include <gst/codecparsers/gstvp8parser.h> #include <gst/codecparsers/gstvp8parser.h>
#include "gstvaapicompat.h" #include "gstvaapicompat.h"

View file

@ -22,7 +22,6 @@
#include "sysdeps.h" #include "sysdeps.h"
#include <va/va.h> #include <va/va.h>
#include <va/va_enc_vp9.h>
#include <gst/base/gstbitwriter.h> #include <gst/base/gstbitwriter.h>
#include <gst/codecparsers/gstvp9parser.h> #include <gst/codecparsers/gstvp9parser.h>
#include "gstvaapicompat.h" #include "gstvaapicompat.h"

View file

@ -21,6 +21,7 @@
*/ */
#include "sysdeps.h" #include "sysdeps.h"
#include "gstvaapicompat.h"
#include "gstvaapifilter.h" #include "gstvaapifilter.h"
#include "gstvaapiutils.h" #include "gstvaapiutils.h"
#include "gstvaapivalue.h" #include "gstvaapivalue.h"
@ -29,10 +30,6 @@
#include "gstvaapisurface_priv.h" #include "gstvaapisurface_priv.h"
#include "gstvaapiutils_core.h" #include "gstvaapiutils_core.h"
#if USE_VA_VPP
# include <va/va_vpp.h>
#endif
#define DEBUG 1 #define DEBUG 1
#include "gstvaapidebug.h" #include "gstvaapidebug.h"

View file

@ -31,10 +31,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#if USE_VA_VPP
# include <va/va_vpp.h>
#endif
#define DEBUG 1 #define DEBUG 1
#include "gstvaapidebug.h" #include "gstvaapidebug.h"

View file

@ -135,6 +135,37 @@ if runcmd.returncode() == 0
cdata.set('VA_DRIVERS_PATH', '"@0@"'.format(runcmd.stdout().strip())) cdata.set('VA_DRIVERS_PATH', '"@0@"'.format(runcmd.stdout().strip()))
endif 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' api_version = '1.0'
soversion = 0 soversion = 0
# maintaining compatibility with the previous libtool versioning # maintaining compatibility with the previous libtool versioning