mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
refine the code for ios build. add authors StevenLiu. 0.9.177
This commit is contained in:
parent
b198d17ab9
commit
e37f312f27
4 changed files with 29 additions and 44 deletions
2
AUTHORS.txt
Executable file → Normal file
2
AUTHORS.txt
Executable file → Normal file
|
@ -10,4 +10,4 @@ Authors ordered by first contribution.
|
||||||
* suhetao<suhetao@gmail.com>
|
* suhetao<suhetao@gmail.com>
|
||||||
* Johnny<fengjihu@163.com>
|
* Johnny<fengjihu@163.com>
|
||||||
* karthikeyan<keyanmca@gmail.com>
|
* karthikeyan<keyanmca@gmail.com>
|
||||||
|
* StevenLiu<lq@chinaffmpeg.org>
|
||||||
|
|
|
@ -304,9 +304,10 @@ OSX_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "OSX prepare failed, ret=$re
|
||||||
# st-1.9
|
# st-1.9
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# check the arm flag file, if flag changed, need to rebuild the st.
|
# check the arm flag file, if flag changed, need to rebuild the st.
|
||||||
|
_ST_MAKE=linux-debug
|
||||||
if [ $SRS_EMBEDED_CPU = YES ]; then
|
if [ $SRS_EMBEDED_CPU = YES ]; then
|
||||||
# ok, arm specified, if the flag filed does not exists, need to rebuild.
|
# ok, arm specified, if the flag filed does not exists, need to rebuild.
|
||||||
if [[ -f ${SRS_OBJS}/_flag.st.arm.tmp && -f ${SRS_OBJS}/st/libst.a && -f ${SRS_OBJS}/st/libst.so ]]; then
|
if [[ -f ${SRS_OBJS}/_flag.st.arm.tmp && -f ${SRS_OBJS}/st/libst.a ]]; then
|
||||||
echo "st-1.9t for arm is ok.";
|
echo "st-1.9t for arm is ok.";
|
||||||
else
|
else
|
||||||
# TODO: FIXME: patch the bug.
|
# TODO: FIXME: patch the bug.
|
||||||
|
@ -316,55 +317,34 @@ if [ $SRS_EMBEDED_CPU = YES ]; then
|
||||||
rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} &&
|
rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} &&
|
||||||
unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 &&
|
unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 &&
|
||||||
patch -p0 < ../../3rdparty/patches/1.st.arm.patch &&
|
patch -p0 < ../../3rdparty/patches/1.st.arm.patch &&
|
||||||
make CC=${SrsArmCC} AR=${SrsArmAR} LD=${SrsArmLD} RANDLIB=${SrsArmRANDLIB} EXTRA_CFLAGS="-DMD_HAVE_EPOLL" linux-debug &&
|
make CC=${SrsArmCC} AR=${SrsArmAR} LD=${SrsArmLD} RANDLIB=${SrsArmRANDLIB} EXTRA_CFLAGS="-DMD_HAVE_EPOLL" ${_ST_MAKE} &&
|
||||||
cd .. && rm -rf st && ln -sf st-1.9/obj st &&
|
cd .. && rm -rf st && ln -sf st-1.9/obj st &&
|
||||||
cd .. && touch ${SRS_OBJS}/_flag.st.arm.tmp
|
cd .. && touch ${SRS_OBJS}/_flag.st.arm.tmp
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ $OS_IS_OSX = YES ]; then
|
if [ $SRS_OSX = YES ]; then
|
||||||
if [[ ! -f ${SRS_OBJS}/_flag.st.arm.tmp && -f ${SRS_OBJS}/st/libst.a && -f ${SRS_OBJS}/st/libst.so ]]; then
|
_ST_MAKE=darwin-debug
|
||||||
echo "st-1.9t is ok.";
|
fi
|
||||||
else
|
if [[ ! -f ${SRS_OBJS}/_flag.st.arm.tmp && -f ${SRS_OBJS}/st/libst.a ]]; then
|
||||||
echo "build st-1.9t";
|
echo "st-1.9t is ok.";
|
||||||
(
|
|
||||||
rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} &&
|
|
||||||
unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 &&
|
|
||||||
echo "we alaways patch the st, for we may build srs under arm directly" &&
|
|
||||||
echo "the 1.st.arm.patch is ok for x86 because it's only modify code under macro linux arm" &&
|
|
||||||
patch -p0 < ../../3rdparty/patches/1.st.arm.patch &&
|
|
||||||
make darwin-debug &&
|
|
||||||
cd .. && rm -rf st && ln -sf st-1.9/obj st &&
|
|
||||||
cd .. && rm -f ${SRS_OBJS}/_flag.st.arm.tmp
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
# arm not specified, if exists flag, need to rebuild for no-arm platform.
|
echo "build st-1.9t";
|
||||||
if [[ ! -f ${SRS_OBJS}/_flag.st.arm.tmp && -f ${SRS_OBJS}/st/libst.a && -f ${SRS_OBJS}/st/libst.so ]]; then
|
(
|
||||||
echo "st-1.9t is ok.";
|
rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} &&
|
||||||
else
|
unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 &&
|
||||||
echo "build st-1.9t";
|
echo "we alaways patch the st, for we may build srs under arm directly" &&
|
||||||
(
|
echo "the 1.st.arm.patch is ok for x86 because it's only modify code under macro linux arm" &&
|
||||||
rm -rf ${SRS_OBJS}/st-1.9 && cd ${SRS_OBJS} &&
|
patch -p0 < ../../3rdparty/patches/1.st.arm.patch &&
|
||||||
unzip -q ../3rdparty/st-1.9.zip && cd st-1.9 &&
|
make ${_ST_MAKE} &&
|
||||||
echo "we alaways patch the st, for we may build srs under arm directly" &&
|
cd .. && rm -rf st && ln -sf st-1.9/obj st &&
|
||||||
echo "the 1.st.arm.patch is ok for x86 because it's only modify code under macro linux arm" &&
|
cd .. && rm -f ${SRS_OBJS}/_flag.st.arm.tmp
|
||||||
patch -p0 < ../../3rdparty/patches/1.st.arm.patch &&
|
)
|
||||||
make EXTRA_CFLAGS="-DMD_HAVE_EPOLL" linux-debug &&
|
|
||||||
cd .. && rm -rf st && ln -sf st-1.9/obj st &&
|
|
||||||
cd .. && rm -f ${SRS_OBJS}/_flag.st.arm.tmp
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# check status
|
# check status
|
||||||
ret=$?; if [[ $ret -ne 0 ]]; then echo "build st-1.9 failed, ret=$ret"; exit $ret; fi
|
ret=$?; if [[ $ret -ne 0 ]]; then echo "build st-1.9 failed, ret=$ret"; exit $ret; fi
|
||||||
if [ ! -f ${SRS_OBJS}/st/libst.a ]; then echo "build st-1.9 static lib failed."; exit -1; fi
|
if [ ! -f ${SRS_OBJS}/st/libst.a ]; then echo "build st-1.9 static lib failed."; exit -1; fi
|
||||||
if [ OS_IS_OSX = Darwin ] then
|
|
||||||
if [ ! -f ${SRS_OBJS}/st/libst.dylib ]; then echo "build st-1.9 shared lib failed."; exit -1; fi
|
|
||||||
else
|
|
||||||
if [ ! -f ${SRS_OBJS}/st/libst.so ]; then echo "build st-1.9 shared lib failed."; exit -1; fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# http-parser-2.1
|
# http-parser-2.1
|
||||||
|
|
|
@ -62,6 +62,8 @@ SRS_USE_SYS_SSL=NO
|
||||||
# presets
|
# presets
|
||||||
# for x86/x64 pc/servers
|
# for x86/x64 pc/servers
|
||||||
SRS_X86_X64=NO
|
SRS_X86_X64=NO
|
||||||
|
# for ios(darwin)
|
||||||
|
SRS_OSX=NO
|
||||||
# armhf(v7cpu) built on ubuntu12
|
# armhf(v7cpu) built on ubuntu12
|
||||||
SRS_ARM_UBUNTU12=NO
|
SRS_ARM_UBUNTU12=NO
|
||||||
# mips built on ubuntu12
|
# mips built on ubuntu12
|
||||||
|
@ -158,6 +160,7 @@ Options:
|
||||||
|
|
||||||
Presets:
|
Presets:
|
||||||
--x86-x64 [default] for x86/x64 cpu, common pc and servers.
|
--x86-x64 [default] for x86/x64 cpu, common pc and servers.
|
||||||
|
--osx for IOS(darwin) to build SRS.
|
||||||
--pi for raspberry-pi(directly build), open features hls/ssl/static.
|
--pi for raspberry-pi(directly build), open features hls/ssl/static.
|
||||||
--cubie for cubieboard(directly build), open features except ffmpeg/nginx.
|
--cubie for cubieboard(directly build), open features except ffmpeg/nginx.
|
||||||
--arm alias for --with-arm-ubuntu12, for ubuntu12, arm crossbuild
|
--arm alias for --with-arm-ubuntu12, for ubuntu12, arm crossbuild
|
||||||
|
@ -246,13 +249,13 @@ function parse_user_option() {
|
||||||
--log-trace) SRS_LOG_TRACE=YES ;;
|
--log-trace) SRS_LOG_TRACE=YES ;;
|
||||||
|
|
||||||
--x86-x64) SRS_X86_X64=YES ;;
|
--x86-x64) SRS_X86_X64=YES ;;
|
||||||
|
--osx) SRS_OSX=YES ;;
|
||||||
--arm) SRS_ARM_UBUNTU12=YES ;;
|
--arm) SRS_ARM_UBUNTU12=YES ;;
|
||||||
--mips) SRS_MIPS_UBUNTU12=YES ;;
|
--mips) SRS_MIPS_UBUNTU12=YES ;;
|
||||||
--pi) SRS_PI=YES ;;
|
--pi) SRS_PI=YES ;;
|
||||||
--cubie) SRS_CUBIE=YES ;;
|
--cubie) SRS_CUBIE=YES ;;
|
||||||
--dev) SRS_DEV=YES ;;
|
--dev) SRS_DEV=YES ;;
|
||||||
--fast-dev) SRS_FAST_DEV=YES ;;
|
--fast-dev) SRS_FAST_DEV=YES ;;
|
||||||
--osx-dev) SRS_OSX_DEV=YES ;;
|
|
||||||
--demo) SRS_DEMO=YES ;;
|
--demo) SRS_DEMO=YES ;;
|
||||||
--fast) SRS_FAST=YES ;;
|
--fast) SRS_FAST=YES ;;
|
||||||
--disable-all) SRS_DISABLE_ALL=YES ;;
|
--disable-all) SRS_DISABLE_ALL=YES ;;
|
||||||
|
@ -316,7 +319,9 @@ function apply_user_presets() {
|
||||||
if [ $SRS_PI = NO ]; then
|
if [ $SRS_PI = NO ]; then
|
||||||
if [ $SRS_CUBIE = NO ]; then
|
if [ $SRS_CUBIE = NO ]; then
|
||||||
if [ $SRS_X86_X64 = NO ]; then
|
if [ $SRS_X86_X64 = NO ]; then
|
||||||
SRS_X86_X64=YES; opt="--x86-x64 $opt";
|
if [ $SRS_OSX = NO ]; then
|
||||||
|
SRS_X86_X64=YES; opt="--x86-x64 $opt";
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -581,7 +586,7 @@ function apply_user_presets() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if osx dev specified, open main server features.
|
# if osx dev specified, open main server features.
|
||||||
if [ $SRS_OSX_DEV = YES ]; then
|
if [ $SRS_OSX = YES ]; then
|
||||||
SRS_HLS=YES
|
SRS_HLS=YES
|
||||||
SRS_DVR=YES
|
SRS_DVR=YES
|
||||||
SRS_NGINX=NO
|
SRS_NGINX=NO
|
||||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR "0"
|
#define VERSION_MAJOR "0"
|
||||||
#define VERSION_MINOR "9"
|
#define VERSION_MINOR "9"
|
||||||
#define VERSION_REVISION "176"
|
#define VERSION_REVISION "177"
|
||||||
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
|
|
Loading…
Reference in a new issue