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-04-30 12:08:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fc501b050b11c78189b4d9d9553832d82d688c2e
fc501b05
1 parent
30bb3ff7
add atc_auto to disable or enable auto detect atc
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
31 行增加
和
6 行删除
trunk/conf/full.conf
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_config.hpp
trunk/src/app/srs_app_source.cpp
trunk/src/core/srs_core.hpp
trunk/conf/full.conf
查看文件 @
fc501b0
...
...
@@ -223,6 +223,12 @@ vhost atc.srs.com {
#
# default: off
atc
on
;
# whether enable the auto atc,
# if enabled, detect the bravo_atc="true" in onMetaData packet,
# set atc to on if matched.
# always ignore the onMetaData if atc_auto is off.
# default: on
atc_auto
on
;
}
# vhost for bandwidth check
...
...
trunk/src/app/srs_app_config.cpp
查看文件 @
fc501b0
...
...
@@ -1654,7 +1654,7 @@ bool SrsConfig::get_atc(string vhost)
SrsConfDirective
*
conf
=
get_vhost
(
vhost
);
if
(
!
conf
)
{
return
tru
e
;
return
fals
e
;
}
conf
=
conf
->
get
(
"atc"
);
...
...
@@ -1665,6 +1665,22 @@ bool SrsConfig::get_atc(string vhost)
return
false
;
}
bool
SrsConfig
::
get_atc_auto
(
string
vhost
)
{
SrsConfDirective
*
conf
=
get_vhost
(
vhost
);
if
(
!
conf
)
{
return
true
;
}
conf
=
conf
->
get
(
"atc_auto"
);
if
(
conf
&&
conf
->
arg0
()
==
"off"
)
{
return
false
;
}
return
true
;
}
double
SrsConfig
::
get_queue_length
(
string
vhost
)
{
SrsConfDirective
*
conf
=
get_vhost
(
vhost
);
...
...
trunk/src/app/srs_app_config.hpp
查看文件 @
fc501b0
...
...
@@ -180,6 +180,7 @@ public:
virtual
SrsConfDirective
*
get_vhost_on_dvr_hss_reap_flv
(
std
::
string
vhost
);
virtual
bool
get_gop_cache
(
std
::
string
vhost
);
virtual
bool
get_atc
(
std
::
string
vhost
);
virtual
bool
get_atc_auto
(
std
::
string
vhost
);
virtual
double
get_queue_length
(
std
::
string
vhost
);
virtual
SrsConfDirective
*
get_forward
(
std
::
string
vhost
);
virtual
SrsConfDirective
*
get_refer
(
std
::
string
vhost
);
...
...
trunk/src/app/srs_app_source.cpp
查看文件 @
fc501b0
...
...
@@ -822,11 +822,13 @@ int SrsSource::on_meta_data(SrsMessage* msg, SrsOnMetaDataPacket* metadata)
}
}
// if
bravo-atc
, open atc for vhost.
// if
allow atc_auto and bravo-atc detected
, open atc for vhost.
atc
=
_srs_config
->
get_atc
(
_req
->
vhost
);
if
((
prop
=
metadata
->
metadata
->
get_property
(
"bravo_atc"
))
!=
NULL
)
{
if
(
prop
->
is_string
()
&&
prop
->
to_str
()
==
"true"
)
{
atc
=
true
;
if
(
_srs_config
->
get_atc_auto
(
_req
->
vhost
))
{
if
((
prop
=
metadata
->
metadata
->
get_property
(
"bravo_atc"
))
!=
NULL
)
{
if
(
prop
->
is_string
()
&&
prop
->
to_str
()
==
"true"
)
{
atc
=
true
;
}
}
}
...
...
trunk/src/core/srs_core.hpp
查看文件 @
fc501b0
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "8
5
"
#define VERSION_REVISION "8
6
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "srs"
...
...
请
注册
或
登录
后发表评论