Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Add SRT caller mode support #1174

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/installCentOSDeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ installYumDeps(){
${SUDO} yum install devtoolset-7-gcc* -y
${SUDO} yum install docbook2X -y
${SUDO} yum install libffi-devel -y
${SUDO} yum install ca-certificates -y
${SUDO} yum install ca-certificates tcl -y
}

installRepo(){
Expand All @@ -57,11 +57,13 @@ installRepo(){
}

install_mediadeps_nonfree(){
install_srt
install_fdkaac
install_ffmpeg
}

install_mediadeps(){
install_srt
install_ffmpeg
}

Expand Down
33 changes: 31 additions & 2 deletions scripts/installCommonDeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,35 @@ check_proxy(){
fi
}

install_srt(){
local VERSION="1.4.4"
local SRC="v${VERSION}.tar.gz"
local SRC_URL=" https://github.com/Haivision/srt/archive/${SRC}"
local SRC_DIR="srt-${VERSION}"

local LIST_LIBS=`ls ${PREFIX_DIR}/lib/libsrt.* 2>/dev/null`
[ "$INCR_INSTALL" = true ] && [[ ! -z $LIST_LIBS ]] && \
echo "srt already installed." && return 0

if [ "$CHECK_INSTALL" = true ]; then
if [[ ! -z $LIST_LIBS ]]; then
echo "srt - Yes"
else
echo "srt - No"
fi
return 0
fi

mkdir -p ${LIB_DIR}
pushd ${LIB_DIR}
wget ${SRC_URL}
rm -fr ${SRC_DIR}
tar xf ${SRC}
pushd ${SRC_DIR}
./configure --prefix=${PREFIX_DIR}
make && make install
}

install_fdkaac(){
local VERSION="0.1.6"
local SRC="fdk-aac-${VERSION}.tar.gz"
Expand Down Expand Up @@ -87,8 +116,8 @@ install_ffmpeg(){
tar xf ${SRC}
pushd ${DIR}
[[ "${DISABLE_NONFREE}" == "true" ]] && \
PKG_CONFIG_PATH=${PREFIX_DIR}/lib/pkgconfig CFLAGS=-fPIC ./configure --prefix=${PREFIX_DIR} --enable-shared --disable-static --disable-libvpx --disable-vaapi --enable-libfreetype || \
PKG_CONFIG_PATH=${PREFIX_DIR}/lib/pkgconfig CFLAGS=-fPIC ./configure --prefix=${PREFIX_DIR} --enable-shared --disable-static --disable-libvpx --disable-vaapi --enable-libfreetype --enable-libfdk-aac --enable-nonfree && \
PKG_CONFIG_PATH=${PREFIX_DIR}/lib/pkgconfig CFLAGS=-fPIC ./configure --prefix=${PREFIX_DIR} --enable-shared --disable-static --disable-libvpx --disable-vaapi --enable-libfreetype --enable-libsrt || \
PKG_CONFIG_PATH=${PREFIX_DIR}/lib/pkgconfig CFLAGS=-fPIC ./configure --prefix=${PREFIX_DIR} --enable-shared --disable-static --disable-libvpx --disable-vaapi --enable-libfreetype --enable-libfdk-aac --enable-nonfree --enable-libsrt && \
make -j4 -s V=0 && make install
popd
popd
Expand Down
1 change: 0 additions & 1 deletion scripts/installDepsUnattended.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ if [ "$GITHUB_ACTIONS" != "true" ]; then
fi

if [ "$NIGHTLY" != "true" ] && [ "$GITHUB_ACTIONS" != "true" ]; then

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep this file clean

if [ "$DISABLE_NONFREE" = "true" ]; then
install_mediadeps
else
Expand Down
4 changes: 3 additions & 1 deletion scripts/installUbuntuDeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ install_apt_deps(){
${SUDO} apt-get install git make gcc g++ libglib2.0-dev docbook2x pkg-config -y
${SUDO} apt-get install libboost-regex-dev libboost-thread-dev libboost-system-dev liblog4cxx-dev -y
${SUDO} apt-get install openjdk-8-jre curl libboost-test-dev nasm yasm gyp libx11-dev libkrb5-dev intel-gpu-tools -y
${SUDO} apt-get install m4 autoconf libtool automake cmake libfreetype6-dev libgstreamer-plugins-base1.0-dev -y
${SUDO} apt-get install m4 autoconf libtool automake cmake libfreetype6-dev libgstreamer-plugins-base1.0-dev tcl -y
if [ "$GITHUB_ACTIONS" != "true" ]; then
${SUDO} apt-get install rabbitmq-server mongodb -y
else
Expand All @@ -31,11 +31,13 @@ install_gcc_7(){
}

install_mediadeps_nonfree(){
install_srt
install_fdkaac
install_ffmpeg
}

install_mediadeps(){
install_srt
install_ffmpeg
}

Expand Down
1 change: 1 addition & 0 deletions scripts/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ function isLibAllowed(libSrc) {
'libowt_web_transport',
];
if (!options['archive'] || options['with-ffmpeg']) {
whiteList.push('libsrt');
whiteList.push('libav');
whiteList.push('libsw');
if (osType.includes('centos') || (osType.includes('ubuntu') && osType.includes('20.04'))) {
Expand Down
34 changes: 28 additions & 6 deletions scripts/release/install_ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,41 @@ install_build_deps() {
if [[ "$OS" =~ .*centos.* ]]
then
echo -e "\x1b[32mInstalling dependent components and libraries via yum...\x1b[0m"
${SUDO} yum install pkg-config make gcc gcc-c++ nasm yasm freetype-devel -y
${SUDO} yum install pkg-config make gcc gcc-c++ nasm yasm freetype-devel tcl openssl-devel cmake automake -y
elif [[ "$OS" =~ .*ubuntu.* ]]
then
echo -e "\x1b[32mInstalling dependent components and libraries via apt-get...\x1b[0m"
${SUDO} apt-get update
${SUDO} apt-get install pkg-config make gcc g++ nasm yasm libfreetype6-dev -y
${SUDO} apt-get install pkg-config make gcc g++ nasm yasm libfreetype6-dev tcl cmake libssl-dev build-essential -y
else
echo -e "\x1b[32mUnsupported platform...\x1b[0m"
fi
}

install_srt(){
local VERSION="1.4.4"
local SRC="v${VERSION}.tar.gz"
local SRC_URL=" https://github.com/Haivision/srt/archive/${SRC}"
local SRC_DIR="srt-${VERSION}"
local PREFIX_DIR="${this}/ffmpeg-install"
mkdir -p ${LIB_DIR}
pushd ${LIB_DIR}
wget ${SRC_URL}
rm -fr ${SRC_DIR}
tar xf ${SRC}
pushd ${SRC_DIR}
./configure --prefix=${PREFIX_DIR}
make && make install
popd
popd
}

install_ffmpeg(){
local VERSION="4.1.3"
local VERSION="4.4.1"
local DIR="ffmpeg-${VERSION}"
local SRC="${DIR}.tar.bz2"
local SRC_URL="http://ffmpeg.org/releases/${SRC}"
local SRC_MD5SUM="9985185a8de3678e5b55b1c63276f8b5"
local SRC_MD5SUM="9c2ca54e7f353a861e57525ff6da335b"
local PREFIX_DIR="${this}/ffmpeg-install"

local LIST_LIBS=`ls ${this}/lib/libav* 2>/dev/null`
Expand All @@ -88,8 +106,8 @@ install_ffmpeg(){
rm -fr ${DIR}
tar xf ${SRC}
pushd ${DIR} >/dev/null
CFLAGS=-fPIC ./configure --prefix=${PREFIX_DIR} --enable-shared \
--disable-static --disable-libvpx --disable-vaapi --enable-libfreetype
PKG_CONFIG_PATH=${PREFIX_DIR}/lib/pkgconfig CFLAGS=-fPIC ./configure --prefix=${PREFIX_DIR} --enable-shared \
--disable-static --disable-libvpx --disable-vaapi --enable-libfreetype --enable-libsrt
make -j4 -s V=0 && make install
popd
popd
Expand All @@ -98,8 +116,12 @@ install_ffmpeg(){
cp -P ${PREFIX_DIR}/lib/*.so ${this}/lib/
}

parse_arguments $*

echo "Install building dependencies..."
install_build_deps

install_srt

echo "Install ffmpeg..."
install_ffmpeg