mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Build: Support --shared-ffmpeg
This commit is contained in:
parent
785d2fce08
commit
f75ef2f808
12 changed files with 74 additions and 46 deletions
|
@ -636,6 +636,10 @@ if [ ! -f ${SRS_OBJS}/srtp2/lib/libsrtp2.a ]; then echo "Build libsrtp-2-fit sta
|
|||
# libopus, for WebRTC to transcode AAC with Opus.
|
||||
#####################################################################################
|
||||
if [[ $SRS_RTC == YES ]]; then
|
||||
# Only build static libraries if no shared FFmpeg.
|
||||
if [[ $SRS_SHARED_FFMPEG == NO ]]; then
|
||||
OPUS_OPTIONS="--disable-shared"
|
||||
fi
|
||||
if [[ -f ${SRS_OBJS}/${SRS_PLATFORM}/opus-1.3.1/_release/lib/libopus.a ]]; then
|
||||
echo "The opus-1.3.1 is ok.";
|
||||
else
|
||||
|
@ -643,7 +647,7 @@ if [[ $SRS_RTC == YES ]]; then
|
|||
(
|
||||
rm -rf ${SRS_OBJS}/${SRS_PLATFORM}/opus-1.3.1 && cd ${SRS_OBJS}/${SRS_PLATFORM} &&
|
||||
tar xf ../../3rdparty/opus-1.3.1.tar.gz && cd opus-1.3.1 &&
|
||||
./configure --prefix=`pwd`/_release --enable-static --disable-shared && make ${SRS_JOBS} && make install
|
||||
./configure --prefix=`pwd`/_release --enable-static $OPUS_OPTIONS && make ${SRS_JOBS} && make install
|
||||
cd .. && rm -rf opus && ln -sf opus-1.3.1/_release opus
|
||||
)
|
||||
fi
|
||||
|
@ -669,6 +673,10 @@ if [[ $SRS_FFMPEG_FIT == YES ]]; then
|
|||
nasm -v >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
FFMPEG_OPTIONS="--disable-x86asm"
|
||||
fi
|
||||
# Only build static libraries if no shared FFmpeg.
|
||||
if [[ $SRS_SHARED_FFMPEG == YES ]]; then
|
||||
FFMPEG_OPTIONS="$FFMPEG_OPTIONS --enable-shared"
|
||||
fi
|
||||
|
||||
if [[ -f ${SRS_OBJS}/${SRS_PLATFORM}/ffmpeg-4-fit/_release/lib/libavcodec.a ]]; then
|
||||
echo "The ffmpeg-4-fit is ok.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue