mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
build: fix conditional compilation of VP8 decoder.
https://bugzilla.gnome.org/show_bug.cgi?id=729170 [added check for VASliceParameterBufferBase fields] Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
8d16aa87b2
commit
ee6d1b7bd1
4 changed files with 25 additions and 4 deletions
14
configure.ac
14
configure.ac
|
@ -701,6 +701,12 @@ AC_CACHE_CHECK([for JPEG decoding API],
|
|||
LIBS="$saved_LIBS"
|
||||
])
|
||||
|
||||
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],
|
||||
|
@ -712,12 +718,16 @@ AC_CACHE_CHECK([for VP8 decoding API],
|
|||
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;]])],
|
||||
VAIQMatrixBufferVP8 iq_matrix;
|
||||
slice_param.slice_data_offset = 0;
|
||||
slice_param.slice_data_flag = 0;]])],
|
||||
[ac_cv_have_vp8_decoding_api="yes" USE_VP8_DECODER=1],
|
||||
[ac_cv_have_vp8_decoding_api="no"]
|
||||
)
|
||||
|
@ -799,7 +809,7 @@ AC_DEFINE_UNQUOTED(USE_JPEG_DECODER, $USE_JPEG_DECODER,
|
|||
AM_CONDITIONAL(USE_JPEG_DECODER, test $USE_JPEG_DECODER -eq 1)
|
||||
|
||||
AC_DEFINE_UNQUOTED(USE_VP8_DECODER, $USE_VP8_DECODER,
|
||||
[Defined to 1 if JPEG decoder is used])
|
||||
[Defined to 1 if VP8 decoder is used])
|
||||
AM_CONDITIONAL(USE_VP8_DECODER, test $USE_VP8_DECODER -eq 1)
|
||||
|
||||
AC_DEFINE_UNQUOTED(USE_DRM, $USE_DRM,
|
||||
|
|
|
@ -56,7 +56,6 @@ libgstvaapi_source_c = \
|
|||
gstvaapidecoder_objects.c \
|
||||
gstvaapidecoder_unit.c \
|
||||
gstvaapidecoder_vc1.c \
|
||||
gstvaapidecoder_vp8.c \
|
||||
gstvaapidisplay.c \
|
||||
gstvaapidisplaycache.c \
|
||||
gstvaapifilter.c \
|
||||
|
@ -87,7 +86,6 @@ libgstvaapi_source_h = \
|
|||
gstvaapidecoder_mpeg2.h \
|
||||
gstvaapidecoder_mpeg4.h \
|
||||
gstvaapidecoder_vc1.h \
|
||||
gstvaapidecoder_vp8.h \
|
||||
gstvaapidisplay.h \
|
||||
gstvaapifilter.h \
|
||||
gstvaapiimage.h \
|
||||
|
@ -148,6 +146,13 @@ 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_enc_source_c = \
|
||||
gstvaapicodedbuffer.c \
|
||||
gstvaapicodedbufferpool.c \
|
||||
|
@ -472,6 +477,8 @@ EXTRA_DIST += \
|
|||
$(libgstvaapi_enc_source_priv_h) \
|
||||
$(libgstvaapi_jpegdec_source_c) \
|
||||
$(libgstvaapi_jpegdec_source_h) \
|
||||
$(libgstvaapi_vp8dec_source_c) \
|
||||
$(libgstvaapi_vp8dec_source_h) \
|
||||
$(NULL)
|
||||
|
||||
CLEANFILES = \
|
||||
|
|
|
@ -35,7 +35,9 @@
|
|||
#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"
|
||||
|
|
|
@ -633,9 +633,11 @@ gst_vaapidecode_create(GstVaapiDecode *decode, GstCaps *caps)
|
|||
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
|
||||
default:
|
||||
decode->decoder = NULL;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue