Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-02-28 14:38:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
72d477f4665a2c969b78e992f3d9814117688efd
72d477f4
1 parent
cd7e6cc3
support use other g++ when configure.
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
63 行增加
和
19 行删除
trunk/auto/build_ffmpeg.sh
trunk/auto/depends.sh
trunk/auto/modules.sh
trunk/auto/options.sh
trunk/configure
trunk/auto/build_ffmpeg.sh
查看文件 @
72d477f
...
...
@@ -27,7 +27,7 @@ else
fi
# add yasm to path, for x264 to use yasm directly.
# ffmpeg can specifies the yasm path when configure it.
PATH
=
${
PATH
}
:
${
ff_release_dir
}
/bin
export
PATH
=
${
PATH
}
:
${
ff_release_dir
}
/bin
# libaacplus
if
[[
-f
${
ff_release_dir
}
/lib/libaacplus.a
]]
;
then
...
...
trunk/auto/depends.sh
查看文件 @
72d477f
#!/bin/bash
#####################################################################################
#####################################################################################
# prepare the depends tools and libraries
# DEPENDS: options.sh, only when user options parsed, the depends tools are known.
#####################################################################################
#####################################################################################
#####################################################################################
# utilities
#####################################################################################
function
require_sudoer
()
{
sudo
echo
""
>/dev/null 2>&1
...
...
@@ -14,7 +24,7 @@ function require_sudoer()
echo
"check gcc/g++/gdb/make/openssl-devel"
echo
"depends tools are ok"
#####################################################################################
# for Ubuntu
# for Ubuntu
, auto install tools by apt-get
#####################################################################################
function
Ubuntu_prepare
()
{
...
...
@@ -92,7 +102,7 @@ function Ubuntu_prepare()
}
Ubuntu_prepare
#####################################################################################
# for Centos
# for Centos
, auto install tools by yum
#####################################################################################
function
Centos_prepare
()
{
...
...
@@ -380,10 +390,12 @@ fi
#####################################################################################
# build research code
#####################################################################################
mkdir -p
${
SRS_OBJS
}
/research
if
[
$SRS_RESEARCH
=
YES
]
;
then
mkdir -p
${
SRS_OBJS
}
/research
(
cd
research/hls
&&
make
&&
mv ts_info ../../
${
SRS_OBJS
}
/research
)
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
echo
"build research/hls failed, ret=
$ret
"
;
exit
$ret
;
fi
(
cd
research/hls
&&
make
&&
mv ts_info ../../
${
SRS_OBJS
}
/research
)
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
echo
"build research/hls failed, ret=
$ret
"
;
exit
$ret
;
fi
(
cd
research/ffempty
&&
make
&&
mv ffempty ../../
${
SRS_OBJS
}
/research
)
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
echo
"build research/ffempty failed, ret=
$ret
"
;
exit
$ret
;
fi
(
cd
research/ffempty
&&
make
&&
mv ffempty ../../
${
SRS_OBJS
}
/research
)
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
echo
"build research/ffempty failed, ret=
$ret
"
;
exit
$ret
;
fi
fi
...
...
trunk/auto/modules.sh
100644 → 100755
查看文件 @
72d477f
...
...
@@ -50,7 +50,7 @@ for item in ${MODULE_FILES[*]}; do
MODULE_OBJS
=
"
${
MODULE_OBJS
[@]
}
${
CPP_FILE
}
"
if
[
-f
${
CPP_FILE
}
]
;
then
echo
"
${
OBJ_FILE
}
:
\$
(
${
DEPS_NAME
}
)
${
CPP_FILE
}
"
>>
${
FILE
}
echo
"
\$
(
GCC
) -c
\$
(CXXFLAGS)
\$
(
${
INCS_NAME
}
)
\\
"
>>
${
FILE
}
echo
"
\$
(
CXX
) -c
\$
(CXXFLAGS)
\$
(
${
INCS_NAME
}
)
\\
"
>>
${
FILE
}
echo
" -o
${
OBJ_FILE
}
${
CPP_FILE
}
"
>>
${
FILE
}
fi
done
...
...
trunk/auto/options.sh
查看文件 @
72d477f
#!/bin/bash
#####################################################################################
#####################################################################################
# parse user options, do this at first
#####################################################################################
#####################################################################################
#####################################################################################
# output variables
#####################################################################################
help
=
no
SRS_HLS
=
RESERVED
SRS_SSL
=
RESERVED
SRS_FFMPEG
=
RESERVED
SRS_HTTP
=
RESERVED
SRS_RESEARCH
=
RESERVED
# TODO: remove the default to yes.
SRS_HLS
=
YES
SRS_SSL
=
YES
SRS_FFMPEG
=
YES
SRS_HTTP
=
YES
SRS_RESEARCH
=
NO
#####################################################################################
# parse options
#####################################################################################
opt
=
for
option
...
...
@@ -31,11 +45,13 @@ do
--with-hls
)
SRS_HLS
=
YES
;;
--with-ffmpeg
)
SRS_FFMPEG
=
YES
;;
--with-http
)
SRS_HTTP
=
YES
;;
--with-research
)
SRS_RESEARCH
=
YES
;;
--without-ssl
)
SRS_SSL
=
NO
;;
--without-hls
)
SRS_HLS
=
NO
;;
--without-ffmpeg
)
SRS_FFMPEG
=
NO
;;
--without-http
)
SRS_HTTP
=
NO
;;
--without-research
)
SRS_RESEARCH
=
NO
;;
*
)
echo
"
$0
: error: invalid option
\"
$option
\"
"
...
...
@@ -44,11 +60,14 @@ do
esac
done
# save all config options to macro
.
# save all config options to macro
to write to auto headers file
SRS_CONFIGURE
=
"
$opt
"
#####################################################################################
# show help and exit
#####################################################################################
if
[
$help
=
yes
]
;
then
cat
<< END
cat
<< END
--help print this message
...
...
@@ -58,17 +77,21 @@ cat << END
--with-http enable http hooks, build cherrypy as demo api server.
srs will call the http hooks, such as: on_connect.
--with-ffmpeg enable transcoding with ffmpeg.
--with-research build the research tools.
--without-ssl disable rtmp complex handshake.
--without-hls disable hls, rtmp streaming only.
--without-http disable http, http hooks callback.
--without-ffmpeg disable the ffmpeg transcoding feature.
--without-research do not build the research tools.
END
exit
1
exit
0
fi
#####################################################################################
# check user options
#####################################################################################
__check_ok
=
YES
if
[
$SRS_SSL
=
RESERVED
]
;
then
echo
"you must specifies the ssl, see: ./configure --help"
;
...
...
@@ -86,6 +109,10 @@ if [ $SRS_HTTP = RESERVED ]; then
echo
"you must specifies the http, see: ./configure --help"
;
__check_ok
=
NO
fi
if
[
$SRS_RESEARCH
=
RESERVED
]
;
then
echo
"you must specifies the research, see: ./configure --help"
;
__check_ok
=
NO
fi
if
[
$__check_ok
=
NO
]
;
then
exit
1;
fi
\ No newline at end of file
fi
...
...
trunk/configure
查看文件 @
72d477f
...
...
@@ -52,7 +52,7 @@ help:
@echo " bandwidth build the bandwidth test client tool."
clean:
(rm -f Makefile; cd ${SRS_OBJS}; rm -rf srs bandwidth Makefile *.hpp src st_*_load)
(rm -f Makefile; cd ${SRS_OBJS}; rm -rf srs bandwidth Makefile *.hpp src st_*_load
research
)
server: _prepare_dir
@echo "build the srs(simple rtmp server) over st(state-threads)"
...
...
@@ -81,10 +81,10 @@ CppStd="-ansi"
CXXFLAGS
=
"
${
CppStd
}
${
WarnLevel
}
${
GDBDebug
}
"
#CXXFLAGS="${CppStd} ${WarnLevel} ${GDBDebug} ${Performance}"
cat
<< END > ${SRS_OBJS}/${SRS_MAKEFILE}
CXXFLAGS = ${CXXFLAGS}
GCC = g++
LINK = \$(GCC)
AR = ar
CXXFLAGS ?= ${CXXFLAGS}
CXX ?= g++
LINK ?= \$(CXX)
AR ?= ar
.PHONY: default srs bandwidth
...
...
@@ -174,6 +174,11 @@ if [ $SRS_HTTP = YES ]; then
else
echo
-e
"
${
YELLOW
}
warning: without http hooks callback over CherryPy support
${
BLACK
}
"
fi
if
[
$SRS_RESEARCH
=
YES
]
;
then
echo
-e
"
${
GREEN
}
research tools are builded
${
BLACK
}
"
else
echo
-e
"
${
BLACK
}
note: research tools are not builded
${
BLACK
}
"
fi
# mkdir dirs
mkdir -p
${
SRS_OBJS
}
/logs
...
...
请
注册
或
登录
后发表评论