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-08-22 22:51:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
baa70d4ddd610943fe47a8bb390b7b28fbb980e2
baa70d4d
1 parent
6e514344
add nb_streams for vhost
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
7 行增加
和
0 行删除
trunk/src/app/srs_app_statistic.cpp
trunk/src/app/srs_app_statistic.hpp
trunk/src/app/srs_app_statistic.cpp
100755 → 100644
查看文件 @
baa70d4
...
...
@@ -49,6 +49,7 @@ SrsStatisticVhost::SrsStatisticVhost()
kbps
->
set_io
(
NULL
,
NULL
);
nb_clients
=
0
;
nb_streams
=
0
;
}
SrsStatisticVhost
::~
SrsStatisticVhost
()
...
...
@@ -69,6 +70,7 @@ int SrsStatisticVhost::dumps(stringstream& ss)
<<
SRS_JFIELD_STR
(
"name"
,
vhost
)
<<
SRS_JFIELD_CONT
<<
SRS_JFIELD_BOOL
(
"enabled"
,
enabled
)
<<
SRS_JFIELD_CONT
<<
SRS_JFIELD_ORG
(
"clients"
,
nb_clients
)
<<
SRS_JFIELD_CONT
<<
SRS_JFIELD_ORG
(
"streams"
,
nb_streams
)
<<
SRS_JFIELD_CONT
<<
SRS_JFIELD_ORG
(
"send_bytes"
,
kbps
->
get_send_bytes
())
<<
SRS_JFIELD_CONT
<<
SRS_JFIELD_ORG
(
"recv_bytes"
,
kbps
->
get_recv_bytes
())
<<
SRS_JFIELD_CONT
<<
SRS_JFIELD_OBJ
(
"kbps"
)
...
...
@@ -169,6 +171,8 @@ void SrsStatisticStream::publish(int cid)
{
connection_cid
=
cid
;
active
=
true
;
vhost
->
nb_streams
++
;
}
void
SrsStatisticStream
::
close
()
...
...
@@ -176,6 +180,8 @@ void SrsStatisticStream::close()
has_video
=
false
;
has_audio
=
false
;
active
=
false
;
vhost
->
nb_streams
--
;
}
SrsStatisticClient
::
SrsStatisticClient
()
...
...
trunk/src/app/srs_app_statistic.hpp
100755 → 100644
查看文件 @
baa70d4
...
...
@@ -45,6 +45,7 @@ struct SrsStatisticVhost
public
:
int64_t
id
;
std
::
string
vhost
;
int
nb_streams
;
int
nb_clients
;
public
:
/**
...
...
请
注册
或
登录
后发表评论