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
2015-09-17 11:37:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
256459e1ece66011022ce0ba8beda2a54355cea4
256459e1
1 parent
240a1bfa
fix the utest bug
显示空白字符变更
内嵌
并排对比
正在显示
6 个修改的文件
包含
114 行增加
和
74 行删除
trunk/auto/utest.sh
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_http_api.cpp
trunk/src/app/srs_app_http_hooks.cpp
trunk/src/app/srs_app_http_hooks.hpp
trunk/src/utest/srs_utest_config.cpp
trunk/auto/utest.sh
100755 → 100644
查看文件 @
256459e
...
...
@@ -20,6 +20,15 @@ SRS_TRUNK_PREFIX=../..
# gest dir, relative to objs/utest, it's trunk/objs/gtest
GTEST_DIR
=
${
SRS_TRUNK_PREFIX
}
/
${
SRS_OBJS_DIR
}
/gtest
# the extra defines to compile utest.
EXTRA_DEFINES
=
""
# for osx to disable the error.
# gtest/include/gtest/internal/gtest-port.h:499:13: fatal error: 'tr1/tuple' file not found
if
[
$SRS_OSX
=
YES
]
;
then
EXTRA_DEFINES
=
"
$EXTRA_DEFINES
-DGTEST_HAS_TR1_TUPLE=0"
fi
cat
<< END > ${FILE}
# user must run make the ${SRS_OBJS_DIR}/utest dir
# at the same dir of Makefile.
...
...
@@ -50,6 +59,7 @@ CPPFLAGS += -I\$(GTEST_DIR)/include
# Flags passed to the C++ compiler.
CXXFLAGS += -g -Wall -Wextra -O0
CXXFLAGS += $EXTRA_DEFINES
# All tests produced by this Makefile. Remember to add new tests you
# created to the list.
...
...
trunk/src/app/srs_app_config.cpp
查看文件 @
256459e
...
...
@@ -429,6 +429,23 @@ int SrsConfDirective::parse_conf(SrsConfigBuffer* buffer, SrsDirectiveType type)
return
ret
;
}
SrsConfDirective
*
SrsConfDirective
::
copy
()
{
SrsConfDirective
*
cp
=
new
SrsConfDirective
();
cp
->
conf_line
=
conf_line
;
cp
->
name
=
name
;
cp
->
args
=
args
;
cp
->
create_time
=
create_time
;
for
(
int
i
=
0
;
i
<
(
int
)
directives
.
size
();
i
++
)
{
SrsConfDirective
*
directive
=
directives
.
at
(
i
);
cp
->
directives
.
push_back
(
directive
->
copy
());
}
return
cp
;
}
// see: ngx_conf_read_token
int
SrsConfDirective
::
read_token
(
SrsConfigBuffer
*
buffer
,
vector
<
string
>&
args
,
int
&
line_start
)
{
...
...
@@ -746,7 +763,6 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root)
// ENABLED => ENABLED (modified)
if
(
get_vhost_enabled
(
new_vhost
)
&&
get_vhost_enabled
(
old_vhost
))
{
srs_trace
(
"vhost %s maybe modified, reload its detail."
,
vhost
.
c_str
());
// chunk_size, only one per vhost.
if
(
!
srs_directive_equals
(
new_vhost
->
get
(
"chunk_size"
),
old_vhost
->
get
(
"chunk_size"
)))
{
for
(
it
=
subscribes
.
begin
();
it
!=
subscribes
.
end
();
++
it
)
{
...
...
@@ -3025,7 +3041,6 @@ int SrsConfig::check_config()
}
}
////////////////////////////////////////////////////////////////////////
// check listen for rtmp.
////////////////////////////////////////////////////////////////////////
...
...
trunk/src/app/srs_app_http_api.cpp
100755 → 100644
查看文件 @
256459e
...
...
@@ -1304,7 +1304,6 @@ int SrsGoApiError::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
return
srs_api_response_code
(
w
,
r
,
100
);
}
SrsHttpApi
::
SrsHttpApi
(
IConnectionManager
*
cm
,
st_netfd_t
fd
,
SrsHttpServeMux
*
m
)
:
SrsConnection
(
cm
,
fd
)
{
...
...
trunk/src/app/srs_app_http_hooks.cpp
查看文件 @
256459e
...
...
@@ -77,7 +77,9 @@ int SrsHttpHooks::on_connect(string url, SrsRequest* req)
std
::
string
data
=
obj
->
to_json
();
std
::
string
res
;
int
status_code
;
if
((
ret
=
do_post
(
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
SrsHttpClient
http
;
if
((
ret
=
do_post
(
&
http
,
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"http post on_connect uri failed. "
"client_id=%d, url=%s, request=%s, response=%s, code=%d, ret=%d"
,
client_id
,
url
.
c_str
(),
data
.
c_str
(),
res
.
c_str
(),
status_code
,
ret
);
...
...
@@ -111,7 +113,9 @@ void SrsHttpHooks::on_close(string url, SrsRequest* req, int64_t send_bytes, int
std
::
string
data
=
obj
->
to_json
();
std
::
string
res
;
int
status_code
;
if
((
ret
=
do_post
(
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
SrsHttpClient
http
;
if
((
ret
=
do_post
(
&
http
,
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"http post on_close uri failed, ignored. "
"client_id=%d, url=%s, request=%s, response=%s, code=%d, ret=%d"
,
client_id
,
url
.
c_str
(),
data
.
c_str
(),
res
.
c_str
(),
status_code
,
ret
);
...
...
@@ -144,7 +148,9 @@ int SrsHttpHooks::on_publish(string url, SrsRequest* req)
std
::
string
data
=
obj
->
to_json
();
std
::
string
res
;
int
status_code
;
if
((
ret
=
do_post
(
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
SrsHttpClient
http
;
if
((
ret
=
do_post
(
&
http
,
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"http post on_publish uri failed. "
"client_id=%d, url=%s, request=%s, response=%s, code=%d, ret=%d"
,
client_id
,
url
.
c_str
(),
data
.
c_str
(),
res
.
c_str
(),
status_code
,
ret
);
...
...
@@ -177,7 +183,9 @@ void SrsHttpHooks::on_unpublish(string url, SrsRequest* req)
std
::
string
data
=
obj
->
to_json
();
std
::
string
res
;
int
status_code
;
if
((
ret
=
do_post
(
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
SrsHttpClient
http
;
if
((
ret
=
do_post
(
&
http
,
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"http post on_unpublish uri failed, ignored. "
"client_id=%d, url=%s, request=%s, response=%s, code=%d, ret=%d"
,
client_id
,
url
.
c_str
(),
data
.
c_str
(),
res
.
c_str
(),
status_code
,
ret
);
...
...
@@ -211,7 +219,9 @@ int SrsHttpHooks::on_play(string url, SrsRequest* req)
std
::
string
data
=
obj
->
to_json
();
std
::
string
res
;
int
status_code
;
if
((
ret
=
do_post
(
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
SrsHttpClient
http
;
if
((
ret
=
do_post
(
&
http
,
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"http post on_play uri failed. "
"client_id=%d, url=%s, request=%s, response=%s, code=%d, ret=%d"
,
client_id
,
url
.
c_str
(),
data
.
c_str
(),
res
.
c_str
(),
status_code
,
ret
);
...
...
@@ -244,7 +254,9 @@ void SrsHttpHooks::on_stop(string url, SrsRequest* req)
std
::
string
data
=
obj
->
to_json
();
std
::
string
res
;
int
status_code
;
if
((
ret
=
do_post
(
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
SrsHttpClient
http
;
if
((
ret
=
do_post
(
&
http
,
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
srs_warn
(
"http post on_stop uri failed, ignored. "
"client_id=%d, url=%s, request=%s, response=%s, code=%d, ret=%d"
,
client_id
,
url
.
c_str
(),
data
.
c_str
(),
res
.
c_str
(),
status_code
,
ret
);
...
...
@@ -280,7 +292,9 @@ int SrsHttpHooks::on_dvr(int cid, string url, SrsRequest* req, string file)
std
::
string
data
=
obj
->
to_json
();
std
::
string
res
;
int
status_code
;
if
((
ret
=
do_post
(
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
SrsHttpClient
http
;
if
((
ret
=
do_post
(
&
http
,
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"http post on_dvr uri failed, ignored. "
"client_id=%d, url=%s, request=%s, response=%s, code=%d, ret=%d"
,
client_id
,
url
.
c_str
(),
data
.
c_str
(),
res
.
c_str
(),
status_code
,
ret
);
...
...
@@ -321,7 +335,9 @@ int SrsHttpHooks::on_hls(int cid, string url, SrsRequest* req, string file, stri
std
::
string
data
=
obj
->
to_json
();
std
::
string
res
;
int
status_code
;
if
((
ret
=
do_post
(
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
SrsHttpClient
http
;
if
((
ret
=
do_post
(
&
http
,
url
,
data
,
status_code
,
res
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"http post on_hls uri failed, ignored. "
"client_id=%d, url=%s, request=%s, response=%s, code=%d, ret=%d"
,
client_id
,
url
.
c_str
(),
data
.
c_str
(),
res
.
c_str
(),
status_code
,
ret
);
...
...
@@ -403,7 +419,7 @@ int SrsHttpHooks::on_hls_notify(int cid, std::string url, SrsRequest* req, std::
return
ret
;
}
int
SrsHttpHooks
::
do_post
(
std
::
string
url
,
std
::
string
req
,
int
&
code
,
string
&
res
)
int
SrsHttpHooks
::
do_post
(
SrsHttpClient
*
hc
,
std
::
string
url
,
std
::
string
req
,
int
&
code
,
string
&
res
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -413,13 +429,12 @@ int SrsHttpHooks::do_post(std::string url, std::string req, int& code, string& r
return
ret
;
}
SrsHttpClient
http
;
if
((
ret
=
http
.
initialize
(
uri
.
get_host
(),
uri
.
get_port
()))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
hc
->
initialize
(
uri
.
get_host
(),
uri
.
get_port
()))
!=
ERROR_SUCCESS
)
{
return
ret
;
}
ISrsHttpMessage
*
msg
=
NULL
;
if
((
ret
=
h
ttp
.
post
(
uri
.
get_path
(),
req
,
&
msg
))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
h
c
->
post
(
uri
.
get_path
(),
req
,
&
msg
))
!=
ERROR_SUCCESS
)
{
return
ret
;
}
SrsAutoFree
(
ISrsHttpMessage
,
msg
);
...
...
trunk/src/app/srs_app_http_hooks.hpp
查看文件 @
256459e
...
...
@@ -40,6 +40,7 @@ class SrsStSocket;
class
SrsRequest
;
class
SrsHttpParser
;
class
SrsFlvSegment
;
class
SrsHttpClient
;
/**
* the http hooks, http callback api,
...
...
@@ -120,7 +121,7 @@ public:
*/
static
int
on_hls_notify
(
int
cid
,
std
::
string
url
,
SrsRequest
*
req
,
std
::
string
ts_url
,
int
nb_notify
);
private
:
static
int
do_post
(
std
::
string
url
,
std
::
string
req
,
int
&
code
,
std
::
string
&
res
);
static
int
do_post
(
SrsHttpClient
*
hc
,
std
::
string
url
,
std
::
string
req
,
int
&
code
,
std
::
string
&
res
);
};
#endif
...
...
trunk/src/utest/srs_utest_config.cpp
查看文件 @
256459e
...
...
@@ -1454,11 +1454,11 @@ VOID TEST(ConfigMainTest, ParseFullConf)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -1536,11 +1536,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_same_edge)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_publish
(
vhost
));
...
...
@@ -1617,11 +1617,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_change_edge)
EXPECT_TRUE(conf.get_atc_auto(vhost));
EXPECT_TRUE(conf.get_time_jitter(vhost) == SrsRtmpJitterAlgorithmFULL);
EXPECT_FLOAT_EQ(30, conf.get_queue_length(vhost));
EXPECT_TRUE(
NULL == conf.get_refer
(vhost));
EXPECT_TRUE(
!conf.get_refer_enabled
(vhost));
EXPECT_TRUE(NULL == conf.get_refer_play(vhost));
EXPECT_TRUE(NULL == conf.get_refer_publish(vhost));
EXPECT_EQ(60000, conf.get_chunk_size(vhost));
EXPECT_TRUE(
NULL == conf.get_forwar
d(vhost));
EXPECT_TRUE(
!conf.get_forward_enable
d(vhost));
EXPECT_TRUE(NULL == conf.get_vhost_on_connect(vhost));
EXPECT_TRUE(NULL == conf.get_vhost_on_close(vhost));
EXPECT_TRUE(NULL == conf.get_vhost_on_publish(vhost));
...
...
@@ -1692,11 +1692,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_dvr)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_publish
(
vhost
));
...
...
@@ -1767,11 +1767,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_ingest)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_publish
(
vhost
));
...
...
@@ -1863,11 +1863,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_http)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_publish
(
vhost
));
...
...
@@ -1941,11 +1941,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_hls_enabled)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_publish
(
vhost
));
...
...
@@ -2019,11 +2019,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_hls_disabled)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_publish
(
vhost
));
...
...
@@ -2097,11 +2097,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_http_hooks)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_TRUE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
!=
conf
.
get_vhost_on_connect
(
vhost
));
if
(
true
)
{
...
...
@@ -2206,11 +2206,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_min_delay)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
10
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -2285,9 +2285,9 @@ VOID TEST(ConfigMainTest, ParseFullConf_refer_anti_suck)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
!=
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
conf
.
get_refer_enabled
(
vhost
));
if
(
true
)
{
SrsConfDirective
*
refer
=
conf
.
get_refer
(
vhost
);
SrsConfDirective
*
refer
=
conf
.
get_refer
_all
(
vhost
);
EXPECT_STREQ
(
"github.com"
,
refer
->
arg0
().
c_str
());
EXPECT_STREQ
(
"github.io"
,
refer
->
arg1
().
c_str
());
}
...
...
@@ -2304,7 +2304,7 @@ VOID TEST(ConfigMainTest, ParseFullConf_refer_anti_suck)
EXPECT_STREQ
(
"github.io"
,
refer
->
arg1
().
c_str
());
}
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -2379,13 +2379,13 @@ VOID TEST(ConfigMainTest, ParseFullConf_forward_same_vhost)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
!=
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
conf
.
get_forward_enable
d
(
vhost
));
if
(
true
)
{
SrsConfDirective
*
forward
=
conf
.
get_forward
(
vhost
);
SrsConfDirective
*
forward
=
conf
.
get_forward
s
(
vhost
);
EXPECT_STREQ
(
"127.0.0.1:1936"
,
forward
->
arg0
().
c_str
());
EXPECT_STREQ
(
"127.0.0.1:1937"
,
forward
->
arg1
().
c_str
());
}
...
...
@@ -2464,11 +2464,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_forward_change_vhost)
EXPECT_TRUE(conf.get_atc_auto(vhost));
EXPECT_TRUE(conf.get_time_jitter(vhost) == SrsRtmpJitterAlgorithmFULL);
EXPECT_FLOAT_EQ(30, conf.get_queue_length(vhost));
EXPECT_TRUE(
NULL == conf.get_refer
(vhost));
EXPECT_TRUE(
!conf.get_refer_enabled
(vhost));
EXPECT_TRUE(NULL == conf.get_refer_play(vhost));
EXPECT_TRUE(NULL == conf.get_refer_publish(vhost));
EXPECT_EQ(60000, conf.get_chunk_size(vhost));
EXPECT_TRUE(
NULL == conf.get_forwar
d(vhost));
EXPECT_TRUE(
!conf.get_forward_enable
d(vhost));
EXPECT_FALSE(conf.get_vhost_http_hooks_enabled(vhost));
EXPECT_TRUE(NULL == conf.get_vhost_on_connect(vhost));
EXPECT_TRUE(NULL == conf.get_vhost_on_close(vhost));
...
...
@@ -2543,11 +2543,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_transcode_mirror)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -2633,11 +2633,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_transcode_crop)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -2723,11 +2723,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_transcode_logo)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -2813,11 +2813,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_transcode_audio)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -2897,11 +2897,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_transcode_vn)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -2981,11 +2981,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_transcode_copy)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -3061,11 +3061,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_transcode_all)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -3279,11 +3279,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_transcode_ffempty)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -3369,11 +3369,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_transcode_app)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -3459,11 +3459,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_transcode_stream)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -3549,11 +3549,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_bandcheck)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
65000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -3628,11 +3628,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_chunksize)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
128
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -3707,11 +3707,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_jitter)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -3786,11 +3786,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_atc)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
@@ -3865,11 +3865,11 @@ VOID TEST(ConfigMainTest, ParseFullConf_removed)
EXPECT_TRUE
(
conf
.
get_atc_auto
(
vhost
));
EXPECT_TRUE
(
conf
.
get_time_jitter
(
vhost
)
==
SrsRtmpJitterAlgorithmFULL
);
EXPECT_FLOAT_EQ
(
30
,
conf
.
get_queue_length
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_refer_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_play
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_refer_publish
(
vhost
));
EXPECT_EQ
(
60000
,
conf
.
get_chunk_size
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_forwar
d
(
vhost
));
EXPECT_TRUE
(
!
conf
.
get_forward_enable
d
(
vhost
));
EXPECT_FALSE
(
conf
.
get_vhost_http_hooks_enabled
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_connect
(
vhost
));
EXPECT_TRUE
(
NULL
==
conf
.
get_vhost_on_close
(
vhost
));
...
...
请
注册
或
登录
后发表评论