summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2018-01-26 16:25:33 +0100
committerSebastian Dröge <sebastian@centricular.com>2018-01-29 09:58:11 +0200
commite9aa11720071f8a1d22b336395e66dd8cbca0c00 (patch)
tree79955955ae69c66817148b6feef8030a570957af /configure.ac
parent49d30c901d5ee7db1082432103cdce2fcbf99267 (diff)
downloadgstreamer-plugins-bad-e9aa11720071f8a1d22b336395e66dd8cbca0c00.tar.gz
srtp: Support libsrtp2
For libsrtp 1, add defines that translate the new namespaced identifiers to the old unnamespaced ones. Also move the code for setting and getting a stream's ROC into two compat functions that match libsrtp2's API. It seems that libsrtp2 properly supports changing the ROC without having to touch the sequence numbers afterwards, given that srtp_set_stream_roc sets a pending_roc field, so the entire roc_changed dance should not be needed anymore. The compat functions for libsrtp 1 just contain our preexisting hacks, however, so it's still needed there. libsrtp2 has no means of discovering the streams in the session, so to create the stats structure we need to iterate over our own set of SSRCs. For this we also need to re-add the previously removed ssrcs_set to the encoder. https://bugzilla.gnome.org/show_bug.cgi?id=776901
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 9 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index dc15e58cd..2359bc4f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1524,9 +1524,15 @@ AG_GST_CHECK_FEATURE(SRT, [srt library], srt, [
dnl *** libsrtp ***
translit(dnm, m, l) AM_CONDITIONAL(USE_SRTP, true)
AG_GST_CHECK_FEATURE(SRTP, [srtp library], srtp, [
- PKG_CHECK_MODULES(SRTP, libsrtp, HAVE_SRTP="yes",
- AG_GST_CHECK_LIBHEADER(SRTP, srtp, srtp_init, , srtp/srtp.h, SRTP_LIBS="-lsrtp")
- )
+ HAVE_SRTP="no"
+ AG_GST_PKG_CHECK_MODULES(SRTP, libsrtp2 >= 2.1.0)
+ if test x"$HAVE_SRTP" = x"yes"; then
+ AC_DEFINE([HAVE_SRTP2], 1, [Define if libsrtp2 is used])
+ else
+ PKG_CHECK_MODULES(SRTP, libsrtp, HAVE_SRTP="yes",
+ AG_GST_CHECK_LIBHEADER(SRTP, srtp, srtp_init, , srtp/srtp.h, SRTP_LIBS="-lsrtp")
+ )
+ fi
AC_SUBST(SRTP_LIBS)
AC_SUBST(SRTP_CFLAGS)
])