[packages/mediastreamer] - up to 2.16.1
arekm
arekm at pld-linux.org
Wed Sep 26 12:25:16 CEST 2018
commit c28fe572b5012e86641e4e158a8578ee12c79a3a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Sep 26 12:25:09 2018 +0200
- up to 2.16.1
build.patch | 10 ++
ffmpeg4.patch | 20 ----
libsrtp2.patch | 241 +++++++++++++++++++++++++++++++++++++++++++
mediastreamer-ffmpeg.patch | 11 --
mediastreamer-imagedir.patch | 24 -----
mediastreamer-werror.patch | 11 --
mediastreamer.spec | 36 +++----
7 files changed, 269 insertions(+), 84 deletions(-)
---
diff --git a/mediastreamer.spec b/mediastreamer.spec
index 7702d4b..8ae4089 100644
--- a/mediastreamer.spec
+++ b/mediastreamer.spec
@@ -19,16 +19,14 @@
Summary: Audio/Video real-time streaming
Summary(pl.UTF-8): Przesyłanie strumieni audio/video w czasie rzeczywistym
Name: mediastreamer
-Version: 2.12.1
-Release: 4
+Version: 2.16.1
+Release: 1
License: GPL v2+
Group: Libraries
-Source0: http://download-mirror.savannah.gnu.org/releases/linphone/mediastreamer/%{name}-%{version}.tar.gz
-# Source0-md5: 1ca115e94a718638fbecf8352c169861
-Patch0: %{name}-imagedir.patch
-Patch1: %{name}-ffmpeg.patch
-Patch2: %{name}-werror.patch
-Patch3: ffmpeg4.patch
+Source0: https://linphone.org/releases/sources//mediastreamer/%{name}-%{version}.tar.gz
+# Source0-md5: 15b8b129a922180855d04d58cdd08d43
+Patch0: build.patch
+Patch1: libsrtp2.patch
URL: http://www.linphone.org/technical-corner/mediastreamer2/overview
%{?with_opengl:BuildRequires: OpenGL-GLX-devel}
BuildRequires: SDL-devel >= 1.2.0
@@ -37,7 +35,7 @@ BuildRequires: SDL-devel >= 1.2.0
BuildRequires: autoconf >= 2.53
BuildRequires: automake >= 1:1.9
%{?with_bcg729:BuildRequires: bcg729-devel >= 1.0}
-%{?with_zrtp:BuildRequires: bzrtp-devel >= 1.0.0}
+%{?with_zrtp:BuildRequires: bzrtp-devel >= 1.0.6}
BuildRequires: doxygen
# libavcodec >= 51.0.0, libswscale >= 0.7.0
BuildRequires: ffmpeg-devel
@@ -55,7 +53,7 @@ BuildRequires: libv4l-devel
BuildRequires: libvpx-devel >= 0.9.6
%{?with_matroska:BuildRequires: matroska-foundation-devel}
BuildRequires: opus-devel >= 0.9.0
-BuildRequires: ortp-devel >= 0.24.0
+BuildRequires: ortp-devel >= 1.0.0
BuildRequires: pkgconfig
BuildRequires: polarssl-devel
%{?with_portaudio:BuildRequires: portaudio-devel}
@@ -64,18 +62,18 @@ BuildRequires: sed >= 4.0
BuildRequires: spandsp-devel >= 0.0.6
BuildRequires: speex-devel >= 1:1.2-beta3
BuildRequires: speexdsp-devel >= 1.2-beta3
-%{?with_srtp:BuildRequires: srtp-devel}
+%{?with_srtp:BuildRequires: libsrtp2-devel}
BuildRequires: xorg-lib-libX11-devel
BuildRequires: xorg-lib-libXv-devel
BuildRequires: xxd
%{?with_bcg729:Requires: bcg729 >= 1.0}
-%{?with_zrtp:Requires: bzrtp >= 1.0.0}
+%{?with_zrtp:Requires: bzrtp >= 1.0.6}
%{?with_opengl:Requires: glew >= 1.5}
Requires: libtheora >= 1.0-0.alpha7
Requires: libupnp >= 1.6
Requires: libvpx >= 0.9.6
Requires: opus >= 0.9.0
-Requires: ortp >= 0.24.0
+Requires: ortp >= 1.0.0
%{?with_pulseaudio:Requires: pulseaudio-libs >= 0.9.21}
Requires: spandsp >= 0.0.6
Requires: speex >= 1:1.2-beta3
@@ -100,7 +98,7 @@ Requires: %{name} = %{version}-%{release}
%{?with_opengl:Requires: OpenGL-devel}
%{?with_alsa:Requires: alsa-lib-devel}
%{?with_bcg729:Requires: bcg729-devel >= 1.0}
-%{?with_zrtp:Requires: bzrtp-devel >= 1.0.0}
+%{?with_zrtp:Requires: bzrtp-devel >= 1.0.6}
Requires: ffmpeg-devel
%{?with_opengl:Requires: glew-devel >= 1.5}
Requires: libtheora-devel >= 1.0-0.alpha7
@@ -110,14 +108,14 @@ Requires: libv4l-devel
Requires: libvpx-devel >= 0.9.6
%{?with_matroska:Requires: matroska-foundation-devel}
Requires: opus-devel >= 0.9.0
-Requires: ortp-devel >= 0.24.0
+Requires: ortp-devel >= 1.0.0
Requires: polarssl-devel
%{?with_portaudio:Requires: portaudio-devel}
%{?with_pulseaudio:Requires: pulseaudio-devel >= 0.9.21}
Requires: spandsp-devel >= 0.0.6
Requires: speex-devel >= 1:1.2-beta3
Requires: speexdsp-devel >= 1.2-beta3
-%{?with_srtp:Requires: srtp-devel}
+%{?with_srtp:Requires: libsrtp2-devel}
Requires: xorg-lib-libX11-devel
Requires: xorg-lib-libXv-devel
@@ -144,11 +142,13 @@ Statyczne biblioteki mediastreamer.
%setup -q
%patch0 -p1
%patch1 -p1
-%patch2 -p1
-%patch3 -p1
+
+[ ! -e gitversion.h ] && echo '#define MS2_GIT_VERSION "%{version}"' > src/gitversion.h
%build
%{__libtoolize}
+%{__gettextize}
+%{__intltoolize}
%{__aclocal}
%{__autoconf}
%{__autoheader}
diff --git a/build.patch b/build.patch
new file mode 100644
index 0000000..625626d
--- /dev/null
+++ b/build.patch
@@ -0,0 +1,10 @@
+--- mediastreamer-2.16.1/configure.ac~ 2017-06-23 10:52:57.000000000 +0200
++++ mediastreamer-2.16.1/configure.ac 2018-09-26 12:03:38.918658108 +0200
+@@ -1311,7 +1311,6 @@ AC_SUBST(MS_PUBLIC_CFLAGS)
+
+ AC_CONFIG_FILES(
+ Makefile
+- po/Makefile.in
+ m4/Makefile
+ include/Makefile
+ include/mediastreamer2/Makefile
diff --git a/ffmpeg4.patch b/ffmpeg4.patch
deleted file mode 100644
index 6b7558c..0000000
--- a/ffmpeg4.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- mediastreamer-2.12.1/src/videofilters/nowebcam.c~ 2018-04-28 19:50:35.000000000 +0200
-+++ mediastreamer-2.12.1/src/videofilters/nowebcam.c 2018-04-28 19:53:20.814288813 +0200
-@@ -32,7 +32,7 @@
- #ifndef NO_FFMPEG
- #include "ffmpeg-priv.h"
- #else
--#define FF_INPUT_BUFFER_PADDING_SIZE 32
-+#define AV_INPUT_BUFFER_PADDING_SIZE 32
- #endif
-
- #if TARGET_OS_IPHONE
-@@ -248,7 +248,7 @@
- ms_error("Cannot load %s",jpgpath);
- return NULL;
- }
-- jpgbuf=(uint8_t*)ms_malloc0(statbuf.st_size + FF_INPUT_BUFFER_PADDING_SIZE);
-+ jpgbuf=(uint8_t*)ms_malloc0(statbuf.st_size + AV_INPUT_BUFFER_PADDING_SIZE);
- if (jpgbuf==NULL)
- {
- close(fd);
diff --git a/libsrtp2.patch b/libsrtp2.patch
new file mode 100644
index 0000000..91cbae0
--- /dev/null
+++ b/libsrtp2.patch
@@ -0,0 +1,241 @@
+diff -u -r mediastreamer2-2.16.1/configure.ac mediastreamer2-2.16.1-libsrtp2/configure.ac
+--- mediastreamer2-2.16.1/configure.ac 2017-07-21 15:00:47.000000000 +0200
++++ mediastreamer2-2.16.1-libsrtp2/configure.ac 2018-01-13 00:06:22.194089121 +0100
+@@ -1041,7 +1041,7 @@
+
+ dnl check for libsrtp support (secure rtp)
+ AC_ARG_WITH(srtp,
+- AC_HELP_STRING([--with-srtp], [Set prefix where libsrtp can be found or "none" to disable (ex:/usr or /usr/local) [[default=/usr]]]),
++ AC_HELP_STRING([--with-srtp], [Set prefix where libsrtp2 can be found or "none" to disable (ex:/usr or /usr/local) [[default=/usr]]]),
+ [srtp_prefix=$withval],
+ [if test "$prefix" != "NONE"; then
+ srtp_prefix=$prefix
+@@ -1051,22 +1051,22 @@
+
+ if test "${srtp_prefix}" != "none" ; then
+ if test "${srtp_prefix}" != "/usr" ; then
+- SRTP_CFLAGS="-I${srtp_prefix}/include -I${srtp_prefix}/include/srtp"
++ SRTP_CFLAGS="-I${srtp_prefix}/include -I${srtp_prefix}/include/srtp2"
+ SRTP_LIBS="-L${srtp_prefix}/lib"
+ fi
+- SRTP_LIBS="$SRTP_LIBS -lsrtp"
++ SRTP_LIBS="$SRTP_LIBS -lsrtp2"
+
+ dnl check srtp headers
+ CPPFLAGS_save=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $SRTP_CFLAGS"
+- AC_CHECK_HEADER([srtp/srtp.h],have_srtp_headers=yes)
++ AC_CHECK_HEADER([srtp2/srtp.h],have_srtp_headers=yes)
+ CPPFLAGS=$CPPFLAGS_save
+
+ dnl check for srtp lib
+ LDFLAGS_save=$LDFLAGS
+ LDFLAGS="$LDFLAGS $SRTP_LIBS"
+ LIBS_save=$LIBS
+- AC_CHECK_LIB(srtp,[srtp_init, crypto_policy_set_aes_cm_256_hmac_sha1_80, crypto_policy_set_aes_cm_256_hmac_sha1_32], have_srtp_lib=yes)
++ AC_CHECK_LIB(srtp2,[srtp_init, srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80, srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32], have_srtp_lib=yes)
+ LDFLAGS=$LDFLAGS_save
+ LIBS=$LIBS_save
+
+@@ -1075,9 +1075,9 @@
+ LIBS_save=$LIBS
+ LDFLAGS="$LDFLAGS $SRTP_LIBS"
+ AC_CHECK_LIB(
+- srtp,
++ srtp2,
+ sha1_update,[
+- AC_MSG_WARN([This libsrtp version exports symbols conflicting with polarssl, resulting in a bad execution path. libsrtp will be statically linked])
++ AC_MSG_WARN([This libsrtp2 version exports symbols conflicting with polarssl, resulting in a bad execution path. libsrtp2 will be statically linked])
+ srtp_polarssl_conflict=yes
+ ],
+ srtp_polarssl_conflict=no
+@@ -1086,13 +1086,13 @@
+ LIBS=$LIBS_save
+
+ if test "$srtp_polarssl_conflict" = "yes"; then
+- srtp_static_lib="${srtp_prefix}/lib/libsrtp.a"
++ srtp_static_lib="${srtp_prefix}/lib/libsrtp2.a"
+ if test -f $srtp_static_lib -a -r $srtp_static_lib; then
+- SRTP_LIBS="${srtp_prefix}/lib/libsrtp.a -Bsymbolic -Wl,--version-script=\$(top_srcdir)/src/libsrtp.map"
++ SRTP_LIBS="${srtp_prefix}/lib/libsrtp2.a -Bsymbolic -Wl,--version-script=\$(top_srcdir)/src/libsrtp2.map"
+ AC_DEFINE(HAVE_SRTP, 1, [Defined when srtp support is compiled])
+ have_srtp=true
+ else
+- AC_MSG_WARN([Could not access to $srtp_static_lib. Please use --with-srtp=PREFIX to specify the prefix where libsrtp.a has been installed])
++ AC_MSG_WARN([Could not access to $srtp_static_lib. Please use --with-srtp=PREFIX to specify the prefix where libsrtp2.a has been installed])
+ SRTP_CFLAGS=
+ SRTP_LIBS=
+ have_srtp=true
+diff -u -r mediastreamer2-2.16.1/src/crypto/ms_srtp.c mediastreamer2-2.16.1-libsrtp2/src/crypto/ms_srtp.c
+--- mediastreamer2-2.16.1/src/crypto/ms_srtp.c 2017-07-21 15:00:47.000000000 +0200
++++ mediastreamer2-2.16.1-libsrtp2/src/crypto/ms_srtp.c 2018-01-13 00:14:48.575306030 +0100
+@@ -38,7 +38,7 @@
+ // Windows phone doesn't use make install
+ #include <srtp.h>
+ #else
+-#include <srtp/srtp.h>
++#include <srtp2/srtp.h>
+ #endif
+
+
+@@ -99,7 +99,7 @@
+ /**** Sender functions ****/
+ static int _process_on_send(RtpSession* session,MSSrtpStreamContext *ctx, mblk_t *m){
+ int slen;
+- err_status_t err;
++ srtp_err_status_t err;
+ bool_t is_rtp=ctx->is_rtp;
+ rtp_header_t *rtp_header=is_rtp?(rtp_header_t*)m->b_rptr:NULL;
+ rtcp_common_header_t *rtcp_header=!is_rtp?(rtcp_common_header_t*)m->b_rptr:NULL;
+@@ -109,7 +109,7 @@
+ ms_mutex_lock(&ctx->mutex);
+ if (!ctx->secured) {
+ /*does not make sense to protect, because we don't have any key*/
+- err=err_status_ok;
++ err=srtp_err_status_ok;
+ slen = 0; /*droping packets*/
+ } else {
+ /* defragment incoming message and enlarge the buffer for srtp to write its data */
+@@ -120,7 +120,7 @@
+ } else if (rtcp_header && (slen>RTP_FIXED_HEADER_SIZE && rtcp_header->version==2)) {
+ ms_mutex_lock(&ctx->mutex);
+ if (!ctx->secured) {
+- err=err_status_ok;
++ err=srtp_err_status_ok;
+ /*does not make sense to protect, because we don't have any key*/
+ slen = 0; /*droping packets*/
+ } else {
+@@ -135,7 +135,7 @@
+ }
+
+ /* check return code from srtp_protect */
+- if (err==err_status_ok){
++ if (err==srtp_err_status_ok){
+ return slen;
+ }
+ ortp_error("srtp_protect%s() failed (%d) for stream ctx [%p]", is_rtp?"":"_rtcp", err,ctx);
+@@ -151,7 +151,7 @@
+ }
+ static int _process_on_receive(RtpSession* session,MSSrtpStreamContext *ctx, mblk_t *m, int err){
+ int slen;
+- err_status_t srtp_err;
++ srtp_err_status_t srtp_err;
+ bool_t is_rtp=ctx->is_rtp;
+
+ /* keep NON-RTP data unencrypted */
+@@ -167,7 +167,7 @@
+
+ slen=err;
+ srtp_err = is_rtp?srtp_unprotect(ctx->srtp,m->b_rptr,&slen):srtp_unprotect_rtcp(ctx->srtp,m->b_rptr,&slen);
+- if (srtp_err==err_status_ok) {
++ if (srtp_err==srtp_err_status_ok) {
+ return slen;
+ } else {
+ ms_error("srtp_unprotect%s() failed (%d) on stream ctx [%p]", is_rtp?"":"_rtcp", srtp_err,ctx);
+@@ -201,7 +201,7 @@
+
+
+ static int ms_media_stream_session_fill_srtp_context(MSMediaStreamSessions *sessions, bool_t is_send, bool_t is_rtp) {
+- err_status_t err=0;
++ srtp_err_status_t err=0;
+ RtpTransport *transport=NULL;
+ MSSrtpStreamContext* stream_ctx = get_stream_context(sessions,is_send,is_rtp);
+
+@@ -258,28 +258,28 @@
+ }
+
+
+-static int ms_set_srtp_crypto_policy(MSCryptoSuite suite, crypto_policy_t *policy) {
++static int ms_set_srtp_srtp_crypto_policy(MSCryptoSuite suite, srtp_crypto_policy_t *policy) {
+ switch(suite){
+ case MS_AES_128_SHA1_32:
+ // srtp doc says: not adapted to rtcp...
+- crypto_policy_set_aes_cm_128_hmac_sha1_32(policy);
++ srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32(policy);
+ break;
+ case MS_AES_128_NO_AUTH:
+ // srtp doc says: not adapted to rtcp...
+- crypto_policy_set_aes_cm_128_null_auth(policy);
++ srtp_crypto_policy_set_aes_cm_128_null_auth(policy);
+ break;
+ case MS_NO_CIPHER_SHA1_80:
+- crypto_policy_set_null_cipher_hmac_sha1_80(policy);
++ srtp_crypto_policy_set_null_cipher_hmac_sha1_80(policy);
+ break;
+ case MS_AES_128_SHA1_80: /*default mode*/
+- crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
++ srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80(policy);
+ break;
+ case MS_AES_256_SHA1_80: // For backward compatibility
+ case MS_AES_CM_256_SHA1_80:
+- crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
+- break;
++ srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(policy);
++ break;
+ case MS_AES_256_SHA1_32:
+- crypto_policy_set_aes_cm_256_hmac_sha1_32(policy);
++ srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32(policy);
+ break;
+ case MS_CRYPTO_SUITE_INVALID:
+ return -1;
+@@ -291,13 +291,13 @@
+ static int ms_add_srtp_stream(srtp_t srtp, MSCryptoSuite suite, uint32_t ssrc, const char* key, size_t key_length, bool_t is_send, bool_t is_rtp)
+ {
+ srtp_policy_t policy;
+- err_status_t err;
+- ssrc_t ssrc_conf;
++ srtp_err_status_t err;
++ srtp_ssrc_t ssrc_conf;
+
+ memset(&policy,0,sizeof(policy));
+
+ if (is_rtp) {
+- if (ms_set_srtp_crypto_policy(suite, &policy.rtp) != 0) {
++ if (ms_set_srtp_srtp_crypto_policy(suite, &policy.rtp) != 0) {
+ return -1;
+ }
+ /* check if key length match given policy */
+@@ -306,7 +306,7 @@
+ return -1;
+ }
+ }else {
+- if (ms_set_srtp_crypto_policy(suite, &policy.rtcp) != 0) {
++ if (ms_set_srtp_srtp_crypto_policy(suite, &policy.rtcp) != 0) {
+ return -1;
+ }
+ if ((int)key_length != policy.rtcp.cipher_key_len) {
+@@ -326,7 +326,7 @@
+ policy.next = NULL;
+
+ err = srtp_add_stream(srtp, &policy);
+- if (err != err_status_ok) {
++ if (err != srtp_err_status_ok) {
+ ms_error("Failed to add stream to srtp session (%d)", err);
+ return -1;
+ }
+@@ -344,7 +344,7 @@
+ int ms_srtp_init(void)
+ {
+
+- err_status_t st=0;
++ srtp_err_status_t st=0;
+ ms_message("srtp init");
+ if (!srtp_init_done) {
+ st=srtp_init();
+@@ -352,7 +352,6 @@
+ srtp_init_done++;
+ }else{
+ ms_fatal("Couldn't initialize SRTP library: %d.", st);
+- err_reporting_init("mediastreamer2");
+ }
+ }else srtp_init_done++;
+ return (int)st;
+@@ -508,7 +507,7 @@
+ #else /* HAVE_SRTP */
+
+ typedef void* srtp_t;
+-typedef int err_status_t;
++typedef int srtp_err_status_t;
+
+ bool_t ms_srtp_supported(void){
+ return FALSE;
diff --git a/mediastreamer-ffmpeg.patch b/mediastreamer-ffmpeg.patch
deleted file mode 100644
index 2f3359d..0000000
--- a/mediastreamer-ffmpeg.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mediastreamer-2.12.0/configure.ac.orig 2015-11-02 14:44:12.252105408 +0100
-+++ mediastreamer-2.12.0/configure.ac 2015-11-10 19:53:44.207627872 +0100
-@@ -82,7 +82,7 @@
- esac
-
- if test "$strictness" = "yes" ; then
-- STRICT_OPTIONS="$STRICT_OPTIONS -Werror"
-+ STRICT_OPTIONS="$STRICT_OPTIONS -Werror -Wno-error=deprecated-declarations"
- CFLAGS="$CFLAGS -fno-strict-aliasing"
- fi
- AC_SUBST(STRICT_OPTIONS)
diff --git a/mediastreamer-imagedir.patch b/mediastreamer-imagedir.patch
deleted file mode 100644
index d1bc200..0000000
--- a/mediastreamer-imagedir.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -dur -x '*~' mediastreamer-2.9.0.orig/src/Makefile.am mediastreamer-2.9.0/src/Makefile.am
---- mediastreamer-2.9.0.orig/src/Makefile.am 2013-05-30 10:09:06.000000000 +0200
-+++ mediastreamer-2.9.0/src/Makefile.am 2013-06-17 10:35:37.000000000 +0200
-@@ -363,7 +363,7 @@
-
- AM_OBJCFLAGS=$(AM_CFLAGS)
-
--imgdir=$(datadir)/images/
-+imgdir=$(datadir)/pixmaps/mediastreamer
-
- img_DATA=voip/nowebcamCIF.jpg
-
-diff -dur -x '*~' mediastreamer-2.9.0.orig/src/videofilters/nowebcam.c mediastreamer-2.9.0/src/videofilters/nowebcam.c
---- mediastreamer-2.9.0.orig/src/videofilters/nowebcam.c 2013-02-20 14:38:36.000000000 +0100
-+++ mediastreamer-2.9.0/src/videofilters/nowebcam.c 2013-06-17 10:37:20.000000000 +0200
-@@ -1783,7 +1783,7 @@
-
- static char *def_image=NULL;
-
--static const char *def_image_path=PACKAGE_DATA_DIR "/images/" NOWEBCAM_JPG ".jpg";
-+static const char *def_image_path="/usr/share/pixmaps/mediastreamer/" NOWEBCAM_JPG ".jpg";
-
-
- mblk_t *ms_load_nowebcam(MSVideoSize *reqsize, int idx){
diff --git a/mediastreamer-werror.patch b/mediastreamer-werror.patch
deleted file mode 100644
index f7f7fbf..0000000
--- a/mediastreamer-werror.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mediastreamer-2.12.1/src/videofilters/msv4l2.c.orig 2015-10-19 13:42:10.603994267 +0200
-+++ mediastreamer-2.12.1/src/videofilters/msv4l2.c 2016-03-31 18:44:22.923935372 +0200
-@@ -343,7 +343,7 @@
-
- static int set_camera_feature(V4l2State *s, unsigned int ctl_id, int value, const char *feature_name){
- struct v4l2_ext_control ctl={0};
-- struct v4l2_ext_controls ctls={0};
-+ struct v4l2_ext_controls ctls={{0}};
- struct v4l2_queryctrl queryctrl={0};
-
- queryctrl.id = ctl_id;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mediastreamer.git/commitdiff/c28fe572b5012e86641e4e158a8578ee12c79a3a
More information about the pld-cvs-commit
mailing list