1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

net/mediastreamer: Update version 2.16.1=>5.1.43

- Switch MASTER_SITES to GL_SITES
- Take MAINTAINERSHIP
- Switch LICENSE from GPLv2+ to GPLv3

Relnotes: https://gitlab.linphone.org/BC/public/mediastreamer2/-/tags/5.1.43
This commit is contained in:
Muhammad Moinur Rahman 2022-06-15 16:58:33 -05:00
parent 5b1a3b218f
commit f5d45a7b0d
9 changed files with 98 additions and 238 deletions

View File

@ -1,93 +1,92 @@
# Created by: Maxim Sobolev <sobomax@FreeBSD.org>
PORTNAME= mediastreamer
PORTVERSION= 2.16.1
PORTREVISION= 7
PORTVERSION= 5.1.43
CATEGORIES= net
MASTER_SITES= https://www.linphone.org/releases/sources/mediastreamer/
MAINTAINER= ports@FreeBSD.org
MAINTAINER= bofh@FreeBSD.org
COMMENT= Real-time audio and video streaming and processing
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
LIB_DEPENDS= libbctoolbox.so:net/bctoolbox \
libbzrtp.so:security/bzrtp \
libortp.so:net/ortp \
libspeexdsp.so:audio/speexdsp \
libsrtp2.so:net/libsrtp2 \
libbzrtp.so:security/bzrtp
libsrtp2.so:net/libsrtp2
USES= cmake compiler python:build
USES= cmake compiler gnome python:build sqlite
USE_GITLAB= yes
GL_SITE= https://gitlab.linphone.org/BC
GL_ACCOUNT= public
GL_PROJECT= ${PORTNAME}2
GL_COMMIT= bdd96a6c47faeff1d88fff2bf64ec9274c0b2b9d
USE_GNOME= libxml2
USE_LDCONFIG= yes
CMAKE_ARGS= -DENABLE_ALSA=NO -DENABLE_BV16=NO -DENABLE_DOC=NO \
-DENABLE_JPEG=NO -DENABLE_OSS=YES -DENABLE_PULSEAUDIO=NO \
-DENABLE_STATIC=NO -DENABLE_STRICT=NO -DENABLE_TOOLS=NO \
CMAKE_ARGS= -DCMAKE_PREFIX_PATH=${LOCALBASE} \
-DENABLE_ALSA=NO \
-DENABLE_BV16=NO \
-DENABLE_DOC=NO \
-DENABLE_JPEG=NO \
-DENABLE_OSS=YES \
-DENABLE_PULSEAUDIO=NO \
-DENABLE_STATIC=NO \
-DENABLE_STRICT=NO \
-DENABLE_TOOLS=NO \
-DENABLE_UNIT_TESTS=NO
LDFLAGS+= -pthread
OPTIONS_DEFINE= MATROSKA VIDEO
OPTIONS_DEFAULT= FFMPEG G729 GLX GSM MATROSKA OPUS SPEEX THEORA V4L \
VIDEO VPX XVIDEO
OPTIONS_GROUP= AUDIOOPT VIDEOOPT
OPTIONS_GROUP_AUDIOOPT= G726 G729 GSM OPUS SPEEX
OPTIONS_GROUP_VIDEOOPT= FFMPEG GLX THEORA V4L VPX XVIDEO
OPTIONS_DEFAULT= MATROSKA VIDEO \
G729 GSM OPUS SPEEX \
FFMPEG GLX THEORA V4L VPX XVIDEO
OPTIONS_SUB= yes
AUDIOOPT_DESC= Audio options
AUDIOOPT_DESC= Audio options
G726_DESC= G.726 codec support
G729_DESC= G.729 codec support
VIDEOOPT_DESC= Video options
FFMPEG_IMPLIES= VIDEO
FFMPEG_CMAKE_BOOL= ENABLE_FFMPEG
FFMPEG_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg
G726_CMAKE_BOOL= ENABLE_G726
G726_DESC= G.726 codec support
FFMPEG_CMAKE_BOOL= ENABLE_FFMPEG
G726_LIB_DEPENDS= libspandsp.so:comms/spandsp
G729_CMAKE_BOOL= ENABLE_G729
G729_DESC= G.729 codec support
G726_CMAKE_BOOL= ENABLE_G726
G729_LIB_DEPENDS= libbcg729.so:audio/bcg729
GLX_IMPLIES= VIDEO
GLX_CMAKE_BOOL= ENABLE_GL ENABLE_GLX
GLX_USES= gl
GLX_USE= GL=glew
GSM_CMAKE_BOOL= ENABLE_GSM
G729_CMAKE_BOOL= ENABLE_G729
GLX_IMPLIES= VIDEO
GLX_USES= gl
GLX_USE= GL=gl,glew
GLX_CMAKE_BOOL= ENABLE_GL ENABLE_GLX
GSM_LIB_DEPENDS= libgsm.so:audio/gsm
MATROSKA_CMAKE_BOOL= ENABLE_MKV
GSM_CMAKE_BOOL= ENABLE_GSM
MATROSKA_LIB_DEPENDS= libbcmatroska2.so:multimedia/bcmatroska2
OPUS_CMAKE_BOOL= ENABLE_OPUS
MATROSKA_CMAKE_BOOL= ENABLE_MKV
OPUS_LIB_DEPENDS= libopus.so:audio/opus
SPEEX_CMAKE_BOOL= ENABLE_SPEEX_CODEC
OPUS_CMAKE_BOOL= ENABLE_OPUS
SPEEX_LIB_DEPENDS= libspeex.so:audio/speex
SPEEX_CMAKE_BOOL= ENABLE_SPEEX_CODEC
THEORA_IMPLIES= VIDEO
THEORA_CMAKE_BOOL= ENABLE_THEORA
THEORA_LIB_DEPENDS= libtheora.so:multimedia/libtheora
THEORA_CMAKE_BOOL= ENABLE_THEORA
V4L_IMPLIES= VIDEO
V4L_CMAKE_BOOL= ENABLE_V4L
V4L_BUILD_DEPENDS= v4l_compat>=1.0.20120501:multimedia/v4l_compat
V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l
VIDEOOPT_DESC= Video options
V4L_CMAKE_BOOL= ENABLE_V4L
VIDEO_CMAKE_BOOL= ENABLE_VIDEO
VPX_IMPLIES= VIDEO
VPX_CMAKE_BOOL= ENABLE_VPX
VPX_LIB_DEPENDS= libvpx.so:multimedia/libvpx
VPX_CMAKE_BOOL= ENABLE_VPX
XVIDEO_IMPLIES= VIDEO
XVIDEO_CMAKE_BOOL= ENABLE_X11 ENABLE_XV
XVIDEO_USES= xorg
XVIDEO_USE= XORG=xorgproto,x11,xv
XVIDEO_USE= XORG=x11,xorgproto,xv
XVIDEO_CMAKE_BOOL= ENABLE_X11 ENABLE_XV
XVIDEO_LDFLAGS= -L${LOCALBASE}/lib -lX11
.include <bsd.port.pre.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1506006953
SHA256 (mediastreamer-2.16.1.tar.gz) = 33351f9409e229a00aaf831930916e1934d8e972773e95f7b7177c9e4cc61772
SIZE (mediastreamer-2.16.1.tar.gz) = 18904458
TIMESTAMP = 1655325691
SHA256 (public-mediastreamer2-bdd96a6c47faeff1d88fff2bf64ec9274c0b2b9d_GL0.tar.gz) = 656e7dbb65d3f7b1773e178193f7d44226820d32b5cb6478afc89191e3d8a182
SIZE (public-mediastreamer2-bdd96a6c47faeff1d88fff2bf64ec9274c0b2b9d_GL0.tar.gz) = 25309406

View File

@ -1,139 +0,0 @@
diff --git a/cmake/FindSRTP.cmake b/cmake/FindSRTP.cmake
index 988b846a..f720ce7e 100644
--- cmake/FindSRTP.cmake
+++ cmake/FindSRTP.cmake
@@ -31,20 +31,36 @@ set(_SRTP_ROOT_PATHS
)
find_path(SRTP_INCLUDE_DIRS
- NAMES srtp/srtp.h
+ NAMES srtp2/srtp.h
HINTS _SRTP_ROOT_PATHS
PATH_SUFFIXES include
)
if(SRTP_INCLUDE_DIRS)
set(HAVE_SRTP_SRTP_H 1)
-endif()
-
-find_library(SRTP_LIBRARIES
+ set(SRTP_VERSION 2)
+ find_library(SRTP_LIBRARIES
+ NAMES srtp2
+ HINTS ${_SRTP_ROOT_PATHS}
+ PATH_SUFFIXES bin lib
+ )
+else()
+ find_path(SRTP_INCLUDE_DIRS
+ NAMES srtp/srtp.h
+ HINTS _SRTP_ROOT_PATHS
+ PATH_SUFFIXES include
+ )
+ if(SRTP_INCLUDE_DIRS)
+ set(HAVE_SRTP_SRTP_H 1)
+ set(SRTP_VERSION 1)
+ endif()
+ find_library(SRTP_LIBRARIES
NAMES srtp
HINTS ${_SRTP_ROOT_PATHS}
PATH_SUFFIXES bin lib
)
+endif()
+
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SRTP
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index da429764..c46faa62 100644
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -183,6 +183,7 @@ set(VOIP_SOURCE_FILES_C
utils/pcap_sender.c
utils/pcap_sender.h
utils/stream_regulator.c
+ utils/srtp_prefix.h
voip/audioconference.c
voip/audiostream.c
voip/bandwidthcontroller.c
diff --git a/src/crypto/ms_srtp.c b/src/crypto/ms_srtp.c
index 5a510c99..67810316 100644
--- src/crypto/ms_srtp.c
+++ src/crypto/ms_srtp.c
@@ -25,6 +25,7 @@
#include "mediastreamer2/ms_srtp.h"
#include "mediastreamer2/mediastream.h"
+
#ifdef HAVE_SRTP
/*srtp defines all this stuff*/
@@ -34,13 +35,7 @@
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
-#if defined(MS2_WINDOWS_PHONE)
-// Windows phone doesn't use make install
-#include <srtp.h>
-#else
-#include <srtp/srtp.h>
-#endif
-
+#include "srtp_prefix.h"
#include "ortp/b64.h"
@@ -352,7 +347,6 @@ int ms_srtp_init(void)
srtp_init_done++;
}else{
ms_fatal("Couldn't initialize SRTP library: %d.", st);
- err_reporting_init("mediastreamer2");
}
}else srtp_init_done++;
return (int)st;
diff --git a/src/utils/srtp_prefix.h b/src/utils/srtp_prefix.h
new file mode 100644
index 00000000..68bde496
--- /dev/null
+++ src/utils/srtp_prefix.h
@@ -0,0 +1,41 @@
+/*
+ mediastreamer2 library - modular sound and video processing and streaming
+ Copyright (C) 2006-2014 Belledonne Communications, Grenoble
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+#ifndef __SRTP2_H__
+#define __SRTP2_H__
+
+#if defined(MS2_WINDOWS_PHONE)
+// Windows phone doesn't use make install
+#include <srtp.h>
+#elif SRTP_VERSION==1
+#include <srtp/srtp.h>
+#else
+#include <srtp2/srtp.h>
+#define err_status_t srtp_err_status_t
+#define err_status_ok srtp_err_status_ok
+#define crypto_policy_t srtp_crypto_policy_t
+#define crypto_policy_set_aes_cm_256_hmac_sha1_80 srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80
+#define crypto_policy_set_aes_cm_128_hmac_sha1_32 srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32
+#define crypto_policy_set_aes_cm_128_null_auth srtp_crypto_policy_set_aes_cm_128_null_auth
+#define crypto_policy_set_null_cipher_hmac_sha1_80 srtp_crypto_policy_set_null_cipher_hmac_sha1_80
+#define crypto_policy_set_aes_cm_128_hmac_sha1_80 srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80
+#define crypto_policy_set_aes_cm_256_hmac_sha1_32 srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32
+#define ssrc_t srtp_ssrc_t
+#endif
+
+#endif

View File

@ -1,11 +0,0 @@
--- CMakeLists.txt.orig 2017-07-21 13:00:14 UTC
+++ CMakeLists.txt
@@ -139,7 +139,7 @@ if(ENABLE_OSS)
endif()
endif()
-check_library_exists("dl" "dlopen" "" HAVE_DLOPEN)
+set(HAVE_DLOPEN 1)
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)

View File

@ -1,22 +0,0 @@
--- src/CMakeLists.txt.orig 2017-07-21 12:59:53 UTC
+++ src/CMakeLists.txt
@@ -79,9 +79,6 @@ set(BASE_LIBS
if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
list(APPEND BASE_LIBS ${LIBGCC} ${LIBMINGWEX} ole32 oleaut32 uuid Winmm Ws2_32)
endif()
-if(HAVE_DLOPEN)
- list(APPEND BASE_LIBS dl)
-endif()
bc_apply_compile_flags(BASE_SOURCE_FILES_C STRICT_OPTIONS_CPP STRICT_OPTIONS_C)
@@ -550,9 +547,6 @@ if(ANDROID_SUPPORT_LIBRARY)
endif()
if(ANDROID AND ENABLE_VIDEO)
list(APPEND VOIP_LIBS GLESv2)
-endif()
-if(HAVE_DLOPEN)
- list(APPEND VOIP_LIBS dl)
endif()
if(PCAP_FOUND)
list(APPEND VOIP_LIBS ${PCAP_LIBRARIES})

View File

@ -1,6 +1,6 @@
--- src/base/msfactory.c.orig 2017-07-20 13:56:05 UTC
--- src/base/msfactory.c.orig 2022-06-10 12:50:07 UTC
+++ src/base/msfactory.c
@@ -20,14 +20,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Bos
@@ -20,11 +20,10 @@
#ifdef HAVE_CONFIG_H
#include "mediastreamer-config.h"
#include "gitversion.h"
@ -9,19 +9,21 @@
# ifndef MEDIASTREAMER_VERSION
# define MEDIASTREAMER_VERSION "unknown"
# endif
# ifndef MS2_GIT_VERSION
# define MS2_GIT_VERSION "unknown"
# endif
-#endif
#include "mediastreamer2/msfilter.h"
#include "mediastreamer2/mseventqueue.h"
@@ -184,7 +183,7 @@ void ms_factory_init(MSFactory *obj){
#ifndef MS2_GIT_VERSION
#define MS2_GIT_VERSION "unknown"
@@ -194,7 +193,7 @@ void ms_factory_init(MSFactory *obj){
GetNativeSystemInfo( &sysinfo );
num_cpu = sysinfo.dwNumberOfProcessors;
-#elif __APPLE__ || __linux
-#elif __APPLE__ || __linux__
+#elif __APPLE__ || __linux || __DragonFly__ || __FreeBSD__
num_cpu = sysconf( _SC_NPROCESSORS_CONF); /*check the number of processors configured, not just the one that are currently active.*/
#elif __QNX__
num_cpu = _syspage_ptr->num_cpu;
@@ -1156,4 +1155,3 @@ const MSList *ms_factory_get_filter_decs(const MSFacto
const MSList *ms_factory_get_filter_decs(const MSFactory *factory) {
return factory->desc_list;
}
-

View File

@ -1,5 +1,5 @@
--- src/utils/dsptools.c.orig 2013-01-14 16:13:45.000000000 +0100
+++ src/utils/dsptools.c 2014-07-11 10:34:30.000000000 +0200
--- src/utils/dsptools.c.orig 2022-06-10 12:50:07 UTC
+++ src/utils/dsptools.c
@@ -61,7 +61,7 @@
#ifdef HAVE_ALLOCA_H
#include <alloca.h>

View File

@ -0,0 +1,11 @@
--- src/videofilters/mkv.cpp.orig 2022-06-15 21:27:54 UTC
+++ src/videofilters/mkv.cpp
@@ -1645,7 +1645,7 @@ static matroska_block *matroska_write_block(Matroska *
codecPrivateElt = (ebml_binary *)EBML_MasterAddElt(blockGroup, &MATROSKA_ContextCodecState, FALSE);
EBML_BinarySetData(codecPrivateElt, codecPrivateData, codecPrivateDataSize);
}
- MATROSKA_BlockSetTrackNum(block, trackNum);
+ MATROSKA_BlockGetFrameEnd(block, trackNum);
MATROSKA_LinkBlockWithReadTracks(block, obj->tracks, TRUE);
MATROSKA_LinkBlockWriteSegmentInfo(block, obj->info);
MATROSKA_BlockSetKeyframe(block, isKeyFrame);

View File

@ -1,6 +1,22 @@
include/OpenGL/EGL/egl.h
include/OpenGL/EGL/eglext.h
include/OpenGL/EGL/eglplatform.h
include/OpenGL/GLES2/gl2.h
include/OpenGL/GLES2/gl2ext.h
include/OpenGL/GLES2/gl2platform.h
include/OpenGL/GLES3/gl3.h
include/OpenGL/GLES3/gl31.h
include/OpenGL/GLES3/gl32.h
include/OpenGL/GLES3/gl3platform.h
include/OpenGL/KHR/khrplatform.h
include/OpenGL/LICENSE
include/OpenGL/README.md
include/OpenGL/angle_windowsstore.h
include/mediastreamer2/allfilters.h
include/mediastreamer2/android_utils.h
include/mediastreamer2/bitratecontrol.h
include/mediastreamer2/bits_rw.h
include/mediastreamer2/box-plot.h
include/mediastreamer2/devices.h
include/mediastreamer2/dsptools.h
include/mediastreamer2/dtls_srtp.h
@ -10,6 +26,7 @@ include/mediastreamer2/formats.h
include/mediastreamer2/ice.h
include/mediastreamer2/mediastream.h
include/mediastreamer2/ms_srtp.h
include/mediastreamer2/msanalysedisplay.h
include/mediastreamer2/msasync.h
include/mediastreamer2/msaudiomixer.h
include/mediastreamer2/mschanadapter.h
@ -29,9 +46,12 @@ include/mediastreamer2/msitc.h
include/mediastreamer2/msjava.h
include/mediastreamer2/msjpegwriter.h
include/mediastreamer2/msmediaplayer.h
include/mediastreamer2/msmediarecorder.h
include/mediastreamer2/msmire.h
include/mediastreamer2/msogl.h
include/mediastreamer2/msogl_functions.h
include/mediastreamer2/mspcapfileplayer.h
include/mediastreamer2/msqrcodereader.h
include/mediastreamer2/msqueue.h
include/mediastreamer2/msrtp.h
include/mediastreamer2/msrtt4103.h
@ -46,6 +66,8 @@ include/mediastreamer2/msvaddtx.h
include/mediastreamer2/msvideo.h
include/mediastreamer2/msvideoout.h
include/mediastreamer2/msvideopresets.h
include/mediastreamer2/msvideoqualitycontroller.h
include/mediastreamer2/msvideoswitcher.h
include/mediastreamer2/msvolume.h
include/mediastreamer2/mswebcam.h
include/mediastreamer2/qualityindicator.h
@ -54,10 +76,8 @@ include/mediastreamer2/stun.h
include/mediastreamer2/upnp_igd.h
include/mediastreamer2/x11_helper.h
include/mediastreamer2/zrtp.h
lib/libmediastreamer_base.so
lib/libmediastreamer_base.so.10
lib/libmediastreamer_voip.so
lib/libmediastreamer_voip.so.10
lib/libmediastreamer.so
lib/libmediastreamer.so.11
share/Mediastreamer2/cmake/Mediastreamer2Config.cmake
share/Mediastreamer2/cmake/Mediastreamer2ConfigVersion.cmake
share/Mediastreamer2/cmake/Mediastreamer2Targets-%%CMAKE_BUILD_TYPE%%.cmake