mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge 2.0release
This commit is contained in:
commit
ba4ef34d27
13 changed files with 121 additions and 21 deletions
|
@ -68,41 +68,42 @@ else
|
|||
ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build speex-1.2rc1 failed"; exit 1; fi
|
||||
fi
|
||||
|
||||
# x264 core.138
|
||||
# x264 core.157
|
||||
if [[ -f ${ff_release_dir}/lib/libx264.a ]]; then
|
||||
echo "x264 is ok"
|
||||
else
|
||||
echo "build x264"
|
||||
cd $ff_current_dir &&
|
||||
rm -rf x264-snapshot-20131129-2245-stable && unzip -q ${ff_src_dir}/x264-snapshot-20131129-2245-stable.zip &&
|
||||
cd x264-snapshot-20131129-2245-stable &&
|
||||
chmod +w configure && patch -p0 <../../../3rdparty/patches/5.x264.osx.gcc.patch &&
|
||||
./configure --prefix=${ff_release_dir} --disable-opencl --bit-depth=8 \
|
||||
rm -rf x264-snapshot-20181116-2245 && unzip -q ${ff_src_dir}/x264-snapshot-20181116-2245.zip &&
|
||||
cd x264-snapshot-20181116-2245 &&
|
||||
# chmod +w configure && patch -p0 <../../../3rdparty/patches/5.x264.osx.gcc.patch &&
|
||||
./configure --prefix=${ff_release_dir} --disable-opencl --bit-depth=all \
|
||||
--enable-static --disable-avs --disable-swscale --disable-lavf \
|
||||
--disable-ffms --disable-gpac &&
|
||||
--disable-ffms --disable-gpac --disable-cli &&
|
||||
make ${SRS_JOBS} && make install
|
||||
ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build x264 failed"; exit 1; fi
|
||||
fi
|
||||
|
||||
# ffmpeg-3.2.4
|
||||
# ffmpeg-4.1
|
||||
if [[ -f ${ff_release_dir}/bin/ffmpeg ]]; then
|
||||
echo "ffmpeg-3.2.4 is ok"
|
||||
echo "ffmpeg-4.1 is ok"
|
||||
else
|
||||
echo "build ffmpeg-3.2.4"
|
||||
echo "build ffmpeg-4.1"
|
||||
cd $ff_current_dir &&
|
||||
rm -rf ffmpeg-3.2.4 && unzip -q ${ff_src_dir}/ffmpeg-3.2.4.zip &&
|
||||
rm -rf ffmpeg-4.1 && unzip -q ${ff_src_dir}/ffmpeg-4.1.zip &&
|
||||
echo "remove all so to force the ffmpeg to build in static" &&
|
||||
rm -f ${ff_release_dir}/lib/*.so* &&
|
||||
echo "export the dir to enable the build command canbe use." &&
|
||||
export ffmpeg_exported_release_dir=${ff_release_dir} &&
|
||||
cd ffmpeg-3.2.4 && patch -p0 <../../../3rdparty/patches/6.ffmpeg.speex.patch && ./configure \
|
||||
cd ffmpeg-4.1 &&
|
||||
./configure \
|
||||
--enable-gpl --enable-nonfree \
|
||||
--yasmexe=${ff_yasm_bin} \
|
||||
--prefix=${ff_release_dir} --cc= \
|
||||
--enable-static --disable-shared --disable-debug \
|
||||
--extra-cflags='-I${ffmpeg_exported_release_dir}/include' \
|
||||
--extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' \
|
||||
--disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc \
|
||||
--disable-ffplay --disable-ffprobe --disable-doc \
|
||||
--enable-postproc --enable-bzlib --enable-zlib --enable-parsers \
|
||||
--enable-libx264 --enable-libmp3lame --enable-libfdk-aac --enable-libspeex \
|
||||
--enable-pthreads --extra-libs=-lpthread \
|
||||
|
|
|
@ -464,6 +464,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
|||
(
|
||||
rm -rf ${SRS_OBJS}/state-threads-1.9.1 && cd ${SRS_OBJS} &&
|
||||
tar xf ../3rdparty/state-threads-1.9.1.tar.gz && cd state-threads-1.9.1 && chmod +w * &&
|
||||
patch -p0 < ../../3rdparty/patches/6.st.osx10.14.build.patch &&
|
||||
make ${_ST_MAKE} CC=${SrsArmCC} AR=${SrsArmAR} LD=${SrsArmLD} RANDLIB=${SrsArmRANDLIB} EXTRA_CFLAGS="${_ST_EXTRA_CFLAGS}" &&
|
||||
cd .. && rm -f st && ln -sf state-threads-1.9.1/obj st &&
|
||||
rm -f state-threads && ln -sf state-threads-1.9.1 state-threads &&
|
||||
|
@ -478,6 +479,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
|||
(
|
||||
rm -rf ${SRS_OBJS}/state-threads-1.9.1 && cd ${SRS_OBJS} &&
|
||||
tar xf ../3rdparty/state-threads-1.9.1.tar.gz && cd state-threads-1.9.1 && chmod +w * &&
|
||||
patch -p0 < ../../3rdparty/patches/6.st.osx10.14.build.patch &&
|
||||
make ${_ST_MAKE} EXTRA_CFLAGS="${_ST_EXTRA_CFLAGS}" &&
|
||||
cd .. && rm -f st && ln -sf state-threads-1.9.1/obj st &&
|
||||
rm -f state-threads && ln -sf state-threads-1.9.1 state-threads &&
|
||||
|
@ -669,13 +671,13 @@ if [ $SRS_SSL = YES ]; then
|
|||
fi
|
||||
|
||||
#####################################################################################
|
||||
# live transcoding, ffmpeg-3.2.4, x264-core138, lame-3.99.5, libaacplus-2.0.2.
|
||||
# live transcoding, ffmpeg-4.1, x264-core157, lame-3.99.5, libaacplus-2.0.2.
|
||||
#####################################################################################
|
||||
if [ $SRS_FFMPEG_TOOL = YES ]; then
|
||||
if [[ -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]]; then
|
||||
echo "ffmpeg-3.2.4 is ok.";
|
||||
echo "ffmpeg-4.1 is ok.";
|
||||
else
|
||||
echo "build ffmpeg-3.2.4";
|
||||
echo "build ffmpeg-4.1";
|
||||
(
|
||||
cd ${SRS_OBJS} && pwd_dir=`pwd` &&
|
||||
rm -rf ffmepg.src && mkdir -p ffmpeg.src && cd ffmpeg.src &&
|
||||
|
@ -684,8 +686,8 @@ if [ $SRS_FFMPEG_TOOL = YES ]; then
|
|||
)
|
||||
fi
|
||||
# check status
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build ffmpeg-3.2.4 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]; then echo "build ffmpeg-3.2.4 failed."; exit -1; fi
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build ffmpeg-4.1 failed, ret=$ret"; exit $ret; fi
|
||||
if [ ! -f ${SRS_OBJS}/ffmpeg/bin/ffmpeg ]; then echo "build ffmpeg-4.1 failed."; exit -1; fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
|
|
|
@ -866,5 +866,15 @@ function check_option_conflicts() {
|
|||
if [ $__check_ok = NO ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [[ $SRS_OSX == YES ]]; then
|
||||
macOSVersion=`sw_vers -productVersion`
|
||||
macOSVersionMajor=`echo $macOSVersion|awk -F '.' '{print $1}'`
|
||||
macOSVersionMinor=`echo $macOSVersion|awk -F '.' '{print $2}'`
|
||||
if [[ $macOSVersionMajor -ge 10 && $macOSVersionMinor -ge 14 ]]; then
|
||||
echo "macOS $macOSVersion is not supported, read https://github.com/ossrs/srs/issues/1250"
|
||||
exit -1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
check_option_conflicts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue