mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
celt: Make celt version checks better extensible
This commit is contained in:
parent
5cdcb21529
commit
5df4c86c17
2 changed files with 18 additions and 10 deletions
22
configure.ac
22
configure.ac
|
@ -661,15 +661,23 @@ AG_GST_CHECK_FEATURE(CDAUDIO, [cdaudio], cdaudio, [
|
|||
dnl *** celt ***
|
||||
translit(dnm, m, l) AM_CONDITIONAL(USE_CELT, true)
|
||||
AG_GST_CHECK_FEATURE(CELT, [celt], celt, [
|
||||
PKG_CHECK_MODULES(CELT, celt >= 0.5.0, [
|
||||
HAVE_CELT="yes"], [
|
||||
PKG_CHECK_MODULES(CELT, celt >= 0.4.0, [
|
||||
PKG_CHECK_MODULES(CELT, celt >= 0.4.0, [
|
||||
HAVE_CELT="yes"
|
||||
AC_DEFINE([HAVE_CELT_0_4], 1, [Define if libcelt 0.4 is installed])
|
||||
],[
|
||||
HAVE_CELT="no"
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
HAVE_CELT="no"
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES(CELT_0_5, celt >= 0.5.0, [
|
||||
AC_DEFINE([HAVE_CELT_0_5], 1, [Define if libcelt 0.5 is installed])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES(CELT_0_7, celt >= 0.7.0, [
|
||||
AC_DEFINE([HAVE_CELT_0_7], 1, [Define if libcelt 0.7 is installed])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
AC_SUBST(CELT_CFLAGS)
|
||||
AC_SUBST(CELT_LIBS)
|
||||
|
|
|
@ -777,13 +777,13 @@ gst_celt_enc_encode (GstCeltEnc * enc, gboolean flush)
|
|||
|
||||
GST_DEBUG_OBJECT (enc, "encoding %d samples (%d bytes)", frame_size, bytes);
|
||||
|
||||
#ifdef HAVE_CELT_0_4
|
||||
#ifdef HAVE_CELT_0_5
|
||||
outsize =
|
||||
celt_encode (enc->state, data,
|
||||
celt_encode (enc->state, data, NULL,
|
||||
GST_BUFFER_DATA (outbuf), bytes_per_packet);
|
||||
#else
|
||||
outsize =
|
||||
celt_encode (enc->state, data, NULL,
|
||||
celt_encode (enc->state, data,
|
||||
GST_BUFFER_DATA (outbuf), bytes_per_packet);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue