configure.ac: Auto-enable vaapi recorder, but allow overrides
If libva is available and recent, we'll enable the vaapi recorder feature, but it can also be forced on or off by --enable/disable-vaapi-recorder.
This commit is contained in:
+14
-4
@@ -240,10 +240,20 @@ PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])
|
|||||||
AS_IF([test "x$have_webp" = "xyes"],
|
AS_IF([test "x$have_webp" = "xyes"],
|
||||||
[AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
|
[AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
|
||||||
|
|
||||||
PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0], [have_libva=yes], [have_libva=no])
|
AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],,
|
||||||
AS_IF([test "x$have_libva" = "xyes"],
|
enable_vaapi_recorder=auto)
|
||||||
[AC_DEFINE([HAVE_LIBVA], [1], [Have libva])])
|
if test x$enable_vaapi_recorder != xno; then
|
||||||
AM_CONDITIONAL(ENABLE_LIBVA, test "x$have_libva" = "xyes")
|
PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0],
|
||||||
|
[have_libva=yes], [have_libva=no])
|
||||||
|
if test "x$have_libva" = "xno" -a "x$enable_vaapi_recorder" = "xyes"; then
|
||||||
|
AC_MSG_ERROR([vaapi-recorder explicitly enabled, but libva couldn't be found])
|
||||||
|
else
|
||||||
|
AC_DEFINE([BUILD_VAAPI_RECORDER], [1], [Build the vaapi recorder])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(ENABLE_VAAPI_RECORDER,
|
||||||
|
test "x$enable_libva_recorder" != xno -a "x$have_libva" = xyes)
|
||||||
|
|
||||||
|
|
||||||
AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes)
|
AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes)
|
||||||
if test x$have_jpeglib = xyes; then
|
if test x$have_jpeglib = xyes; then
|
||||||
|
|||||||
+1
-1
@@ -153,7 +153,7 @@ drm_backend_la_SOURCES = \
|
|||||||
libbacklight.c \
|
libbacklight.c \
|
||||||
libbacklight.h
|
libbacklight.h
|
||||||
|
|
||||||
if ENABLE_LIBVA
|
if ENABLE_VAAPI_RECORDER
|
||||||
drm_backend_la_SOURCES += vaapi-recorder.c
|
drm_backend_la_SOURCES += vaapi-recorder.c
|
||||||
drm_backend_la_LIBADD += $(LIBVA_LIBS)
|
drm_backend_la_LIBADD += $(LIBVA_LIBS)
|
||||||
drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
|
drm_backend_la_CFLAGS += $(LIBVA_CFLAGS)
|
||||||
|
|||||||
@@ -2446,7 +2446,7 @@ planes_binding(struct weston_seat *seat, uint32_t time, uint32_t key, void *data
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBVA
|
#ifdef BUILD_VAAPI_RECORDER
|
||||||
static void
|
static void
|
||||||
recorder_frame_notify(struct wl_listener *listener, void *data)
|
recorder_frame_notify(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user