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-03-07 14:27:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8cd1c11add9ba4a816c819ad7c03048c9ed8dc84
8cd1c11a
1 parent
bef7e20e
change forward schema
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
43 行增加
和
15 行删除
trunk/auto/options.sh
trunk/conf/srs.conf
trunk/configure
trunk/research/gperftools/heap-profiler/heap_profiler.cc
trunk/auto/options.sh
查看文件 @
8cd1c11
...
...
@@ -17,10 +17,10 @@ SRS_FFMPEG=RESERVED
SRS_HTTP
=
RESERVED
SRS_RESEARCH
=
RESERVED
SRS_UTEST
=
RESERVED
SRS_GPERF
=
RESERVED
SRS_GPERF_MC
=
RESERVED
SRS_GPERF_MP
=
RESERVED
SRS_GPERF_CP
=
RESERVED
SRS_GPERF
=
RESERVED
# tcmalloc
SRS_GPERF_MC
=
RESERVED
# gperf memory check
SRS_GPERF_MP
=
RESERVED
# gperf memory profile
SRS_GPERF_CP
=
RESERVED
# gperf cpu profile
# arguments
SRS_JOBS
=
1
...
...
@@ -31,6 +31,7 @@ SRS_FFMPEG=YES
SRS_HTTP
=
YES
SRS_RESEARCH
=
NO
SRS_UTEST
=
YES
SRS_GPERF
=
NO
SRS_GPERF_MC
=
NO
SRS_GPERF_MP
=
NO
SRS_GPERF_CP
=
NO
...
...
@@ -61,6 +62,7 @@ do
--with-http
)
SRS_HTTP
=
YES
;;
--with-research
)
SRS_RESEARCH
=
YES
;;
--with-utest
)
SRS_UTEST
=
YES
;;
--with-gperf
)
SRS_GPERF
=
YES
;;
--with-gmc
)
SRS_GPERF_MC
=
YES
;;
--with-gmp
)
SRS_GPERF_MP
=
YES
;;
--with-gcp
)
SRS_GPERF_CP
=
YES
;;
...
...
@@ -71,6 +73,7 @@ do
--without-http
)
SRS_HTTP
=
NO
;;
--without-research
)
SRS_RESEARCH
=
NO
;;
--without-utest
)
SRS_UTEST
=
NO
;;
--without-gperf
)
SRS_GPERF
=
NO
;;
--without-gmc
)
SRS_GPERF_MC
=
NO
;;
--without-gmp
)
SRS_GPERF_MP
=
NO
;;
--without-gcp
)
SRS_GPERF_CP
=
NO
;;
...
...
@@ -110,6 +113,7 @@ if [ $help = yes ]; then
--with-ffmpeg enable transcoding with ffmpeg.
--with-research build the research tools.
--with-utest build the utest for srs.
--with-gperf build srs with gperf tools(no gmc/gmp/gcp, with tcmalloc only).
--with-gmc build memory check for srs with gperf tools.
--without-ssl disable rtmp complex handshake.
...
...
@@ -118,6 +122,7 @@ if [ $help = yes ]; then
--without-ffmpeg disable the ffmpeg transcoding feature.
--without-research do not build the research tools.
--without-utest do not build the utest for srs.
--without-gperf do not build srs with gperf tools(without tcmalloc and gmc/gmp/gcp).
--without-gmc do not build memory check for srs with gperf tools.
--jobs[=N] Allow N jobs at once; infinite jobs with no arg.
...
...
@@ -131,6 +136,22 @@ fi
# check user options
#####################################################################################
__check_ok
=
YES
# check conflict
if
[
$SRS_GPERF
=
NO
]
;
then
if
[
$SRS_GPERF_MC
=
YES
]
;
then
echo
"gperf-mc depends on gperf, see: ./configure --help"
;
__check_ok
=
NO
fi
if
[
$SRS_GPERF_MP
=
YES
]
;
then
echo
"gperf-mp depends on gperf, see: ./configure --help"
;
__check_ok
=
NO
fi
if
[
$SRS_GPERF_CP
=
YES
]
;
then
echo
"gperf-cp depends on gperf, see: ./configure --help"
;
__check_ok
=
NO
fi
fi
# check variable neccessary
if
[
$SRS_SSL
=
RESERVED
]
;
then
echo
"you must specifies the ssl, see: ./configure --help"
;
__check_ok
=
NO
...
...
trunk/conf/srs.conf
100755 → 100644
查看文件 @
8cd1c11
...
...
@@ -535,14 +535,22 @@ vhost same.vhost.forward.vhost.com {
# this used to split/forward the current stream for cluster active-standby,
# active-active for cdn to build high available fault tolerance system.
# format: {ip}:{port} {ip_N}:{port_N}
# or specify the vhost by:
# format: {ip}:{port}?vhost={vhost} {ip_N}:{port_N}?vhost={vhost}
# or specify the vhost by params, @see: change.vhost.forward.vhost.com
# if vhost not specified, use the request vhost instead.
forward
127
.
0
.
0
.
1
:
1936
127
.
0
.
0
.
1
:
1937
;
}
# the vhost which forward publish streams to other vhosts.
# TODO: FIXME: change the forward schema with vhost.
# [plan] the vhost which forward publish streams to other vhosts.
vhost
change
.
vhost
.
forward
.
vhost
.
com
{
forward
127
.
0
.
0
.
1
:
1936
?
vhost
=
forward2
.
vhost
.
com
127
.
0
.
0
.
1
:
1937
?
vhost
=
forward3
.
vhost
.
com
;
forward
127
.
0
.
0
.
1
:
1936
127
.
0
.
0
.
1
:
1937
{
# specify the vhost to override the vhost in client request.
vhost
forward2
.
vhost
.
com
;
# specify the refer(pageUrl) to override the refer in client request.
refer
http
://
srs
/
index
.
html
;
}
forward
127
.
0
.
0
.
1
:
1938
{
vhost
forward3
.
vhost
.
com
;
}
}
# the vhost disabled.
...
...
trunk/configure
查看文件 @
8cd1c11
...
...
@@ -66,6 +66,7 @@ SrsResearchSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_RESEARCH = YES ]; the
SrsUtestSummaryColor
=
"
\$
(YELLOW)(disabled) "
;
if
[
$SRS_UTEST
=
YES
]
;
then
SrsUtestSummaryColor
=
"
\$
(GREEN)"
;
fi
SrsGperfSummaryColor
=
"
\$
(YELLOW)(disabled) "
;
if
[
$SRS_GPERF
=
YES
]
;
then
SrsGperfSummaryColor
=
"
\$
(GREEN)"
;
fi
SrsGperfMCSummaryColor
=
"
\$
(YELLOW)(disabled) "
;
if
[
$SRS_GPERF_MC
=
YES
]
;
then
SrsGperfMCSummaryColor
=
"
\$
(GREEN)"
;
fi
SrsGperfMPSummaryColor
=
"
\$
(YELLOW)(disabled) "
;
if
[
$SRS_GPERF_MP
=
YES
]
;
then
SrsGperfMPSummaryColor
=
"
\$
(GREEN)"
;
fi
#####################################################################################
# makefile
...
...
@@ -95,8 +96,11 @@ default: bandwidth librtmp-sample utest
@echo -e " ${SrsUtestSummaryColor}utest: ./objs/srs_utest, the utest for srs\$(BLACK)"
@echo -e " ${SrsGperfSummaryColor}gperf: gmc/gmp/gcp for srs, @see: \$(BLACK)"
@echo -e " ${SrsGperfMCSummaryColor}gmc: gperf memory check, @see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\$(BLACK)"
@echo -e " ${SrsGperfMCSummaryColor}env PPROF_PATH=./objs/pprof HEAPCHECK=normal ./objs/srs -c conf/srs.conf # start gmc\$(BLACK)"
@echo -e " ${SrsGperfMCSummaryColor}killall -2 srs # or CTRL+C to stop gmc\$(BLACK)"
@echo -e " ${SrsGperfMCSummaryColor}env PPROF_PATH=./objs/pprof HEAPCHECK=normal ./objs/srs -c conf/srs.conf # start gmc\$(BLACK)"
@echo -e " ${SrsGperfMCSummaryColor}killall -2 srs # or CTRL+C to stop gmc\$(BLACK)"
@echo -e " ${SrsGperfMPSummaryColor}gmc: gperf memory profile, @see: http://google-perftools.googlecode.com/svn/trunk/doc/heapprofile.html\$(BLACK)"
@echo -e " ${SrsGperfMPSummaryColor}env PPROF_PATH=./objs/pprof HEAPCHECK=normal ./objs/srs -c conf/srs.conf # start gmc\$(BLACK)"
@echo -e " ${SrsGperfMPSummaryColor}killall -2 srs # or CTRL+C to stop gmc\$(BLACK)"
@echo -e "\$(GREEN)binaries @see: https://github.com/winlinvip/simple-rtmp-server/wiki/Build\$(BLACK)"
help:
...
...
trunk/research/gperftools/heap-profiler/heap_profiler.cc
查看文件 @
8cd1c11
...
...
@@ -52,12 +52,7 @@ void memory_alloc_profile() {
memory_alloc_profile_imp
();
}
void
handler
(
int
sig
)
{
exit
(
0
);
}
int
main
(
int
argc
,
char
**
argv
)
{
signal
(
SIGINT
,
handler
);
// must start profiler manually.
HeapProfilerStart
(
NULL
);
...
...
请
注册
或
登录
后发表评论