Fix compilation with libplist 2.3.0.
This commit is contained in:
+71
-20
@@ -408,27 +408,78 @@ if test "x$with_airplay_2" = "xyes" ; then
|
||||
AC_DEFINE([CONFIG_AIRPLAY_2], 1, [Build for AirPlay 2])
|
||||
AC_CHECK_PROG(XXD_CHECK,xxd,yes)
|
||||
AS_IF([test x"$XXD_CHECK" != x"yes"], [AC_MSG_ERROR([xxd can not be found. Please install xxd for building for AirPlay 2.])])
|
||||
PKG_CHECK_MODULES([libplist], [libplist >= 2.0.0],[CFLAGS="${libplist_CFLAGS} ${CFLAGS}" LIBS="${libplist_LIBS} ${LIBS}"],[
|
||||
PKG_CHECK_MODULES([libplist], [libplist-2.0 >= 2.0.0],[CFLAGS="${libplist_CFLAGS} ${CFLAGS}" LIBS="${libplist_LIBS} ${LIBS}"],[
|
||||
AC_MSG_ERROR(AirPlay 2 support requires libplist 2.0.0 or later -- search for pkg libplist-dev on Debian or libplist-2.2.0 or later on FreeBSD!)
|
||||
])
|
||||
PKG_CHECK_MODULES(
|
||||
[libplist], [libplist >= 2.3.0],
|
||||
[CFLAGS="${libplist_CFLAGS} ${CFLAGS}" LIBS="${libplist_LIBS} ${LIBS}" AC_DEFINE([HAVE_LIBPLIST_GE_2_3_0], 1, [libplist >= 2.3.0])],
|
||||
[PKG_CHECK_MODULES(
|
||||
[libplist], [libplist-2.0 >= 2.3.0],
|
||||
[CFLAGS="${libplist_CFLAGS} ${CFLAGS}" LIBS="${libplist_LIBS} ${LIBS}" AC_DEFINE([HAVE_LIBPLIST_GE_2_3_0], 1, [libplist >= 2.3.0])],
|
||||
[PKG_CHECK_MODULES(
|
||||
[libplist], [libplist >= 2.0.0],
|
||||
[CFLAGS="${libplist_CFLAGS} ${CFLAGS}" LIBS="${libplist_LIBS} ${LIBS}"],
|
||||
[PKG_CHECK_MODULES(
|
||||
[libplist], [libplist-2.0 >= 2.0.0],
|
||||
[CFLAGS="${libplist_CFLAGS} ${CFLAGS}" LIBS="${libplist_LIBS} ${LIBS}"],
|
||||
[AC_MSG_ERROR(AirPlay 2 support requires libplist 2.0.0 or later -- search for pkg libplist-dev on Debian or libplist-2.2.0 or later on FreeBSD!)]
|
||||
)]
|
||||
)]
|
||||
)]
|
||||
)
|
||||
PKG_CHECK_MODULES(
|
||||
[libsodium], [libsodium],
|
||||
[CFLAGS="${libsodium_CFLAGS} ${CFLAGS}" LIBS="${libsodium_LIBS} ${LIBS}"],
|
||||
[AC_MSG_ERROR(AirPlay 2 support requires libsodium -- libsodium-dev suggested)]
|
||||
)
|
||||
PKG_CHECK_MODULES(
|
||||
[libgcrypt], [libgcrypt],
|
||||
[CFLAGS="${libgcrypt_CFLAGS} ${CFLAGS}" LIBS="${libgcrypt_LIBS} ${LIBS}"],
|
||||
[AC_CHECK_LIB(
|
||||
[gcrypt], [gcry_control],
|
||||
[],
|
||||
[AC_MSG_ERROR([Airplay 2 support requires libgcrypt -- libgcrypt-dev suggested])]
|
||||
)
|
||||
])
|
||||
PKG_CHECK_MODULES([libsodium], [libsodium],[CFLAGS="${libsodium_CFLAGS} ${CFLAGS}" LIBS="${libsodium_LIBS} ${LIBS}"],[AC_MSG_ERROR(AirPlay 2 support requires libsodium -- libsodium-dev suggested)])
|
||||
PKG_CHECK_MODULES([libgcrypt], [libgcrypt],[CFLAGS="${libgcrypt_CFLAGS} ${CFLAGS}" LIBS="${libgcrypt_LIBS} ${LIBS}"],[
|
||||
AC_CHECK_LIB([gcrypt], [gcry_control], [], [
|
||||
AC_MSG_ERROR([Airplay 2 support requires libgcrypt -- libgcrypt-dev suggested])
|
||||
])
|
||||
])
|
||||
PKG_CHECK_MODULES([libavutil], [libavutil],[CFLAGS="${libavutil_CFLAGS} ${CFLAGS}" LIBS="${libavutil_LIBS} ${LIBS}"],[
|
||||
AC_MSG_ERROR(AirPlay 2 support requires libavutil -- libavutil-dev suggested)])
|
||||
PKG_CHECK_MODULES([libavcodec], [libavcodec],[CFLAGS="${libavcodec_CFLAGS} ${CFLAGS}" LIBS="${libavcodec_LIBS} ${LIBS}"],[
|
||||
AC_CHECK_LIB([avcodec], [avcodec_find_decoder], [], [
|
||||
AC_MSG_ERROR(AirPlay 2 support requires libavcodec -- libavcodec-dev suggested)
|
||||
])
|
||||
])
|
||||
AC_CHECK_LIB([avformat],[avformat_new_stream], [], [AC_MSG_ERROR([AirPlay 2 support requires libavformat -- libavformat-dev suggested])])
|
||||
AC_CHECK_LIB([swresample],[swr_convert], [], [AC_MSG_ERROR([AirPlay 2 support requires libswresample -- libswresample-dev suggested])])
|
||||
AC_CHECK_LIB([uuid],[uuid_generate], [], [AC_MSG_ERROR([AirPlay 2 support requires the uuid library -- uuid-dev suggested])])
|
||||
PKG_CHECK_MODULES(
|
||||
[libavutil], [libavutil],
|
||||
[CFLAGS="${libavutil_CFLAGS} ${CFLAGS}" LIBS="${libavutil_LIBS} ${LIBS}"],
|
||||
[AC_MSG_ERROR(AirPlay 2 support requires libavutil -- libavutil-dev suggested)]
|
||||
)
|
||||
PKG_CHECK_MODULES(
|
||||
[libavcodec], [libavcodec],
|
||||
[CFLAGS="${libavcodec_CFLAGS} ${CFLAGS}" LIBS="${libavcodec_LIBS} ${LIBS}"],
|
||||
[AC_CHECK_LIB(
|
||||
[avcodec], [avcodec_find_decoder],
|
||||
[],
|
||||
[AC_MSG_ERROR(AirPlay 2 support requires libavcodec -- libavcodec-dev suggested)]
|
||||
)]
|
||||
)
|
||||
PKG_CHECK_MODULES(
|
||||
[libavformat], [libavformat],
|
||||
[CFLAGS="${libavformat_CFLAGS} ${CFLAGS}" LIBS="${libavformat_LIBS} ${LIBS}"],
|
||||
[AC_CHECK_LIB(
|
||||
[avformat], [avformat_new_stream],
|
||||
[],
|
||||
[AC_MSG_ERROR([AirPlay 2 support requires libavformat -- libavformat-dev suggested])]
|
||||
)]
|
||||
)
|
||||
PKG_CHECK_MODULES(
|
||||
[libswresample], [libswresample],
|
||||
[CFLAGS="${libswresample_CFLAGS} ${CFLAGS}" LIBS="${libswresample_LIBS} ${LIBS}"],
|
||||
[AC_CHECK_LIB(
|
||||
[swresample], [swr_convert],
|
||||
[],
|
||||
[AC_MSG_ERROR([AirPlay 2 support requires libswresample -- libswresample-dev suggested])]
|
||||
)]
|
||||
)
|
||||
PKG_CHECK_MODULES(
|
||||
[libuuid], [uuid],
|
||||
[CFLAGS="${libuuid_CFLAGS} ${CFLAGS}" LIBS="${libuuid_LIBS} ${LIBS}"],
|
||||
[AC_CHECK_LIB(
|
||||
[uuid], [uuid_generate],
|
||||
[],
|
||||
[AC_MSG_ERROR([AirPlay 2 support requires the uuid library -- uuid-dev suggested])]
|
||||
)]
|
||||
)
|
||||
fi
|
||||
AM_CONDITIONAL([USE_AIRPLAY_2], [test "x$with_airplay_2" = "xyes"])
|
||||
|
||||
|
||||
@@ -91,6 +91,10 @@
|
||||
#include "plist/plist.h"
|
||||
#include "plist_xml_strings.h"
|
||||
#include "ptp-utilities.h"
|
||||
|
||||
#ifdef HAVE_LIBPLIST_GE_2_3_0
|
||||
#define plist_from_memory(plist_data, length, plist) plist_from_memory((plist_data), (length), (plist), NULL)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DBUS_INTERFACE
|
||||
@@ -4247,7 +4251,7 @@ int send_metadata_to_queue(pc_queue *queue, uint32_t type, uint32_t code, char *
|
||||
// pointer to data or NULL,
|
||||
// length of data or NULL,
|
||||
// the rtsp_message or NULL,
|
||||
|
||||
|
||||
// the rtsp_message is sent for 'core' messages, because it contains the data
|
||||
// and must not be freed until the data has been read.
|
||||
// So, it is passed to send_metadata to be retained, sent to the thread where metadata
|
||||
@@ -4265,7 +4269,7 @@ int send_metadata_to_queue(pc_queue *queue, uint32_t type, uint32_t code, char *
|
||||
// If the rtsp_message is NULL, then if the pointer is non-null then the data it
|
||||
// points to, of the length specified, is memcpy'd and passed to the metadata
|
||||
// handler. The handler should free it when done.
|
||||
|
||||
|
||||
// If the rtsp_message is NULL and the pointer is also NULL, nothing further
|
||||
// is done.
|
||||
// clang-format on
|
||||
|
||||
Reference in New Issue
Block a user