mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Build: Support --shared-ffmpeg to link with *.so for LGPL license. 4.0.126
This commit is contained in:
parent
d1d0b9ca5c
commit
d5266725e2
11 changed files with 45 additions and 6 deletions
|
@ -637,6 +637,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
|
||||
|
@ -644,7 +648,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
|
||||
|
@ -670,6 +674,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