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-12-28 18:02:20 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
96a4428bdb5317c6116ae72b84dae5d627e4f132
96a4428b
1 parent
190db758
refine the http request parse. edge retry timeout.
显示空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
18 行增加
和
0 行删除
trunk/src/app/srs_app_edge.cpp
trunk/src/app/srs_app_edge.hpp
trunk/src/app/srs_app_http_conn.cpp
trunk/src/app/srs_app_edge.cpp
100755 → 100644
查看文件 @
96a4428
...
...
@@ -144,6 +144,11 @@ void SrsEdgeRtmpUpstream::close()
sdk
->
close
();
}
void
SrsEdgeRtmpUpstream
::
set_recv_timeout
(
int64_t
timeout
)
{
sdk
->
set_recv_timeout
(
timeout
);
}
void
SrsEdgeRtmpUpstream
::
kbps_sample
(
const
char
*
label
,
int64_t
age
)
{
sdk
->
kbps_sample
(
label
,
age
);
...
...
@@ -238,6 +243,9 @@ int SrsEdgeIngester::ingest()
SrsPithyPrint
*
pprint
=
SrsPithyPrint
::
create_edge
();
SrsAutoFree
(
SrsPithyPrint
,
pprint
);
// set to larger timeout to read av data from origin.
upstream
->
set_recv_timeout
(
SRS_EDGE_INGESTER_TIMEOUT_US
);
while
(
!
pthread
->
interrupted
())
{
pprint
->
elapse
();
...
...
@@ -409,6 +417,7 @@ void SrsEdgeForwarder::stop()
}
#define SYS_MAX_EDGE_SEND_MSGS 128
int
SrsEdgeForwarder
::
cycle
()
{
int
ret
=
ERROR_SUCCESS
;
...
...
trunk/src/app/srs_app_edge.hpp
查看文件 @
96a4428
...
...
@@ -89,6 +89,8 @@ public:
virtual
int
recv_message
(
SrsCommonMessage
**
pmsg
)
=
0
;
virtual
int
decode_message
(
SrsCommonMessage
*
msg
,
SrsPacket
**
ppacket
)
=
0
;
virtual
void
close
()
=
0
;
public
:
virtual
void
set_recv_timeout
(
int64_t
timeout
)
=
0
;
virtual
void
kbps_sample
(
const
char
*
label
,
int64_t
age
)
=
0
;
};
...
...
@@ -104,6 +106,8 @@ public:
virtual
int
recv_message
(
SrsCommonMessage
**
pmsg
);
virtual
int
decode_message
(
SrsCommonMessage
*
msg
,
SrsPacket
**
ppacket
);
virtual
void
close
();
public
:
virtual
void
set_recv_timeout
(
int64_t
timeout
);
virtual
void
kbps_sample
(
const
char
*
label
,
int64_t
age
);
};
...
...
trunk/src/app/srs_app_http_conn.cpp
查看文件 @
96a4428
...
...
@@ -830,6 +830,11 @@ SrsRequest* SrsHttpMessage::to_request(string vhost)
srs_discovery_tc_url
(
req
->
tcUrl
,
req
->
schema
,
req
->
host
,
req
->
vhost
,
req
->
app
,
req
->
port
,
req
->
param
);
req
->
strip
();
// reset the host to http request host.
if
(
req
->
host
==
SRS_CONSTS_RTMP_DEFAULT_VHOST
)
{
req
->
host
=
_uri
->
get_host
();
}
return
req
;
}
...
...
请
注册
或
登录
后发表评论