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-12-02 10:40:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
29c6014192bdad814e9db6b4a2fa3b1d1c5edd2d
29c60141
1 parent
af83e18d
refs #1670: fix the bug for bug #237, use us and ms timeout.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
9 行增加
和
4 行删除
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
29c6014
...
...
@@ -500,7 +500,8 @@ int SrsRtmpConn::playing(SrsSource* source)
// use isolate thread to recv,
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/217
SrsQueueRecvThread
trd
(
rtmp
,
SRS_CONSTS_RTMP_PULSE_TIMEOUT_US
);
SrsQueueRecvThread
trd
(
rtmp
,
SRS_CONSTS_RTMP_PULSE_TIMEOUT_US
/
1000
);
// start isolate recv thread.
if
((
ret
=
trd
.
start
())
!=
ERROR_SUCCESS
)
{
...
...
@@ -646,7 +647,9 @@ int SrsRtmpConn::fmle_publishing(SrsSource* source)
// use isolate thread to recv,
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/237
SrsPublishRecvThread
trd
(
rtmp
,
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
,
this
,
source
,
true
,
vhost_is_edge
);
SrsPublishRecvThread
trd
(
rtmp
,
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
/
1000
,
this
,
source
,
true
,
vhost_is_edge
);
srs_info
(
"start to publish stream %s success"
,
req
->
stream
.
c_str
());
ret
=
do_publishing
(
source
,
&
trd
);
...
...
@@ -680,7 +683,9 @@ int SrsRtmpConn::flash_publishing(SrsSource* source)
// use isolate thread to recv,
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/237
SrsPublishRecvThread
trd
(
rtmp
,
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
,
this
,
source
,
false
,
vhost_is_edge
);
SrsPublishRecvThread
trd
(
rtmp
,
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
/
1000
,
this
,
source
,
false
,
vhost_is_edge
);
srs_info
(
"start to publish stream %s success"
,
req
->
stream
.
c_str
());
ret
=
do_publishing
(
source
,
&
trd
);
...
...
@@ -735,7 +740,7 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
while
(
true
)
{
// use small loop to check the error code, interval = 30s/100 = 300ms.
for
(
int
i
=
0
;
i
<
100
;
i
++
)
{
st_usleep
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
*
1000
/
100
);
st_usleep
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
/
100
);
// check the thread error code.
if
((
ret
=
trd
->
error_code
())
!=
ERROR_SUCCESS
)
{
...
...
请
注册
或
登录
后发表评论