From f5786fcba3af4bb507e759d937e12e23731150bc Mon Sep 17 00:00:00 2001 From: wxf Date: Wed, 23 Jun 2021 10:34:02 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=85=BC=E5=AE=B9=20glibc=20<=202.18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * https://stackoverflow.com/a/8132440/5218590 * https://sourceware.org/bugzilla/show_bug.cgi?id=15366 --- webrtc/Sdp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/Sdp.cpp b/webrtc/Sdp.cpp index 892a9afb..bcf6acb6 100644 --- a/webrtc/Sdp.cpp +++ b/webrtc/Sdp.cpp @@ -10,7 +10,7 @@ #include "Sdp.h" #include "Rtsp/Rtsp.h" -#include +#include using namespace mediakit; using onCreateSdpItem = function; From 549b07f598406edfc02d884cedb6de4055962666 Mon Sep 17 00:00:00 2001 From: wxf Date: Wed, 23 Jun 2021 09:44:37 +0800 Subject: [PATCH 2/4] spec: Enable WebRTC --- package/rpm/ZLMediaKit.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/rpm/ZLMediaKit.spec b/package/rpm/ZLMediaKit.spec index 58b2b633..27685f7d 100644 --- a/package/rpm/ZLMediaKit.spec +++ b/package/rpm/ZLMediaKit.spec @@ -2,10 +2,12 @@ %global use_devtoolset 0 %bcond_without faac %bcond_without x264 +%bcond_without webrtc %else %global use_devtoolset 1 %bcond_with faac %bcond_with x264 +%bcond_with webrtc %endif %bcond_without openssl @@ -37,6 +39,10 @@ BuildRequires: faac-devel BuildRequires: x264-devel %endif +%if %{with webrtc} +BuildRequires: libsrtp-devel >= 2.0 +%endif + %if 0%{?use_devtoolset} BuildRequires: devtoolset-8-gcc-c++ %endif @@ -88,6 +94,7 @@ pushd %{_target_platform} -DENABLE_MYSQL:BOOL=%{with mysql} \ -DENABLE_FAAC:BOOL=%{with faac} \ -DENABLE_X264:BOOL=%{with x264} \ + -DENABLE_WEBRTC:BOOL=%{with webrtc} \ -DENABLE_MP4:BOOL=ON \ -DENABLE_RTPPROXY:BOOL=ON \ -DENABLE_API:BOOL=ON \ From b34226b7858d4991e29329e433f251adfca4337a Mon Sep 17 00:00:00 2001 From: wxf Date: Wed, 23 Jun 2021 10:00:46 +0800 Subject: [PATCH 3/4] spec: WebRTC requires openssl >= 1.1 --- package/rpm/ZLMediaKit.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/rpm/ZLMediaKit.spec b/package/rpm/ZLMediaKit.spec index 27685f7d..63297d6c 100644 --- a/package/rpm/ZLMediaKit.spec +++ b/package/rpm/ZLMediaKit.spec @@ -24,8 +24,12 @@ URL: https://github.com/xia-chu/ZLMediaKit Source0: %{name}-%{version}.tar.xz %if %{with openssl} +%if 0%{?rhel} <= 7 && %{with webrtc} +BuildRequires: openssl11-devel +%else BuildRequires: openssl-devel %endif +%endif %if %{with mysql} BuildRequires: mysql-devel From 0d4ac4f6557da5ce69c7de4ebfce0f5f053933e0 Mon Sep 17 00:00:00 2001 From: wxf Date: Wed, 23 Jun 2021 10:11:30 +0800 Subject: [PATCH 4/4] spec: Fix openssl directory --- package/rpm/ZLMediaKit.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/rpm/ZLMediaKit.spec b/package/rpm/ZLMediaKit.spec index 63297d6c..61c5f86b 100644 --- a/package/rpm/ZLMediaKit.spec +++ b/package/rpm/ZLMediaKit.spec @@ -99,6 +99,9 @@ pushd %{_target_platform} -DENABLE_FAAC:BOOL=%{with faac} \ -DENABLE_X264:BOOL=%{with x264} \ -DENABLE_WEBRTC:BOOL=%{with webrtc} \ +%if %{with webrtc} && 0%{?rhel} <= 7 + -DOPENSSL_ROOT_DIR:STRING="/usr/lib64/openssl11;/usr/include/openssl11" \ +%endif -DENABLE_MP4:BOOL=ON \ -DENABLE_RTPPROXY:BOOL=ON \ -DENABLE_API:BOOL=ON \