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-05-22 17:08:26 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6ca46e84bc01f94424c96736d530bad8d68d9a14
6ca46e84
1 parent
c17a1198
fix #397, the USER_HZ maybe not 100. 2.0.165
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
13 行增加
和
10 行删除
README.md
trunk/src/app/srs_app_utility.cpp
trunk/src/core/srs_core.hpp
README.md
查看文件 @
6ca46e8
...
...
@@ -562,6 +562,7 @@ Supported operating systems and hardware:
### SRS 2.0 history
*
v2.0, 2015-05-22, fix
[
#397
](
https://github.com/simple-rtmp-server/srs/issues/397
)
the USER_HZ maybe not 100. 2.0.165
*
v2.0, 2015-05-22, for
[
#400
](
https://github.com/simple-rtmp-server/srs/issues/400
)
, parse when got entire http header, by feilong. 2.0.164.
*
v2.0, 2015-05-19, merge from bravo system, add the rtmfp to bms(commercial srs). 2.0.163.
*
v2.0, 2015-05-10, support push flv stream over HTTP POST to SRS.
...
...
@@ -672,6 +673,10 @@ Supported operating systems and hardware:
### SRS 1.0 history
*
v1.0, 2015-05-22, fix
[
#397
](
https://github.com/simple-rtmp-server/srs/issues/397
)
the USER_HZ maybe not 100. 1.0.32
*
v1.0, 2015-03-26, fix hls aac adts bug, in aac mux. 1.0.31.
*
<strong>
v1.0, 2015-03-19,
[
1.0r3 release(1.0.30)
](
https://github.com/simple-rtmp-server/srs/releases/tag/1.0r3
)
released. 59511 lines.
</strong>
*
v1.0, 2015-03-17, remove the osx for 1.0.30.
*
v1.0, 2015-02-17, the join maybe failed, should use a variable to ensure thread terminated. 1.0.28.
*
<strong>
v1.0, 2015-02-12,
[
1.0r2 release(1.0.27)
](
https://github.com/simple-rtmp-server/srs/releases/tag/1.0r2
)
released. 59507 lines.
</strong>
*
v1.0, 2015-02-11, dev code HuKaiqun for 1.0.27.
...
...
trunk/src/app/srs_app_utility.cpp
查看文件 @
6ca46e8
...
...
@@ -418,15 +418,13 @@ bool get_proc_self_stat(SrsProcSelfStat& r)
void
srs_update_proc_stat
()
{
// always assert the USER_HZ is 1/100ths
// @see: http://stackoverflow.com/questions/7298646/calculating-user-nice-sys-idle-iowait-irq-and-sirq-from-proc-stat/7298711
static
bool
user_hz_assert
=
false
;
if
(
!
user_hz_assert
)
{
user_hz_assert
=
true
;
int
USER_HZ
=
sysconf
(
_SC_CLK_TCK
);
srs_trace
(
"USER_HZ=%d"
,
USER_HZ
);
srs_assert
(
USER_HZ
==
100
);
// @see https://github.com/simple-rtmp-server/srs/issues/397
static
int
user_hz
=
0
;
if
(
user_hz
<=
0
)
{
user_hz
=
sysconf
(
_SC_CLK_TCK
);
srs_trace
(
"USER_HZ=%d"
,
user_hz
);
srs_assert
(
user_hz
>
0
);
}
// system cpu stat
...
...
@@ -471,7 +469,7 @@ void srs_update_proc_stat()
int64_t
total
=
r
.
sample_time
-
o
.
sample_time
;
int64_t
usage
=
(
r
.
utime
+
r
.
stime
)
-
(
o
.
utime
+
o
.
stime
);
if
(
total
>
0
)
{
r
.
percent
=
(
float
)(
usage
*
1000
/
(
double
)
total
/
100
);
r
.
percent
=
(
float
)(
usage
*
1000
/
(
double
)
total
/
user_hz
);
}
// upate cache.
...
...
trunk/src/core/srs_core.hpp
查看文件 @
6ca46e8
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 16
4
#define VERSION_REVISION 16
5
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论