vaapi: bump the minimum vaapi version requirement to 0.39.0

And reduce unnecessary API version and structures check as well.

https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/108
This commit is contained in:
Haihao Xiang 2018-12-24 12:58:53 +08:00 committed by Víctor Manuel Jáquez Leal
parent e4ae7d9879
commit 920b1ec7a8
24 changed files with 42 additions and 778 deletions

View file

@ -32,11 +32,7 @@ m4_define([gst_plugins_bad_version], [1.15.0.1])
m4_define([wayland_api_version], [1.0.2])
# VA-API minimum version number
m4_define([va_api_version], [0.30.4])
m4_define([va_api_enc_version], [0.34.0])
m4_define([va_api_drm_version], [0.33.0])
m4_define([va_api_x11_version], [0.31.0])
m4_define([va_api_wld_version], [0.33.0])
m4_define([va_api_version], [0.39.0])
# gtk-doc version number
# XXX: introspection annotations require gtk-doc >= 1.12
@ -93,10 +89,6 @@ GTKDOC_REQ=gtkdoc_version
dnl *** required versions of VA-API stuff ***
VAAPI_REQ=va_api_version
VAAPI_ENC_REQ=va_api_enc_version
VAAPI_DRM_REQ=va_api_drm_version
VAAPI_X11_REQ=va_api_x11_version
VAAPI_WLD_REQ=va_api_wld_version
dnl *** autotools stuff ****
@ -513,7 +505,7 @@ AC_DEFINE_UNQUOTED([VA_DRIVERS_PATH], ["$VA_DRIVERS_PATH"],
dnl VA/DRM API
if test $USE_DRM -eq 1; then
PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= $VAAPI_DRM_REQ],
PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= $VAAPI_REQ],
[
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_DRM_CFLAGS"
@ -524,240 +516,16 @@ fi
dnl VA/X11 API
if test $USE_X11 -eq 1; then
PKG_CHECK_MODULES(LIBVA_X11, [libva-x11 >= $VAAPI_X11_REQ],
PKG_CHECK_MODULES(LIBVA_X11, [libva-x11 >= $VAAPI_REQ],
[], [USE_X11=0])
fi
dnl Check for va_dec_jpeg.h header
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
AC_CHECK_HEADERS([va/va_dec_jpeg.h], [], [],
[
#include <va/va.h>
])
CPPFLAGS="$saved_CPPFLAGS"
dnl Check for JPEG decoding API (0.32.1+)
USE_JPEG_DECODER=0
AC_CACHE_CHECK([for JPEG decoding API],
[ac_cv_have_jpeg_decoding_api],
[
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
saved_LIBS="$LIBS"
LIBS="$LIBS $LIBVA_LIBS"
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
[[
#include <va/va.h>
#ifdef HAVE_VA_VA_DEC_JPEG_H
# include <va/va_dec_jpeg.h>
#endif
]],
[[
VAPictureParameterBufferJPEGBaseline pic_param;
VASliceParameterBufferJPEGBaseline slice_param;
VAHuffmanTableBufferJPEGBaseline huffman_table;
VAIQMatrixBufferJPEGBaseline iq_matrix;
]])
],
[ac_cv_have_jpeg_decoding_api="yes"],
[ac_cv_have_jpeg_decoding_api="no"])
CPPFLAGS="$saved_CPPFLAGS"
LIBS="$saved_LIBS"
])
AS_IF([test "x$ac_cv_have_jpeg_decoding_api" = "xyes"], [USE_JPEG_DECODER=1])
dnl Check for va_dec_vp8.h header
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
AC_CHECK_HEADERS([va/va_dec_vp8.h], [], [],
[
#include <va/va.h>
])
CPPFLAGS="$saved_CPPFLAGS"
dnl Check for VP8 decoding API (0.34+)
USE_VP8_DECODER=0
AC_CACHE_CHECK([for VP8 decoding API],
[ac_cv_have_vp8_decoding_api],
[
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
saved_LIBS="$LIBS"
LIBS="$LIBS $LIBVA_LIBS"
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
[[
#include <va/va.h>
#ifdef HAVE_VA_VA_DEC_VP8_H
# include <va/va_dec_vp8.h>
#endif
]],
[[
VAPictureParameterBufferVP8 pic_param;
VASliceParameterBufferVP8 slice_param;
VAProbabilityDataBufferVP8 prob_data;
VAIQMatrixBufferVP8 iq_matrix;
slice_param.slice_data_offset = 0;
slice_param.slice_data_flag = 0;
]])
],
[ac_cv_have_vp8_decoding_api="yes"],
[ac_cv_have_vp8_decoding_api="no"])
CPPFLAGS="$saved_CPPFLAGS"
LIBS="$saved_LIBS"
])
AS_IF([test "x$ac_cv_have_vp8_decoding_api" = "xyes"], [USE_VP8_DECODER=1])
dnl Check for va_dec_vp9.h header
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
AC_CHECK_HEADERS([va/va_dec_vp9.h], [], [],
[
#include <va/va.h>
])
CPPFLAGS="$saved_CPPFLAGS"
dnl Check for VP9 decoding API (0.37+)
USE_VP9_DECODER=0
AC_CACHE_CHECK([for VP9 decoding API],
[ac_cv_have_vp9_decoding_api],
[
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
saved_LIBS="$LIBS"
LIBS="$LIBS $LIBVA_LIBS"
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
[[
#include <va/va.h>
#ifdef HAVE_VA_VA_DEC_VP9_H
# include <va/va_dec_vp9.h>
#endif
]],
[[
VADecPictureParameterBufferVP9 pic_param;
VASliceParameterBufferVP9 slice_param;
VASegmentParameterVP9 seg_param;
slice_param.slice_data_offset = 0;
slice_param.slice_data_flag = 0;
]])
],
[ac_cv_have_vp9_decoding_api="yes"],
[ac_cv_have_vp9_decoding_api="no"])
CPPFLAGS="$saved_CPPFLAGS"
LIBS="$saved_LIBS"
])
AS_IF([test "x$ac_cv_have_vp9_decoding_api" = "xyes"], [USE_VP9_DECODER=1])
dnl Check for va_dec_hevc.h header
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
AC_CHECK_HEADERS([va/va_dec_hevc.h], [], [],
[
#include <va/va.h>
])
CPPFLAGS="$saved_CPPFLAGS"
dnl Check for HEVC decoding API (0.38+)
USE_H265_DECODER=0
AC_CACHE_CHECK([for HEVC decoding API],
[ac_cv_have_h265_decoding_api],
[
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
saved_LIBS="$LIBS"
LIBS="$LIBS $LIBVA_LIBS"
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
[[
#include <va/va.h>
#ifdef HAVE_VA_VA_DEC_HEVC_H
# include <va/va_dec_hevc.h>
#endif
]],
[[
VAPictureParameterBufferHEVC pic_param;
VASliceParameterBufferHEVC slice_param;
VAIQMatrixBufferHEVC iq_matrix;
slice_param.slice_data_offset = 0;
slice_param.slice_data_flag = 0;
]])
],
[ac_cv_have_h265_decoding_api="yes"],
[ac_cv_have_h265_decoding_api="no"])
CPPFLAGS="$saved_CPPFLAGS"
LIBS="$saved_LIBS"
])
AS_IF([test "x$ac_cv_have_h265_decoding_api" = "xyes"], [USE_H265_DECODER=1])
dnl Check for va_vpp.h header
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
AC_CHECK_HEADERS([va/va_vpp.h], [], [],
[
#include <va/va.h>
])
CPPFLAGS="$saved_CPPFLAGS"
dnl Check for vpp (video post-processing) support
USE_VA_VPP=0
AC_CACHE_CHECK([for video post-postprocessing API],
[ac_cv_have_va_vpp_api],
[
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
saved_LIBS="$LIBS"
LIBS="$LIBS $LIBVA_LIBS"
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
[[
#include <va/va.h>
#ifdef HAVE_VA_VA_VPP_H
# include <va/va_vpp.h>
#endif
]],
[[
VADisplay va_dpy;
VAContextID vpp_ctx;
VAProcFilterType filters[VAProcFilterCount];
unsigned int num_filters = VAProcFilterCount;
vaQueryVideoProcFilters(va_dpy, vpp_ctx, filters, &num_filters);
]])
],
[ac_cv_have_va_vpp_api="yes"],
[ac_cv_have_va_vpp_api="no"])
CPPFLAGS="$saved_CPPFLAGS"
LIBS="$saved_LIBS"
])
AS_IF([test "x$ac_cv_have_va_vpp_api" = "xyes"], [USE_VA_VPP=1])
dnl Check for encoding support
USE_ENCODERS=0
if test "x$enable_encoders" = "xyes"; then
PKG_CHECK_MODULES([LIBVA], [libva >= $VAAPI_ENC_REQ],
[
USE_ENCODERS=1
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
AC_CHECK_HEADERS([va/va_enc_mpeg2.h va/va_enc_h264.h], [],
[USE_ENCODERS=0],
[
#include <va/va.h>
])
CPPFLAGS="$saved_CPPFLAGS"
], [:])
USE_ENCODERS=1
fi
USE_JPEG_ENCODER=0
USE_VP8_ENCODER=0
USE_H265_ENCODER=0
USE_VP9_ENCODER=0
USE_H264_FEI_ENCODER=0
@ -765,101 +533,7 @@ if test $USE_ENCODERS -eq 1; then
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
dnl Check for JPEG Encoding API (0.37.0+)
AC_CHECK_HEADERS([va/va_enc_jpeg.h], [], [],
[
#include <va/va.h>
])
AC_CACHE_CHECK([for JPEG encoding API],
[ac_cv_have_jpeg_encoding_api],
[
saved_LIBS="$LIBS"
LIBS="$LIBS $LIBVA_LIBS"
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
[[
#include <va/va.h>
#ifdef HAVE_VA_VA_ENC_JPEG_H
# include <va/va_enc_jpeg.h>
#endif
]],
[[
VAEncPictureParameterBufferJPEG pic_param;
VAEncSliceParameterBufferJPEG slice_param;
VAQMatrixBufferJPEG q_matrix;
]])
],
[ac_cv_have_jpeg_encoding_api="yes"],
[ac_cv_have_jpeg_encoding_api="no"])
LIBS="$saved_LIBS"
])
AS_IF([test "x$ac_cv_have_jpeg_encoding_api" = "xyes"], [USE_JPEG_ENCODER=1])
dnl Check for VP8 Encoding API
AC_CHECK_HEADERS([va/va_enc_vp8.h], [], [],
[
#include <va/va.h>
])
AC_CACHE_CHECK([for VP8 encoding API],
[ac_cv_have_vp8_encoding_api],
[
saved_LIBS="$LIBS"
LIBS="$LIBS $LIBVA_LIBS"
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
[[
#include <va/va.h>
#ifdef HAVE_VA_VA_ENC_VP8_H
# include <va/va_enc_vp8.h>
#endif
]],
[[
VAEncSequenceParameterBufferVP8 seq_param;
VAEncPictureParameterBufferVP8 pic_param;
VAQMatrixBufferVP8 q_matrix;
]])
],
[ac_cv_have_vp8_encoding_api="yes"],
[ac_cv_have_vp8_encoding_api="no"])
LIBS="$saved_LIBS"
])
AS_IF([test "x$ac_cv_have_vp8_encoding_api" = "xyes"], [USE_VP8_ENCODER=1])
dnl Check for H265/HEVC Encoding API
AC_CHECK_HEADERS([va/va_enc_hevc.h], [], [],
[
#include <va/va.h>
])
AC_CACHE_CHECK([for HEVC encoding API],
[ac_cv_have_hevc_encoding_api],
[
saved_LIBS="$LIBS"
LIBS="$LIBS $LIBVA_LIBS"
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
[[
#include <va/va.h>
#ifdef HAVE_VA_VA_ENC_HEVC_H
# include <va/va_enc_hevc.h>
#endif
]],
[[
VAEncSequenceParameterBufferHEVC seq_param;
VAEncPictureParameterBufferHEVC pic_param;
VAEncSliceParameterBufferHEVC buf_param;
VAQMatrixBufferHEVC q_matrix;
]])
],
[ac_cv_have_hevc_encoding_api="yes"],
[ac_cv_have_hevc_encoding_api="no"])
LIBS="$saved_LIBS"
])
AS_IF([test "x$ac_cv_have_hevc_encoding_api" = "xyes"], [USE_H265_ENCODER=1])
dnl Check for VP9 Encoding API
dnl Check for VP9 Encoding API (0.39.1+)
AC_CHECK_HEADERS([va/va_enc_vp9.h], [], [],
[
#include <va/va.h>
@ -931,7 +605,7 @@ fi
dnl VA/Wayland API
if test $USE_WAYLAND -eq 1; then
PKG_CHECK_MODULES([LIBVA_WAYLAND], [libva-wayland >= $VAAPI_WLD_REQ],
PKG_CHECK_MODULES([LIBVA_WAYLAND], [libva-wayland >= $VAAPI_REQ],
[], [USE_WAYLAND=0])
fi
@ -1019,18 +693,6 @@ AC_DEFINE_UNQUOTED([USE_ENCODERS], [$USE_ENCODERS],
[Defined to 1 if video encoders are used])
AM_CONDITIONAL([USE_ENCODERS], [test $USE_ENCODERS -eq 1])
AC_DEFINE_UNQUOTED([USE_JPEG_ENCODER], [$USE_JPEG_ENCODER],
[Defined to 1 if JPEG encoder is used])
AM_CONDITIONAL([USE_JPEG_ENCODER], [test $USE_JPEG_ENCODER -eq 1])
AC_DEFINE_UNQUOTED([USE_VP8_ENCODER], [$USE_VP8_ENCODER],
[Defined to 1 if VP8 encoder is used])
AM_CONDITIONAL([USE_VP8_ENCODER], [test $USE_VP8_ENCODER -eq 1])
AC_DEFINE_UNQUOTED([USE_H265_ENCODER], [$USE_H265_ENCODER],
[Defined to 1 if H265 encoder is used])
AM_CONDITIONAL([USE_H265_ENCODER], [test $USE_H265_ENCODER -eq 1])
AC_DEFINE_UNQUOTED([USE_VP9_ENCODER], [$USE_VP9_ENCODER],
[Defined to 1 if VP9 encoder is used])
AM_CONDITIONAL([USE_VP9_ENCODER], [test $USE_VP9_ENCODER -eq 1])
@ -1039,26 +701,6 @@ AC_DEFINE_UNQUOTED([USE_H264_FEI_ENCODER], [$USE_H264_FEI_ENCODER],
[Defined to 1 if H264_FEI encoder is used])
AM_CONDITIONAL([USE_H264_FEI_ENCODER], [test $USE_H264_FEI_ENCODER -eq 1])
AC_DEFINE_UNQUOTED([USE_VA_VPP], [$USE_VA_VPP],
[Defined to 1 if video post-processing is used])
AM_CONDITIONAL([USE_VA_VPP], [test $USE_VA_VPP -eq 1])
AC_DEFINE_UNQUOTED([USE_JPEG_DECODER], [$USE_JPEG_DECODER],
[Defined to 1 if JPEG decoder is used])
AM_CONDITIONAL([USE_JPEG_DECODER], [test $USE_JPEG_DECODER -eq 1])
AC_DEFINE_UNQUOTED([USE_VP8_DECODER], [$USE_VP8_DECODER],
[Defined to 1 if VP8 decoder is used])
AM_CONDITIONAL([USE_VP8_DECODER], [test $USE_VP8_DECODER -eq 1])
AC_DEFINE_UNQUOTED([USE_VP9_DECODER], [$USE_VP9_DECODER],
[Defined to 1 if VP9 decoder is used])
AM_CONDITIONAL([USE_VP9_DECODER], [test $USE_VP9_DECODER -eq 1])
AC_DEFINE_UNQUOTED([USE_H265_DECODER], [$USE_H265_DECODER],
[Defined to 1 if HEVC decoder is used])
AM_CONDITIONAL([USE_H265_DECODER], [test $USE_H265_DECODER -eq 1])
AC_DEFINE_UNQUOTED([USE_DRM], [$USE_DRM],
[Defined to 1 if DRM is enabled])
AM_CONDITIONAL([USE_DRM], [test $USE_DRM -eq 1])

View file

@ -148,31 +148,23 @@ libgstvaapi_source_priv_h = \
libgstvaapi_jpegdec_source_c = gstvaapidecoder_jpeg.c
libgstvaapi_jpegdec_source_h = gstvaapidecoder_jpeg.h
if USE_JPEG_DECODER
libgstvaapi_source_c += $(libgstvaapi_jpegdec_source_c)
libgstvaapi_source_h += $(libgstvaapi_jpegdec_source_h)
endif
libgstvaapi_vp8dec_source_c = gstvaapidecoder_vp8.c
libgstvaapi_vp8dec_source_h = gstvaapidecoder_vp8.h
if USE_VP8_DECODER
libgstvaapi_source_c += $(libgstvaapi_vp8dec_source_c)
libgstvaapi_source_h += $(libgstvaapi_vp8dec_source_h)
endif
libgstvaapi_hevcdec_source_c = gstvaapidecoder_h265.c
libgstvaapi_hevcdec_source_h = gstvaapidecoder_h265.h
if USE_H265_DECODER
libgstvaapi_source_c += $(libgstvaapi_hevcdec_source_c)
libgstvaapi_source_h += $(libgstvaapi_hevcdec_source_h)
endif
libgstvaapi_vp9dec_source_c = gstvaapidecoder_vp9.c
libgstvaapi_vp9dec_source_h = gstvaapidecoder_vp9.h
if USE_VP9_DECODER
libgstvaapi_source_c += $(libgstvaapi_vp9dec_source_c)
libgstvaapi_source_h += $(libgstvaapi_vp9dec_source_h)
endif
libgstvaapi_enc_source_c = \
gstvaapicodedbuffer.c \
@ -180,8 +172,11 @@ libgstvaapi_enc_source_c = \
gstvaapicodedbufferproxy.c \
gstvaapiencoder.c \
gstvaapiencoder_h264.c \
gstvaapiencoder_h265.c \
gstvaapiencoder_jpeg.c \
gstvaapiencoder_mpeg2.c \
gstvaapiencoder_objects.c \
gstvaapiencoder_vp8.c \
$(NULL)
libgstvaapi_enc_source_h = \
@ -190,7 +185,10 @@ libgstvaapi_enc_source_h = \
gstvaapicodedbufferproxy.h \
gstvaapiencoder.h \
gstvaapiencoder_h264.h \
gstvaapiencoder_h265.h \
gstvaapiencoder_jpeg.h \
gstvaapiencoder_mpeg2.h \
gstvaapiencoder_vp8.h \
$(NULL)
libgstvaapi_enc_source_priv_h = \
@ -207,27 +205,6 @@ libgstvaapi_source_h += $(libgstvaapi_enc_source_h)
libgstvaapi_source_priv_h += $(libgstvaapi_enc_source_priv_h)
endif
libgstvaapi_jpegenc_source_c = gstvaapiencoder_jpeg.c
libgstvaapi_jpegenc_source_h = gstvaapiencoder_jpeg.h
if USE_JPEG_ENCODER
libgstvaapi_source_c += $(libgstvaapi_jpegenc_source_c)
libgstvaapi_source_h += $(libgstvaapi_jpegenc_source_h)
endif
libgstvaapi_vp8enc_source_c = gstvaapiencoder_vp8.c
libgstvaapi_vp8enc_source_h = gstvaapiencoder_vp8.h
if USE_VP8_ENCODER
libgstvaapi_source_c += $(libgstvaapi_vp8enc_source_c)
libgstvaapi_source_h += $(libgstvaapi_vp8enc_source_h)
endif
libgstvaapi_h265enc_source_c = gstvaapiencoder_h265.c
libgstvaapi_h265enc_source_h = gstvaapiencoder_h265.h
if USE_H265_ENCODER
libgstvaapi_source_c += $(libgstvaapi_h265enc_source_c)
libgstvaapi_source_h += $(libgstvaapi_h265enc_source_h)
endif
libgstvaapi_vp9enc_source_c = gstvaapiencoder_vp9.c
libgstvaapi_vp9enc_source_h = gstvaapiencoder_vp9.h
if USE_VP9_ENCODER
@ -535,12 +512,6 @@ EXTRA_DIST = \
$(libgstvaapi_hevcdec_source_priv_h) \
$(libgstvaapi_vp9dec_source_c) \
$(libgstvaapi_vp9dec_source_h) \
$(libgstvaapi_jpegenc_source_h) \
$(libgstvaapi_jpegenc_source_c) \
$(libgstvaapi_vp8enc_source_h) \
$(libgstvaapi_vp8enc_source_c) \
$(libgstvaapi_h265enc_source_h) \
$(libgstvaapi_h265enc_source_c) \
$(libgstvaapi_vp9enc_source_h) \
$(libgstvaapi_vp9enc_source_c) \
$(libgstvaapi_egl_source_c) \

View file

@ -36,14 +36,12 @@ from_GstVaapiBufferMemoryType (guint type)
guint va_type;
switch (type) {
#if VA_CHECK_VERSION(0,36,0)
case GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF:
va_type = VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME;
break;
case GST_VAAPI_BUFFER_MEMORY_TYPE_GEM_BUF:
va_type = VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM;
break;
#endif
default:
va_type = 0;
break;
@ -57,14 +55,12 @@ to_GstVaapiBufferMemoryType (guint va_type)
guint type;
switch (va_type) {
#if VA_CHECK_VERSION(0,36,0)
case VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME:
type = GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF;
break;
case VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM:
type = GST_VAAPI_BUFFER_MEMORY_TYPE_GEM_BUF;
break;
#endif
default:
type = 0;
break;
@ -72,7 +68,6 @@ to_GstVaapiBufferMemoryType (guint va_type)
return type;
}
#if VA_CHECK_VERSION (0,36,0)
static gboolean
gst_vaapi_buffer_proxy_acquire_handle (GstVaapiBufferProxy * proxy)
{
@ -96,7 +91,6 @@ gst_vaapi_buffer_proxy_acquire_handle (GstVaapiBufferProxy * proxy)
return TRUE;
}
/* VA_CHECK_VERSION (0,36,0) */
static gboolean
gst_vaapi_buffer_proxy_release_handle (GstVaapiBufferProxy * proxy)
{
@ -117,7 +111,6 @@ gst_vaapi_buffer_proxy_release_handle (GstVaapiBufferProxy * proxy)
return TRUE;
}
/* VA_CHECK_VERSION (0,36,0) */
static void
gst_vaapi_buffer_proxy_finalize (GstVaapiBufferProxy * proxy)
{
@ -135,7 +128,6 @@ gst_vaapi_buffer_proxy_finalize (GstVaapiBufferProxy * proxy)
gst_vaapi_object_replace (&proxy->parent, NULL);
}
/* VA_CHECK_VERSION (0,36,0) */
static inline const GstVaapiMiniObjectClass *
gst_vaapi_buffer_proxy_class (void)
{
@ -145,13 +137,11 @@ gst_vaapi_buffer_proxy_class (void)
};
return &GstVaapiBufferProxyClass;
}
#endif
GstVaapiBufferProxy *
gst_vaapi_buffer_proxy_new (guintptr handle, guint type, gsize size,
GDestroyNotify destroy_func, gpointer user_data)
{
#if VA_CHECK_VERSION (0,36,0)
GstVaapiBufferProxy *proxy;
g_return_val_if_fail (handle != 0, NULL);
@ -183,16 +173,12 @@ error_unsupported_mem_type:
gst_vaapi_buffer_proxy_unref (proxy);
return NULL;
}
#else
return NULL;
#endif
}
GstVaapiBufferProxy *
gst_vaapi_buffer_proxy_new_from_object (GstVaapiObject * object,
VABufferID buf_id, guint type, GDestroyNotify destroy_func, gpointer data)
{
#if VA_CHECK_VERSION (0,36,0)
GstVaapiBufferProxy *proxy;
g_return_val_if_fail (object != NULL, NULL);
@ -229,9 +215,6 @@ error_acquire_handle:
gst_vaapi_buffer_proxy_unref (proxy);
return NULL;
}
#else
return NULL;
#endif
}
/**
@ -314,11 +297,7 @@ gst_vaapi_buffer_proxy_get_handle (GstVaapiBufferProxy * proxy)
{
g_return_val_if_fail (proxy != NULL, 0);
#if VA_CHECK_VERSION (0,36,0)
return GST_VAAPI_BUFFER_PROXY_HANDLE (proxy);
#else
return 0;
#endif
}
/**
@ -334,11 +313,7 @@ gst_vaapi_buffer_proxy_get_size (GstVaapiBufferProxy * proxy)
{
g_return_val_if_fail (proxy != NULL, 0);
#if VA_CHECK_VERSION (0,36,0)
return GST_VAAPI_BUFFER_PROXY_SIZE (proxy);
#else
return 0;
#endif
}
/**

View file

@ -68,9 +68,7 @@ struct _GstVaapiBufferProxy {
gpointer destroy_data;
guint type;
VABufferID va_buf;
#if VA_CHECK_VERSION (0,36,0)
VABufferInfo va_info;
#endif
GstMemory *mem;
};

View file

@ -177,7 +177,6 @@ gst_vaapi_bitplane_new (GstVaapiDecoder * decoder, guint8 * data,
/* --- JPEG Huffman Tables --- */
/* ------------------------------------------------------------------------- */
#if USE_JPEG_DECODER
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiHuffmanTable, gst_vaapi_huffman_table);
void
@ -209,8 +208,7 @@ gst_vaapi_huffman_table_new (GstVaapiDecoder * decoder,
return NULL;
return GST_VAAPI_HUFFMAN_TABLE_CAST (object);
}
#endif
#if USE_VP8_DECODER
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiProbabilityTable,
gst_vaapi_probability_table);
@ -244,5 +242,3 @@ gst_vaapi_probability_table_new (GstVaapiDecoder * decoder,
return NULL;
return GST_VAAPI_PROBABILITY_TABLE_CAST (object);
}
#endif

View file

@ -27,16 +27,6 @@
#include <va/va.h>
/* Compatibility glue with VA-API < 0.31 */
#if !VA_CHECK_VERSION(0,31,0)
#undef vaSyncSurface
#define vaSyncSurface(dpy, s) (vaSyncSurface)((dpy), VA_INVALID_ID, (s))
#undef vaPutImage
#define vaPutImage vaPutImage2
#undef vaAssociateSubpicture
#define vaAssociateSubpicture vaAssociateSubpicture2
#endif
#if VA_CHECK_VERSION(1,0,0)
#define VA_ROI_RC_QP_DELTA_SUPPORT(x) x->bits.roi_rc_qp_delta_support
#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderRawData
@ -45,50 +35,7 @@
#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderH264_SEI
#endif
/* Compatibility glue with VA-API 0.34 */
#if VA_CHECK_VERSION(0,34,0)
# include <va/va_compat.h>
#endif
#if VA_CHECK_VERSION(0,36,0)
#include <va/va_compat.h>
#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 */

View file

@ -302,7 +302,6 @@ config_create (GstVaapiContext * context)
attrib = &attribs[++attrib_index];
g_assert (attrib_index < G_N_ELEMENTS (attribs));
}
#if VA_CHECK_VERSION(0,37,0)
if (cip->profile == GST_VAAPI_PROFILE_JPEG_BASELINE) {
attrib->type = VAConfigAttribEncJPEG;
if (!context_get_attribute (context, attrib->type, &value))
@ -311,7 +310,6 @@ config_create (GstVaapiContext * context)
attrib = &attribs[++attrib_index];
g_assert (attrib_index < G_N_ELEMENTS (attribs));
}
#endif
#if VA_CHECK_VERSION(0,39,1)
if (config->roi_capability) {
VAConfigAttribValEncROI *roi_config;

View file

@ -532,7 +532,6 @@ ensure_profiles (GstVaapiDisplay * display)
g_array_sort (priv->encoders, compare_profiles);
/* Video processing API */
#if USE_VA_VPP
status = vaQueryConfigEntrypoints (priv->display, VAProfileNone,
entrypoints, &num_entrypoints);
if (vaapi_check_status (status, "vaQueryEntrypoints() [VAProfileNone]")) {
@ -541,7 +540,6 @@ ensure_profiles (GstVaapiDisplay * display)
priv->has_vpp = TRUE;
}
}
#endif
success = TRUE;
cleanup:

View file

@ -289,7 +289,6 @@ gst_vaapi_enc_q_matrix_new (GstVaapiEncoder * encoder,
/* --- JPEG Huffman Tables --- */
/* ------------------------------------------------------------------------- */
#if USE_JPEG_ENCODER
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiEncHuffmanTable,
gst_vaapi_enc_huffman_table);
@ -322,7 +321,6 @@ gst_vaapi_enc_huffman_table_new (GstVaapiEncoder * encoder,
return NULL;
return GST_VAAPI_ENC_HUFFMAN_TABLE_CAST (object);
}
#endif
/* ------------------------------------------------------------------------- */
/* --- Encoder Picture --- */

View file

@ -125,14 +125,12 @@ gst_vaapi_deinterlace_method_get_type (void)
"Disable deinterlacing", "none"},
{GST_VAAPI_DEINTERLACE_METHOD_BOB,
"Bob deinterlacing", "bob"},
#if USE_VA_VPP
{GST_VAAPI_DEINTERLACE_METHOD_WEAVE,
"Weave deinterlacing", "weave"},
{GST_VAAPI_DEINTERLACE_METHOD_MOTION_ADAPTIVE,
"Motion adaptive deinterlacing", "motion-adaptive"},
{GST_VAAPI_DEINTERLACE_METHOD_MOTION_COMPENSATED,
"Motion compensated deinterlacing", "motion-compensated"},
#endif
{0, NULL, NULL},
};
@ -171,7 +169,6 @@ gst_vaapi_deinterlace_flags_get_type (void)
/* --- VPP Helpers --- */
/* ------------------------------------------------------------------------- */
#if USE_VA_VPP
static VAProcFilterType *
vpp_get_filters_unlocked (GstVaapiFilter * filter, guint * num_filters_ptr)
{
@ -273,13 +270,11 @@ vpp_get_filter_caps (GstVaapiFilter * filter, VAProcFilterType type,
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
return caps;
}
#endif
/* ------------------------------------------------------------------------- */
/* --- VPP Operations --- */
/* ------------------------------------------------------------------------- */
#if USE_VA_VPP
#define DEFAULT_FORMAT GST_VIDEO_FORMAT_UNKNOWN
#define DEFAULT_SCALING GST_VAAPI_SCALE_METHOD_DEFAULT
@ -425,7 +420,6 @@ init_properties (void)
GST_VAAPI_TYPE_SCALE_METHOD,
DEFAULT_SCALING, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
#if VA_CHECK_VERSION(0,36,0)
/**
* GstVaapiFilter:skin-tone-enhancement:
*
@ -435,7 +429,6 @@ init_properties (void)
"Skin tone enhancement",
"Apply the skin tone enhancement algorithm",
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
#endif
}
static void
@ -484,12 +477,10 @@ op_data_new (GstVaapiFilterOp op, GParamSpec * pspec)
op_data->va_cap_size = sizeof (VAProcFilterCap);
op_data->va_buffer_size = sizeof (VAProcFilterParameterBuffer);
break;
#if VA_CHECK_VERSION(0,36,0)
case GST_VAAPI_FILTER_OP_SKINTONE:
op_data->va_type = VAProcFilterSkinToneEnhancement;
op_data->va_buffer_size = sizeof (VAProcFilterParameterBuffer);
break;
#endif
case GST_VAAPI_FILTER_OP_HUE:
op_data->va_subtype = VAProcColorBalanceHue;
goto op_colorbalance;
@ -715,14 +706,12 @@ error:
return NULL;
}
}
#endif
/* Determine the set of supported VPP operations by the specific
filter, or known to this library if filter is NULL */
static GPtrArray *
get_operations (GstVaapiFilter * filter)
{
#if USE_VA_VPP
GPtrArray *ops;
if (filter && filter->operations)
@ -732,8 +721,6 @@ get_operations (GstVaapiFilter * filter)
if (!ops)
return NULL;
return filter ? get_operations_ordered (filter, ops) : ops;
#endif
return NULL;
}
/* Ensure the set of supported VPP operations is cached into the
@ -776,7 +763,6 @@ find_operation (GstVaapiFilter * filter, GstVaapiFilterOp op)
}
/* Ensure the operation's VA buffer is allocated */
#if USE_VA_VPP
static inline gboolean
op_ensure_buffer (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data)
{
@ -786,10 +772,8 @@ op_ensure_buffer (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data)
VAProcFilterParameterBufferType, op_data->va_buffer_size, NULL,
&op_data->va_buffer, NULL);
}
#endif
/* Update a generic filter (float value) */
#if USE_VA_VPP
static gboolean
op_set_generic_unlocked (GstVaapiFilter * filter,
GstVaapiFilterOpData * op_data, gfloat value)
@ -819,7 +803,6 @@ op_set_generic_unlocked (GstVaapiFilter * filter,
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
return TRUE;
}
#endif
static inline gboolean
op_set_generic (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
@ -827,16 +810,13 @@ op_set_generic (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
{
gboolean success = FALSE;
#if USE_VA_VPP
GST_VAAPI_DISPLAY_LOCK (filter->display);
success = op_set_generic_unlocked (filter, op_data, value);
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
#endif
return success;
}
/* Update the color balance filter */
#if USE_VA_VPP
static gboolean
op_set_color_balance_unlocked (GstVaapiFilter * filter,
GstVaapiFilterOpData * op_data, gfloat value)
@ -867,7 +847,6 @@ op_set_color_balance_unlocked (GstVaapiFilter * filter,
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
return TRUE;
}
#endif
static inline gboolean
op_set_color_balance (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
@ -875,16 +854,13 @@ op_set_color_balance (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
{
gboolean success = FALSE;
#if USE_VA_VPP
GST_VAAPI_DISPLAY_LOCK (filter->display);
success = op_set_color_balance_unlocked (filter, op_data, value);
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
#endif
return success;
}
/* Update deinterlace filter */
#if USE_VA_VPP
static gboolean
op_set_deinterlace_unlocked (GstVaapiFilter * filter,
GstVaapiFilterOpData * op_data, GstVaapiDeinterlaceMethod method,
@ -920,7 +896,6 @@ op_set_deinterlace_unlocked (GstVaapiFilter * filter,
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
return TRUE;
}
#endif
static inline gboolean
op_set_deinterlace (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
@ -928,16 +903,13 @@ op_set_deinterlace (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
{
gboolean success = FALSE;
#if USE_VA_VPP
GST_VAAPI_DISPLAY_LOCK (filter->display);
success = op_set_deinterlace_unlocked (filter, op_data, method, flags);
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
#endif
return success;
}
/* Update skin tone enhancement */
#if USE_VA_VPP
static gboolean
op_set_skintone_unlocked (GstVaapiFilter * filter,
GstVaapiFilterOpData * op_data, gboolean value)
@ -959,7 +931,6 @@ op_set_skintone_unlocked (GstVaapiFilter * filter,
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
return TRUE;
}
#endif
static inline gboolean
op_set_skintone (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
@ -967,11 +938,9 @@ op_set_skintone (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
{
gboolean success = FALSE;
#if USE_VA_VPP
GST_VAAPI_DISPLAY_LOCK (filter->display);
success = op_set_skintone_unlocked (filter, op_data, enhance);
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
#endif
return success;
}
@ -1044,7 +1013,6 @@ find_format (GstVaapiFilter * filter, GstVideoFormat format)
/* --- Interface --- */
/* ------------------------------------------------------------------------- */
#if USE_VA_VPP
static void
gst_vaapi_filter_init (GstVaapiFilter * filter)
{
@ -1185,7 +1153,6 @@ gst_vaapi_filter_class_init (GstVaapiFilterClass * klass)
"The VA-API display object to use", GST_TYPE_VAAPI_DISPLAY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME));
}
#endif
/**
* gst_vaapi_filter_new:
@ -1199,7 +1166,6 @@ gst_vaapi_filter_class_init (GstVaapiFilterClass * klass)
GstVaapiFilter *
gst_vaapi_filter_new (GstVaapiDisplay * display)
{
#if USE_VA_VPP
GstVaapiFilter *filter;
filter = g_object_new (GST_TYPE_VAAPI_FILTER, "display", display, NULL);
@ -1213,11 +1179,6 @@ error:
gst_object_unref (filter);
return NULL;
}
#else
GST_WARNING ("video processing is not supported, "
"please consider an upgrade to VA-API >= 0.34");
return NULL;
#endif
}
/**
@ -1327,7 +1288,6 @@ gboolean
gst_vaapi_filter_set_operation (GstVaapiFilter * filter, GstVaapiFilterOp op,
const GValue * value)
{
#if USE_VA_VPP
GstVaapiFilterOpData *op_data;
g_return_val_if_fail (filter != NULL, FALSE);
@ -1373,7 +1333,6 @@ gst_vaapi_filter_set_operation (GstVaapiFilter * filter, GstVaapiFilterOp op,
default:
break;
}
#endif
return FALSE;
}
@ -1396,7 +1355,6 @@ static GstVaapiFilterStatus
gst_vaapi_filter_process_unlocked (GstVaapiFilter * filter,
GstVaapiSurface * src_surface, GstVaapiSurface * dst_surface, guint flags)
{
#if USE_VA_VPP
VAProcPipelineParameterBuffer *pipeline_param = NULL;
VABufferID pipeline_param_buf_id = VA_INVALID_ID;
VABufferID filters[N_PROPERTIES];
@ -1536,8 +1494,6 @@ error:
vaapi_destroy_buffer (filter->va_display, &pipeline_param_buf_id);
return GST_VAAPI_FILTER_STATUS_ERROR_OPERATION_FAILED;
}
#endif
return GST_VAAPI_FILTER_STATUS_ERROR_UNSUPPORTED_OPERATION;
}
GstVaapiFilterStatus
@ -1886,11 +1842,8 @@ static inline gfloat
op_get_float_default_value (GstVaapiFilter * filter,
GstVaapiFilterOpData * op_data)
{
#if USE_VA_VPP
GParamSpecFloat *const pspec = G_PARAM_SPEC_FLOAT (op_data->pspec);
return pspec->default_value;
#endif
return 0.0;
}
gfloat

View file

@ -89,49 +89,37 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
"video/x-divx, divxversion=5", "advanced-simple"},
{GST_VAAPI_PROFILE_MPEG4_ADVANCED_SIMPLE, VAProfileMPEG4AdvancedSimple,
"video/x-xvid", "advanced-simple"},
#if VA_CHECK_VERSION(0,30,0)
{GST_VAAPI_PROFILE_H263_BASELINE, VAProfileH263Baseline,
"video/x-h263, variant=itu, h263version=h263", "baseline"},
#endif
#if !VA_CHECK_VERSION(1,0,0)
{GST_VAAPI_PROFILE_H264_BASELINE, VAProfileH264Baseline,
"video/x-h264", "baseline"},
#endif
#if VA_CHECK_VERSION(0,31,1)
{GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE,
VAProfileH264ConstrainedBaseline,
"video/x-h264", "constrained-baseline"},
#endif
{GST_VAAPI_PROFILE_H264_MAIN, VAProfileH264Main,
"video/x-h264", "main"},
{GST_VAAPI_PROFILE_H264_HIGH, VAProfileH264High,
"video/x-h264", "high"},
#if VA_CHECK_VERSION(0,35,2)
{GST_VAAPI_PROFILE_H264_MULTIVIEW_HIGH, VAProfileH264MultiviewHigh,
"video/x-h264", "multiview-high"},
{GST_VAAPI_PROFILE_H264_STEREO_HIGH, VAProfileH264StereoHigh,
"video/x-h264", "stereo-high"},
#endif
{GST_VAAPI_PROFILE_VC1_SIMPLE, VAProfileVC1Simple,
"video/x-wmv, wmvversion=3", "simple"},
{GST_VAAPI_PROFILE_VC1_MAIN, VAProfileVC1Main,
"video/x-wmv, wmvversion=3", "main"},
{GST_VAAPI_PROFILE_VC1_ADVANCED, VAProfileVC1Advanced,
"video/x-wmv, wmvversion=3, format=(string)WVC1", "advanced"},
#if VA_CHECK_VERSION(0,32,0)
{GST_VAAPI_PROFILE_JPEG_BASELINE, VAProfileJPEGBaseline,
"image/jpeg", NULL},
#endif
#if VA_CHECK_VERSION(0,35,0)
{GST_VAAPI_PROFILE_VP8, VAProfileVP8Version0_3,
"video/x-vp8", NULL},
#endif
#if VA_CHECK_VERSION(0,37,0)
{GST_VAAPI_PROFILE_H265_MAIN, VAProfileHEVCMain,
"video/x-h265", "main"},
{GST_VAAPI_PROFILE_H265_MAIN10, VAProfileHEVCMain10,
"video/x-h265", "main-10"},
#endif
#if VA_CHECK_VERSION(1,2,0)
{GST_VAAPI_PROFILE_H265_MAIN_422_10, VAProfileHEVCMain422_10,
"video/x-h265", "main-422-10"},
@ -140,18 +128,14 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
{GST_VAAPI_PROFILE_H265_MAIN_444_10, VAProfileHEVCMain444_10,
"video/x-h265", "main-444-10"},
#endif
#if VA_CHECK_VERSION(0,38,0)
{GST_VAAPI_PROFILE_VP9_0, VAProfileVP9Profile0,
"video/x-vp9", "profile0"},
#endif
#if VA_CHECK_VERSION(0,39,0)
{GST_VAAPI_PROFILE_VP9_1, VAProfileVP9Profile1,
"video/x-vp9", "profile1"},
{GST_VAAPI_PROFILE_VP9_2, VAProfileVP9Profile2,
"video/x-vp9", "profile2"},
{GST_VAAPI_PROFILE_VP9_3, VAProfileVP9Profile3,
"video/x-vp9", "profile3"},
#endif
{0,}
};
@ -160,10 +144,8 @@ static const GstVaapiEntrypointMap gst_vaapi_entrypoints[] = {
{GST_VAAPI_ENTRYPOINT_VLD, VAEntrypointVLD},
{GST_VAAPI_ENTRYPOINT_IDCT, VAEntrypointIDCT},
{GST_VAAPI_ENTRYPOINT_MOCO, VAEntrypointMoComp},
#if VA_CHECK_VERSION(0,30,0)
{GST_VAAPI_ENTRYPOINT_SLICE_ENCODE, VAEntrypointEncSlice},
{GST_VAAPI_ENTRYPOINT_PICTURE_ENCODE, VAEntrypointEncPicture},
#endif
#if VA_CHECK_VERSION(0,39,1)
{GST_VAAPI_ENTRYPOINT_SLICE_ENCODE_LP, VAEntrypointEncSliceLP},
#endif

View file

@ -132,7 +132,6 @@ static gboolean
gst_vaapi_surface_create_full (GstVaapiSurface * surface,
const GstVideoInfo * vip, guint flags)
{
#if VA_CHECK_VERSION(0,34,0)
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
const GstVideoFormat format = GST_VIDEO_INFO_FORMAT (vip);
VASurfaceID surface_id;
@ -219,16 +218,12 @@ error_unsupported_format:
GST_ERROR ("unsupported format %s",
gst_vaapi_video_format_to_string (format));
return FALSE;
#else
return FALSE;
#endif
}
static gboolean
gst_vaapi_surface_create_from_buffer_proxy (GstVaapiSurface * surface,
GstVaapiBufferProxy * proxy, const GstVideoInfo * vip)
{
#if VA_CHECK_VERSION (0,36,0)
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
GstVideoFormat format;
VASurfaceID surface_id;
@ -308,9 +303,6 @@ error_unsupported_format:
GST_ERROR ("unsupported format %s",
gst_vaapi_video_format_to_string (format));
return FALSE;
#else
return FALSE;
#endif
}
#define gst_vaapi_surface_finalize gst_vaapi_surface_destroy
@ -387,7 +379,6 @@ gst_vaapi_surface_new (GstVaapiDisplay * display,
/* first try a recent version of vaCreateSurface, and later use as
* fallback its old version */
#if VA_CHECK_VERSION(0,34,0)
{
GstVideoInfo vi;
GstVideoFormat surface_format;
@ -398,7 +389,6 @@ gst_vaapi_surface_new (GstVaapiDisplay * display,
if (gst_vaapi_surface_create_full (surface, &vi, 0))
return surface;
}
#endif
if (!gst_vaapi_surface_create (surface, chroma_type, width, height))
goto error;
return surface;

View file

@ -214,42 +214,30 @@ string_of_VAProfile (VAProfile profile)
MAP (MPEG4Simple);
MAP (MPEG4AdvancedSimple);
MAP (MPEG4Main);
#if VA_CHECK_VERSION(0,32,0)
MAP (JPEGBaseline);
MAP (H263Baseline);
MAP (H264ConstrainedBaseline);
#endif
#if !VA_CHECK_VERSION(1,0,0)
MAP (H264Baseline);
#endif
MAP (H264Main);
MAP (H264High);
#if VA_CHECK_VERSION(0,35,2)
MAP (H264MultiviewHigh);
MAP (H264StereoHigh);
#endif
#if VA_CHECK_VERSION(1,2,0)
MAP (HEVCMain422_10);
MAP (HEVCMain444);
#endif
#if VA_CHECK_VERSION(0,37,1)
MAP (HEVCMain);
MAP (HEVCMain10);
#endif
MAP (VC1Simple);
MAP (VC1Main);
MAP (VC1Advanced);
#if VA_CHECK_VERSION(0,35,0)
MAP (VP8Version0_3);
#endif
#if VA_CHECK_VERSION(0,37,0)
MAP (VP9Profile0);
#endif
#if VA_CHECK_VERSION(0,39,0)
MAP (VP9Profile1);
MAP (VP9Profile2);
MAP (VP9Profile3);
#endif
#undef MAP
default:
break;
@ -288,17 +276,8 @@ string_of_VADisplayAttributeType (VADisplayAttribType attribute_type)
MAP (Hue);
MAP (Saturation);
MAP (BackgroundColor);
#if !VA_CHECK_VERSION(0,34,0)
MAP (DirectSurface);
#endif
MAP (Rotation);
MAP (OutofLoopDeblock);
#if VA_CHECK_VERSION(0,31,1) && !VA_CHECK_VERSION(0,34,0)
MAP (BLEBlackMode);
MAP (BLEWhiteMode);
MAP (BlueStretch);
MAP (SkinColorCorrection);
#endif
MAP (CSCMatrix);
MAP (BlendColor);
MAP (OverlayAutoPaintColorKey);
@ -323,15 +302,11 @@ string_of_va_chroma_format (guint chroma_format)
MAP (YUV420);
MAP (YUV422);
MAP (YUV444);
#if VA_CHECK_VERSION(0,34,0)
MAP (YUV400);
MAP (RGB16);
MAP (RGB32);
MAP (RGBP);
#endif
#if VA_CHECK_VERSION(0,38,1)
MAP (YUV420_10BPP);
#endif
#if VA_CHECK_VERSION(1,2,0)
MAP (YUV422_10);
MAP (YUV444_10);
@ -397,7 +372,6 @@ to_GstVaapiChromaType (guint va_rt_format)
case VA_RT_FORMAT_YUV444:
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444;
break;
#if VA_CHECK_VERSION(0,34,0)
case VA_RT_FORMAT_YUV411:
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV411;
break;
@ -413,12 +387,9 @@ to_GstVaapiChromaType (guint va_rt_format)
case VA_RT_FORMAT_RGBP:
chroma_type = GST_VAAPI_CHROMA_TYPE_RGBP;
break;
#endif
#if VA_CHECK_VERSION(0,38,1)
case VA_RT_FORMAT_YUV420_10BPP:
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420_10BPP;
break;
#endif
#if VA_CHECK_VERSION(1,2,0)
case VA_RT_FORMAT_YUV422_10:
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV422_10BPP;
@ -468,7 +439,6 @@ from_GstVaapiChromaType (guint chroma_type)
case GST_VAAPI_CHROMA_TYPE_YUV444:
format = VA_RT_FORMAT_YUV444;
break;
#if VA_CHECK_VERSION(0,34,0)
case GST_VAAPI_CHROMA_TYPE_YUV411:
format = VA_RT_FORMAT_YUV411;
break;
@ -484,12 +454,9 @@ from_GstVaapiChromaType (guint chroma_type)
case GST_VAAPI_CHROMA_TYPE_RGBP:
format = VA_RT_FORMAT_RGBP;
break;
#endif
#if VA_CHECK_VERSION(0,38,1)
case GST_VAAPI_CHROMA_TYPE_YUV420_10BPP:
format = VA_RT_FORMAT_YUV420_10BPP;
break;
#endif
#if VA_CHECK_VERSION(1,2,0)
case GST_VAAPI_CHROMA_TYPE_YUV422_10BPP:
format = VA_RT_FORMAT_YUV422_10;
@ -683,10 +650,8 @@ to_GstVaapiSurfaceStatus (guint va_flags)
}
/* Check for encoder status */
#if VA_CHECK_VERSION(0,30,0)
if (va_flags & VASurfaceSkipped)
flags |= GST_VAAPI_SURFACE_STATUS_SKIPPED;
#endif
return flags;
}

View file

@ -92,7 +92,6 @@ gst_vaapi_get_config_attribute (GstVaapiDisplay * display, VAProfile profile,
GArray *
gst_vaapi_get_surface_formats (GstVaapiDisplay * display, VAConfigID config)
{
#if VA_CHECK_VERSION(0,34,0)
VASurfaceAttrib *surface_attribs = NULL;
guint i, num_surface_attribs = 0;
VAStatus va_status;
@ -152,6 +151,5 @@ error:
{
g_free (surface_attribs);
}
#endif
return NULL;
}

View file

@ -6,11 +6,15 @@ gstlibvaapi_sources = [
'gstvaapidecoder.c',
'gstvaapidecoder_dpb.c',
'gstvaapidecoder_h264.c',
'gstvaapidecoder_h265.c',
'gstvaapidecoder_jpeg.c',
'gstvaapidecoder_mpeg2.c',
'gstvaapidecoder_mpeg4.c',
'gstvaapidecoder_objects.c',
'gstvaapidecoder_unit.c',
'gstvaapidecoder_vc1.c',
'gstvaapidecoder_vp8.c',
'gstvaapidecoder_vp9.c',
'gstvaapidisplay.c',
'gstvaapifilter.c',
'gstvaapiimage.c',
@ -44,9 +48,12 @@ gstlibvaapi_headers = [
'gstvaapidecoder.h',
'gstvaapidecoder_h264.h',
'gstvaapidecoder_h265.h',
'gstvaapidecoder_jpeg.h',
'gstvaapidecoder_mpeg2.h',
'gstvaapidecoder_mpeg4.h',
'gstvaapidecoder_vc1.h',
'gstvaapidecoder_vp8.h',
'gstvaapidecoder_vp9.h',
'gstvaapidisplay.h',
'gstvaapifilter.h',
'gstvaapiimage.h',
@ -71,26 +78,6 @@ gstlibvaapi_headers = [
'video-format.h',
]
if USE_JPEG_DECODER
gstlibvaapi_sources += 'gstvaapidecoder_jpeg.c'
gstlibvaapi_headers += 'gstvaapidecoder_jpeg.h'
endif
if USE_VP8_DECODER
gstlibvaapi_sources += 'gstvaapidecoder_vp8.c'
gstlibvaapi_headers += 'gstvaapidecoder_vp8.h'
endif
if USE_H265_DECODER
gstlibvaapi_sources += 'gstvaapidecoder_h265.c'
gstlibvaapi_headers += 'gstvaapidecoder_h265.h'
endif
if USE_VP9_DECODER
gstlibvaapi_sources += 'gstvaapidecoder_vp9.c'
gstlibvaapi_headers += 'gstvaapidecoder_vp9.h'
endif
if USE_ENCODERS
gstlibvaapi_sources += [
'gstvaapicodedbuffer.c',
@ -98,8 +85,11 @@ if USE_ENCODERS
'gstvaapicodedbufferproxy.c',
'gstvaapiencoder.c',
'gstvaapiencoder_h264.c',
'gstvaapiencoder_h265.c',
'gstvaapiencoder_jpeg.c',
'gstvaapiencoder_mpeg2.c',
'gstvaapiencoder_objects.c',
'gstvaapiencoder_vp8.c',
]
gstlibvaapi_headers += [
'gstvaapicodedbuffer.h',
@ -107,25 +97,13 @@ if USE_ENCODERS
'gstvaapicodedbufferproxy.h',
'gstvaapiencoder.h',
'gstvaapiencoder_h264.h',
'gstvaapiencoder_h265.h',
'gstvaapiencoder_jpeg.h',
'gstvaapiencoder_mpeg2.h',
'gstvaapiencoder_vp8.h',
]
endif
if USE_JPEG_ENCODER
gstlibvaapi_sources += 'gstvaapiencoder_jpeg.c'
gstlibvaapi_headers += 'gstvaapiencoder_jpeg.h'
endif
if USE_VP8_ENCODER
gstlibvaapi_sources += 'gstvaapiencoder_vp8.c'
gstlibvaapi_headers += 'gstvaapiencoder_vp8.h'
endif
if USE_H265_ENCODER
gstlibvaapi_sources += 'gstvaapiencoder_h265.c'
gstlibvaapi_headers += 'gstvaapiencoder_h265.h'
endif
if USE_VP9_ENCODER
gstlibvaapi_sources += 'gstvaapiencoder_vp9.c'
gstlibvaapi_headers += 'gstvaapiencoder_vp9.h'

View file

@ -81,13 +81,19 @@ libgstvaapi_source_h = \
libgstvaapi_enc_source_c = \
gstvaapiencode.c \
gstvaapiencode_h264.c \
gstvaapiencode_h265.c \
gstvaapiencode_jpeg.c \
gstvaapiencode_mpeg2.c \
gstvaapiencode_vp8.c \
$(NULL)
libgstvaapi_enc_source_h = \
gstvaapiencode.h \
gstvaapiencode_h264.h \
gstvaapiencode_h265.h \
gstvaapiencode_jpeg.h \
gstvaapiencode_mpeg2.h \
gstvaapiencode_vp8.h \
$(NULL)
if USE_ENCODERS
@ -95,27 +101,6 @@ libgstvaapi_source_c += $(libgstvaapi_enc_source_c)
libgstvaapi_source_h += $(libgstvaapi_enc_source_h)
endif
libgstvaapi_jpegenc_source_c = gstvaapiencode_jpeg.c
libgstvaapi_jpegenc_source_h = gstvaapiencode_jpeg.h
if USE_JPEG_ENCODER
libgstvaapi_source_c += $(libgstvaapi_jpegenc_source_c)
libgstvaapi_source_h += $(libgstvaapi_jpegenc_source_h)
endif
libgstvaapi_vp8enc_source_c = gstvaapiencode_vp8.c
libgstvaapi_vp8enc_source_h = gstvaapiencode_vp8.h
if USE_VP8_ENCODER
libgstvaapi_source_c += $(libgstvaapi_vp8enc_source_c)
libgstvaapi_source_h += $(libgstvaapi_vp8enc_source_h)
endif
libgstvaapi_h265enc_source_c = gstvaapiencode_h265.c
libgstvaapi_h265enc_source_h = gstvaapiencode_h265.h
if USE_H265_ENCODER
libgstvaapi_source_c += $(libgstvaapi_h265enc_source_c)
libgstvaapi_source_h += $(libgstvaapi_h265enc_source_h)
endif
libgstvaapi_vp9enc_source_c = gstvaapiencode_vp9.c
libgstvaapi_vp9enc_source_h = gstvaapiencode_vp9.h
if USE_VP9_ENCODER
@ -168,12 +153,6 @@ libgstvaapi_la_LIBTOOLFLAGS = --tag=disable-static
EXTRA_DIST = \
$(libgstvaapi_enc_source_c) \
$(libgstvaapi_enc_source_h) \
$(libgstvaapi_jpegenc_source_c) \
$(libgstvaapi_jpegenc_source_h) \
$(libgstvaapi_vp8enc_source_c) \
$(libgstvaapi_vp8enc_source_h) \
$(libgstvaapi_h265enc_source_c) \
$(libgstvaapi_h265enc_source_h) \
$(libgstvaapi_vp9enc_source_c) \
$(libgstvaapi_vp9enc_source_h) \
$(libgstvaapi_h264feienc_source_c) \

View file

@ -31,18 +31,9 @@
#if USE_ENCODERS
#include "gstvaapiencode_h264.h"
#include "gstvaapiencode_mpeg2.h"
#if USE_JPEG_ENCODER
#include "gstvaapiencode_jpeg.h"
#endif
#if USE_VP8_ENCODER
#include "gstvaapiencode_vp8.h"
#endif
#if USE_H265_ENCODER
#include "gstvaapiencode_h265.h"
#endif
#if USE_VP9_ENCODER
#include "gstvaapiencode_vp9.h"
@ -155,18 +146,12 @@ struct _GstVaapiEncoderMap
static const GstVaapiEncoderMap vaapi_encode_map[] = {
DEF_ENC (H264, h264),
DEF_ENC (MPEG2, mpeg2),
#if USE_JPEG_ENCODER
DEF_ENC (JPEG, jpeg),
#endif
#if USE_VP8_ENCODER
DEF_ENC (VP8, vp8),
#endif
#if USE_VP9_ENCODER
DEF_ENC (VP9, vp9),
#endif
#if USE_H265_ENCODER
DEF_ENC (H265, h265),
#endif
};
#undef DEF_ENC

View file

@ -70,16 +70,10 @@ static const char gst_vaapidecode_sink_caps_str[] =
GST_CAPS_CODEC("video/x-xvid")
GST_CAPS_CODEC("video/x-h263")
GST_CAPS_CODEC("video/x-h264")
#if USE_H265_DECODER
GST_CAPS_CODEC("video/x-h265")
#endif
GST_CAPS_CODEC("video/x-wmv")
#if USE_VP8_DECODER
GST_CAPS_CODEC("video/x-vp8")
#endif
#if USE_VP9_DECODER
GST_CAPS_CODEC("video/x-vp9")
#endif
;
static const char gst_vaapidecode_src_caps_str[] =
@ -110,9 +104,7 @@ struct _GstVaapiDecoderMap
};
static const GstVaapiDecoderMap vaapi_decode_map[] = {
#if USE_JPEG_DECODER
{GST_VAAPI_CODEC_JPEG, GST_RANK_MARGINAL, "jpeg", "image/jpeg", NULL},
#endif
{GST_VAAPI_CODEC_MPEG2, GST_RANK_PRIMARY, "mpeg2",
"video/mpeg, mpegversion=2, systemstream=(boolean)false", NULL},
{GST_VAAPI_CODEC_MPEG4, GST_RANK_PRIMARY, "mpeg4",
@ -122,15 +114,9 @@ static const GstVaapiDecoderMap vaapi_decode_map[] = {
gst_vaapi_decode_h264_install_properties},
{GST_VAAPI_CODEC_VC1, GST_RANK_PRIMARY, "vc1",
"video/x-wmv, wmvversion=3, format={WMV3,WVC1}", NULL},
#if USE_VP8_DECODER
{GST_VAAPI_CODEC_VP8, GST_RANK_PRIMARY, "vp8", "video/x-vp8", NULL},
#endif
#if USE_VP9_DECODER
{GST_VAAPI_CODEC_VP9, GST_RANK_PRIMARY, "vp9", "video/x-vp9", NULL},
#endif
#if USE_H265_DECODER
{GST_VAAPI_CODEC_H265, GST_RANK_PRIMARY, "h265", "video/x-h265", NULL},
#endif
{0 /* the rest */ , GST_RANK_PRIMARY + 1, NULL,
gst_vaapidecode_sink_caps_str, NULL},
};
@ -923,7 +909,6 @@ gst_vaapidecode_create (GstVaapiDecode * decode, GstCaps * caps)
}
}
break;
#if USE_H265_DECODER
case GST_VAAPI_CODEC_H265:
decode->decoder = gst_vaapi_decoder_h265_new (dpy, caps);
@ -945,26 +930,19 @@ gst_vaapidecode_create (GstVaapiDecode * decode, GstCaps * caps)
}
}
break;
#endif
case GST_VAAPI_CODEC_WMV3:
case GST_VAAPI_CODEC_VC1:
decode->decoder = gst_vaapi_decoder_vc1_new (dpy, caps);
break;
#if USE_JPEG_DECODER
case GST_VAAPI_CODEC_JPEG:
decode->decoder = gst_vaapi_decoder_jpeg_new (dpy, caps);
break;
#endif
#if USE_VP8_DECODER
case GST_VAAPI_CODEC_VP8:
decode->decoder = gst_vaapi_decoder_vp8_new (dpy, caps);
break;
#endif
#if USE_VP9_DECODER
case GST_VAAPI_CODEC_VP9:
decode->decoder = gst_vaapi_decoder_vp9_new (dpy, caps);
break;
#endif
default:
decode->decoder = NULL;
break;

View file

@ -86,16 +86,10 @@ static const char gst_vaapi_decode_bin_sink_caps_str[] =
GST_CAPS_CODEC("video/x-xvid")
GST_CAPS_CODEC("video/x-h263")
GST_CAPS_CODEC("video/x-h264")
#if USE_H265_DECODER
GST_CAPS_CODEC("video/x-h265")
#endif
GST_CAPS_CODEC("video/x-wmv")
#if USE_VP8_DECODER
GST_CAPS_CODEC("video/x-vp8")
#endif
#if USE_VP9_DECODER
GST_CAPS_CODEC("video/x-vp9")
#endif
;
/* *INDENT-ON* */

View file

@ -1412,7 +1412,7 @@ void
gst_vaapi_plugin_base_set_srcpad_can_dmabuf (GstVaapiPluginBase * plugin,
GstObject * object)
{
#if VA_CHECK_VERSION (0,36,0) && USE_EGL && USE_GST_GL_HELPERS
#if USE_EGL && USE_GST_GL_HELPERS
GstGLContext *const gl_context = GST_GL_CONTEXT (object);
plugin->srcpad_can_dmabuf =

View file

@ -21,22 +21,13 @@ if USE_ENCODERS
vaapi_sources += [
'gstvaapiencode.c',
'gstvaapiencode_h264.c',
'gstvaapiencode_h265.c',
'gstvaapiencode_jpeg.c',
'gstvaapiencode_mpeg2.c',
'gstvaapiencode_vp8.c',
]
endif
if USE_JPEG_ENCODER
vaapi_sources += 'gstvaapiencode_jpeg.c'
endif
if USE_VP8_ENCODER
vaapi_sources += 'gstvaapiencode_vp8.c'
endif
if USE_H265_ENCODER
vaapi_sources += 'gstvaapiencode_h265.c'
endif
if USE_VP9_ENCODER
vaapi_sources += 'gstvaapiencode_vp9.c'
endif

View file

@ -15,7 +15,7 @@ else
gst_version_nano = 0
endif
libva_req = ['>= 0.30.4', '!= 0.99.0']
libva_req = ['>= 0.39.0', '!= 0.99.0']
glib_req = '>= 2.40.0'
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
@ -54,9 +54,9 @@ gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
gmodule_dep = dependency('gmodule-2.0', required: false)
libva_dep = dependency('libva', version: libva_req)
libva_drm_dep = dependency('libva-drm', version: '>= 0.33.0', required: false)
libva_wayland_dep = dependency('libva-wayland', version: '>= 0.33.0', required: false)
libva_x11_dep = dependency('libva-x11', version: '>= 0.31.0', required: false)
libva_drm_dep = dependency('libva-drm', version: libva_req, required: false)
libva_wayland_dep = dependency('libva-wayland', version: libva_req, required: false)
libva_x11_dep = dependency('libva-x11', version: libva_req, required: false)
libdrm_dep = dependency('libdrm', required: false)
libudev_dep = dependency('libudev', required: false)
egl_dep = dependency('egl', required: false)
@ -84,18 +84,9 @@ if glesv2_dep.found()
endif
endif
USE_ENCODERS = libva_dep.version().version_compare('>= 0.34.0') and get_option('with_encoders') != 'no'
USE_H265_DECODER = cc.has_header('va/va_dec_hevc.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
USE_H265_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_hevc.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
USE_JPEG_DECODER = cc.has_header('va/va_dec_jpeg.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
USE_JPEG_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_jpeg.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
USE_VP8_DECODER = cc.has_header('va/va_dec_vp8.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
USE_VP8_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp8.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
USE_VP9_DECODER = cc.has_header('va/va_dec_vp9.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
USE_ENCODERS = get_option('with_encoders') != 'no'
USE_VP9_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp9.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
USE_VPP = cc.has_header('va/va_vpp.h', dependencies: libva_dep, prefix: '#include <va/va_vpp.h>')
USE_DRM = libva_drm_dep.found() and libdrm_dep.found() and libudev_dep.found() and get_option('with_drm') != 'no'
USE_EGL = gmodule_dep.found() and egl_dep.found() and GLES_VERSION_MASK != 0 and get_option('with_egl') != 'no'
USE_GLX = libva_x11_dep.found() and x11_dep.found() and gl_dep.found() and libdl_dep.found() and get_option('with_glx') != 'no'
@ -120,54 +111,15 @@ cdata.set10('USE_DRM', USE_DRM)
cdata.set10('USE_EGL', USE_EGL)
cdata.set10('USE_ENCODERS', USE_ENCODERS)
cdata.set10('USE_GLX', USE_GLX)
cdata.set10('USE_H265_DECODER', USE_H265_DECODER)
cdata.set10('USE_H265_ENCODER', USE_H265_ENCODER)
cdata.set10('USE_JPEG_DECODER', USE_JPEG_DECODER)
cdata.set10('USE_JPEG_ENCODER', USE_JPEG_ENCODER)
cdata.set10('USE_VP8_DECODER', USE_VP8_DECODER)
cdata.set10('USE_VP8_ENCODER', USE_VP8_ENCODER)
cdata.set10('USE_VP9_DECODER', USE_VP9_DECODER)
cdata.set10('USE_VP9_ENCODER', USE_VP9_ENCODER)
cdata.set10('USE_WAYLAND', USE_WAYLAND)
cdata.set10('USE_X11', USE_X11)
cdata.set10('HAVE_XKBLIB', cc.has_header('X11/XKBlib.h', dependencies: x11_dep))
cdata.set10('HAVE_XRANDR', xrandr_dep.found())
cdata.set10('HAVE_XRENDER', xrender_dep.found())
cdata.set10('USE_VA_VPP', USE_VPP)
cdata.set10('USE_GST_GL_HELPERS', gstgl_dep.found())
cdata.set('USE_GLES_VERSION_MASK', GLES_VERSION_MASK)
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

View file

@ -108,11 +108,9 @@ decoder_new (GstVaapiDisplay * display, const gchar * codec_name)
case GST_VAAPI_CODEC_H264:
decoder = gst_vaapi_decoder_h264_new (display, caps);
break;
#if USE_JPEG_DECODER
case GST_VAAPI_CODEC_JPEG:
decoder = gst_vaapi_decoder_jpeg_new (display, caps);
break;
#endif
case GST_VAAPI_CODEC_MPEG2:
decoder = gst_vaapi_decoder_mpeg2_new (display, caps);
break;

View file

@ -373,11 +373,9 @@ start_decoder (App * app)
case GST_VAAPI_CODEC_H264:
app->decoder = gst_vaapi_decoder_h264_new (app->display, caps);
break;
#if USE_JPEG_DECODER
case GST_VAAPI_CODEC_JPEG:
app->decoder = gst_vaapi_decoder_jpeg_new (app->display, caps);
break;
#endif
case GST_VAAPI_CODEC_MPEG2:
app->decoder = gst_vaapi_decoder_mpeg2_new (app->display, caps);
break;