[arch-commits] Commit in gst-plugins-bad/trunk (PKGBUILD srtp-Support-libsrtp2.patch)
Date: Thursday, February 1, 2018 @ 19:17:56 Author: heftig Revision: 315741 1.12.4-3 Modified: gst-plugins-bad/trunk/PKGBUILD Deleted: gst-plugins-bad/trunk/srtp-Support-libsrtp2.patch -+ PKGBUILD| 15 srtp-Support-libsrtp2.patch | 832 -- 2 files changed, 6 insertions(+), 841 deletions(-) Modified: PKGBUILD === --- PKGBUILD2018-02-01 19:17:42 UTC (rev 315740) +++ PKGBUILD2018-02-01 19:17:56 UTC (rev 315741) @@ -4,7 +4,7 @@ pkgname=gst-plugins-bad pkgver=1.12.4 -pkgrel=2 +pkgrel=3 pkgdesc="GStreamer Multimedia Framework Bad Plugins" url="https://gstreamer.freedesktop.org/; arch=(x86_64) @@ -13,17 +13,15 @@ libmodplug libgme wayland libofa openjpeg2 libwebp libsrtp gnutls glu sbc rtmpdump libgudev graphene schroedinger libexif libdvdread libvdpau libmpeg2 wildmidi ladspa openal libusb vulkan-icd-loader libfdk-aac faac soundtouch spandsp neon - webrtc-audio-processing libdc1394 libmpcdec zvbi) + webrtc-audio-processing libdc1394 libmpcdec zvbi openexr libbs2b) makedepends=(python valgrind gobject-introspection gtk-doc git autoconf-archive vulkan-headers gtk3 clutter librsvg libtiger qt5-declarative qt5-x11extras qt5-wayland zbar - fluidsynth lilv opencv openexr) + fluidsynth lilv opencv) _commit=cbdbd8d4f6893e6042dbf7b8258e23a8d2aaf081 # tags/1.12.4^0 source=("git+https://anongit.freedesktop.org/git/gstreamer/gst-plugins-bad#commit=$_commit; -"gst-common::git+https://anongit.freedesktop.org/git/gstreamer/common; -srtp-Support-libsrtp2.patch) +"gst-common::git+https://anongit.freedesktop.org/git/gstreamer/common;) sha256sums=('SKIP' -'SKIP' -'12cb72b5972dcfbffa28176c5db9d701ebdbfb9dd8f26acf5500cc541abc87e7') +'SKIP') pkgver() { cd $pkgname @@ -38,8 +36,7 @@ git submodule update # libsrtp2 - git cherry-pick -n 029e01743f 17121ebc57 - patch -Np1 -i ../srtp-Support-libsrtp2.patch + git cherry-pick -n 029e01743f 17121ebc57 e9aa117200 sed -i 's/cmu_us_kal/&16/g' configure.ac ext/flite/gstflitetestsrc.c Deleted: srtp-Support-libsrtp2.patch === --- srtp-Support-libsrtp2.patch 2018-02-01 19:17:42 UTC (rev 315740) +++ srtp-Support-libsrtp2.patch 2018-02-01 19:17:56 UTC (rev 315741) @@ -1,832 +0,0 @@ -From 25713711519864ae2f666802d05b136772c3b84b Mon Sep 17 00:00:00 2001 -Message-Id: <25713711519864ae2f666802d05b136772c3b84b.1515749240.git.jsteff...@make.tv> -From: "Jan Alexander Steffens (heftig)"-Date: Thu, 11 Jan 2018 16:06:24 +0100 -Subject: [PATCH] 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 - configure.ac | 12 ++--- - ext/srtp/gstsrtp.c| 58 +- - ext/srtp/gstsrtp.h| 35 -- - ext/srtp/gstsrtpdec.c | 70 --- - ext/srtp/gstsrtpdec.h | 5 ++-- - ext/srtp/gstsrtpenc.c | 65 --- - ext/srtp/gstsrtpenc.h | 5 ++-- - ext/srtp/meson.build | 15 --- - 8 files changed, 178 insertions(+), 87 deletions(-) - -diff --git a/configure.ac b/configure.ac -index fc15bfd8a..7a8714360 100644 a/configure.ac -+++ b/configure.ac -@@ -2470,9 +2470,15 @@ AC_SUBST(LIBMMS_LIBS) - 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) -+ 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 -
[arch-commits] Commit in gst-plugins-bad/trunk (PKGBUILD srtp-Support-libsrtp2.patch)
Date: Friday, January 12, 2018 @ 23:50:57 Author: heftig Revision: 314671 1.12.4-2 Added: gst-plugins-bad/trunk/srtp-Support-libsrtp2.patch Modified: gst-plugins-bad/trunk/PKGBUILD -+ PKGBUILD| 12 srtp-Support-libsrtp2.patch | 832 ++ 2 files changed, 841 insertions(+), 3 deletions(-) Modified: PKGBUILD === --- PKGBUILD2018-01-12 23:32:02 UTC (rev 314670) +++ PKGBUILD2018-01-12 23:50:57 UTC (rev 314671) @@ -4,7 +4,7 @@ pkgname=gst-plugins-bad pkgver=1.12.4 -pkgrel=1 +pkgrel=2 pkgdesc="GStreamer Multimedia Framework Bad Plugins" url="https://gstreamer.freedesktop.org/; arch=(x86_64) @@ -19,9 +19,11 @@ fluidsynth lilv opencv openexr) _commit=cbdbd8d4f6893e6042dbf7b8258e23a8d2aaf081 # tags/1.12.4^0 source=("git+https://anongit.freedesktop.org/git/gstreamer/gst-plugins-bad#commit=$_commit; -"gst-common::git+https://anongit.freedesktop.org/git/gstreamer/common;) +"gst-common::git+https://anongit.freedesktop.org/git/gstreamer/common; +srtp-Support-libsrtp2.patch) sha256sums=('SKIP' -'SKIP') +'SKIP' +'12cb72b5972dcfbffa28176c5db9d701ebdbfb9dd8f26acf5500cc541abc87e7') pkgver() { cd $pkgname @@ -35,6 +37,10 @@ git config --local submodule.common.url "$srcdir/gst-common" git submodule update + # libsrtp2 + git cherry-pick -n 029e01743f 17121ebc57 + patch -Np1 -i ../srtp-Support-libsrtp2.patch + sed -i 's/cmu_us_kal/&16/g' configure.ac ext/flite/gstflitetestsrc.c NOCONFIGURE=1 ./autogen.sh Added: srtp-Support-libsrtp2.patch === --- srtp-Support-libsrtp2.patch (rev 0) +++ srtp-Support-libsrtp2.patch 2018-01-12 23:50:57 UTC (rev 314671) @@ -0,0 +1,832 @@ +From 25713711519864ae2f666802d05b136772c3b84b Mon Sep 17 00:00:00 2001 +Message-Id: <25713711519864ae2f666802d05b136772c3b84b.1515749240.git.jsteff...@make.tv> +From: "Jan Alexander Steffens (heftig)"+Date: Thu, 11 Jan 2018 16:06:24 +0100 +Subject: [PATCH] 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 +--- + configure.ac | 12 ++--- + ext/srtp/gstsrtp.c| 58 +- + ext/srtp/gstsrtp.h| 35 -- + ext/srtp/gstsrtpdec.c | 70 --- + ext/srtp/gstsrtpdec.h | 5 ++-- + ext/srtp/gstsrtpenc.c | 65 --- + ext/srtp/gstsrtpenc.h | 5 ++-- + ext/srtp/meson.build | 15 --- + 8 files changed, 178 insertions(+), 87 deletions(-) + +diff --git a/configure.ac b/configure.ac +index fc15bfd8a..7a8714360 100644 +--- a/configure.ac b/configure.ac +@@ -2470,9 +2470,15 @@ AC_SUBST(LIBMMS_LIBS) + 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) ++ 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) + ]) +diff --git a/ext/srtp/gstsrtp.c b/ext/srtp/gstsrtp.c +index 1f2d3015c..0c1e235ab 100644 +--- a/ext/srtp/gstsrtp.c b/ext/srtp/gstsrtp.c +@@ -21,21 +21,46 @@ + * Boston, MA 02111-1307, USA. + */ + +-#ifdef HAVE_CONFIG_H +-#include "config.h" +-#endif + + #define GLIB_DISABLE_DEPRECATION_WARNINGS + + #include "gstsrtp.h" + +-#include +- + #include + + #include "gstsrtpenc.h" + #include "gstsrtpdec.h" + ++#ifndef HAVE_SRTP2 ++srtp_err_status_t ++srtp_set_stream_roc (srtp_t session, guint32 ssrc, guint32 roc) ++{ ++ srtp_stream_t stream; ++ ++