mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 23:58:17 +00:00
msdk: Add conditional build for vp9 decoder
https://bugzilla.gnome.org/show_bug.cgi?id=796119
This commit is contained in:
parent
955c927189
commit
0bdcf51baf
4 changed files with 39 additions and 5 deletions
27
configure.ac
27
configure.ac
|
@ -1139,9 +1139,34 @@ AG_GST_CHECK_FEATURE(MSDK, [Intel MediaSDK], msdk, [
|
|||
else
|
||||
HAVE_MSDK="no"
|
||||
fi
|
||||
])
|
||||
], [], [
|
||||
dnl check the availability of vp9 apis
|
||||
USE_MSDK_VP9_DEC=0
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$LIBMFX_CFLAGS $MSDK_CFLAGS $save_CPPFLAGS"
|
||||
AC_CHECK_HEADER(mfxvp9.h, [HAVE_MFXVP9_H=1], [HAVE_MFXVP9_H=0],
|
||||
[
|
||||
#include <mfxplugin.h>
|
||||
])
|
||||
dnl check the availability of vp9 apis in PREFIX/include/mfx
|
||||
AC_CHECK_HEADER(mfx/mfxvp9.h, [HAVE_MFX_MFXVP9_H=1], [HAVE_MFX_MFXVP9_H=0],
|
||||
[
|
||||
#include <mfx/mfxplugin.h>
|
||||
])
|
||||
if test $HAVE_MFX_MFXVP9_H -eq 1; then
|
||||
AC_DEFINE(HAVE_MFX_MFXVP9_H, 1, [Define if mfx/mfxdefs.h available])
|
||||
fi
|
||||
|
||||
if test $HAVE_MFXVP9_H -eq 1 \
|
||||
-o $HAVE_MFX_MFXVP9_H -eq 1; then
|
||||
USE_MSDK_VP9_DEC=1
|
||||
AC_DEFINE(USE_MSDK_VP9_DEC, 1, [Define if MediaSDK VP9 decoder api is available])
|
||||
fi
|
||||
], [USE_MSDK_VP9_DEC=0])
|
||||
AM_CONDITIONAL(USE_MSDK_LIBVA,
|
||||
test "x$HAVE_MSDK" = "xyes" -a "x$HAVE_LIBVA_DRM" = "xyes")
|
||||
AM_CONDITIONAL([USE_MSDK_VP9_DEC],
|
||||
[test $USE_MSDK_VP9_DEC -eq 1])
|
||||
|
||||
dnl *** ext plug-ins ***
|
||||
dnl keep this list sorted alphabetically !
|
||||
|
|
|
@ -17,7 +17,6 @@ libgstmsdk_la_SOURCES = \
|
|||
gstmsdkvp8dec.c \
|
||||
gstmsdkvp8enc.c \
|
||||
gstmsdkvc1dec.c \
|
||||
gstmsdkvp9dec.c \
|
||||
gstmsdkdec.c \
|
||||
gstmsdkenc.c \
|
||||
gstmsdkvpp.c \
|
||||
|
@ -48,12 +47,19 @@ noinst_HEADERS = \
|
|||
gstmsdkvp8dec.h \
|
||||
gstmsdkvp8enc.h \
|
||||
gstmsdkvc1dec.h \
|
||||
gstmsdkvp9dec.h \
|
||||
gstmsdkdec.h \
|
||||
gstmsdkenc.h \
|
||||
gstmsdkvpp.h \
|
||||
gstmsdkvpputil.h
|
||||
|
||||
# Conditional build for vp9 decoder
|
||||
libgstmsdk_vp9dec_source_c = gstmsdkvp9dec.c
|
||||
libgstmsdk_vp9dec_source_h = gstmsdkvp9dec.h
|
||||
if USE_MSDK_VP9_DEC
|
||||
libgstmsdk_la_SOURCES += $(libgstmsdk_vp9dec_source_c)
|
||||
noinst_HEADERS += $(libgstmsdk_vp9dec_source_h)
|
||||
endif
|
||||
|
||||
libgstmsdk_la_CFLAGS = \
|
||||
$(GST_CFLAGS) \
|
||||
$(GST_BASE_CFLAGS) \
|
||||
|
|
|
@ -47,7 +47,9 @@
|
|||
#include "gstmsdkvp8dec.h"
|
||||
#include "gstmsdkvp8enc.h"
|
||||
#include "gstmsdkvc1dec.h"
|
||||
#ifdef USE_MSDK_VP9_DEC
|
||||
#include "gstmsdkvp9dec.h"
|
||||
#endif
|
||||
#include "gstmsdkvpp.h"
|
||||
|
||||
GST_DEBUG_CATEGORY (gst_msdk_debug);
|
||||
|
@ -132,9 +134,10 @@ plugin_init (GstPlugin * plugin)
|
|||
|
||||
ret = gst_element_register (plugin, "msdkvc1dec", GST_RANK_NONE,
|
||||
GST_TYPE_MSDKVC1DEC);
|
||||
|
||||
#ifdef USE_MSDK_VP9_DEC
|
||||
ret = gst_element_register (plugin, "msdkvp9dec", GST_RANK_NONE,
|
||||
GST_TYPE_MSDKVP9DEC);
|
||||
#endif
|
||||
|
||||
ret = gst_element_register (plugin, "msdkvpp", GST_RANK_NONE,
|
||||
GST_TYPE_MSDKVPP);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBMFX
|
||||
#ifdef HAVE_MFX_MFXVP9_H
|
||||
# include <mfx/mfxplugin.h>
|
||||
# include <mfx/mfxvp9.h>
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue