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-10-14 15:16:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0f4cb8ee00df00ede5925087f0c7304173d077f0
0f4cb8ee
1 parent
12e01314
refine code, remove the rtmp recv/send macro, use one macro.
隐藏空白字符变更
内嵌
并排对比
正在显示
6 个修改的文件
包含
14 行增加
和
22 行删除
trunk/src/app/srs_app_forward.cpp
trunk/src/app/srs_app_mpegts_udp.cpp
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/app/srs_app_rtsp.cpp
trunk/src/kernel/srs_kernel_consts.hpp
trunk/src/main/srs_main_ingest_hls.cpp
trunk/src/app/srs_app_forward.cpp
查看文件 @
0f4cb8e
...
...
@@ -235,8 +235,8 @@ int SrsForwarder::cycle()
}
srs_assert
(
client
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
if
((
ret
=
client
->
handshake
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"handshake with server failed. ret=%d"
,
ret
);
...
...
trunk/src/app/srs_app_mpegts_udp.cpp
查看文件 @
0f4cb8e
...
...
@@ -624,8 +624,8 @@ int SrsMpegtsOverUdp::connect()
srs_freep
(
client
);
client
=
new
SrsRtmpClient
(
transport
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
// connect to vhost/app
if
((
ret
=
client
->
handshake
())
!=
ERROR_SUCCESS
)
{
...
...
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
0f4cb8e
...
...
@@ -362,8 +362,8 @@ int SrsRtmpConn::do_cycle()
srs_trace
(
"RTMP client ip=%s"
,
ip
.
c_str
());
rtmp
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
rtmp
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
rtmp
->
set_recv_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
rtmp
->
set_send_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
if
((
ret
=
rtmp
->
handshake
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"rtmp handshake failed. ret=%d"
,
ret
);
...
...
@@ -690,8 +690,8 @@ int SrsRtmpConn::stream_service_cycle()
srs_info
(
"security check ok"
);
// client is identified, set the timeout to service timeout.
rtmp
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
rtmp
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
rtmp
->
set_recv_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
rtmp
->
set_send_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
// find a source to serve.
SrsSource
*
source
=
SrsSource
::
fetch
(
req
);
...
...
@@ -1510,8 +1510,8 @@ int SrsRtmpConn::do_token_traverse_auth(SrsRtmpClient* client)
srs_assert
(
client
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
if
((
ret
=
client
->
handshake
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"handshake with server failed. ret=%d"
,
ret
);
...
...
trunk/src/app/srs_app_rtsp.cpp
查看文件 @
0f4cb8e
...
...
@@ -676,8 +676,8 @@ int SrsRtspConn::connect()
srs_freep
(
client
);
client
=
new
SrsRtmpClient
(
transport
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
// connect to vhost/app
if
((
ret
=
client
->
handshake
())
!=
ERROR_SUCCESS
)
{
...
...
trunk/src/kernel/srs_kernel_consts.hpp
查看文件 @
0f4cb8e
...
...
@@ -71,14 +71,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// the common io timeout, for both recv and send.
#define SRS_CONSTS_RTMP_TIMEOUT_US (int64_t)(30*1000*1000LL)
// TODO: FIXME: remove following two macros.
// the timeout to send data to client,
// if timeout, close the connection.
#define SRS_CONSTS_RTMP_SEND_TIMEOUT_US (int64_t)(30*1000*1000LL)
// the timeout to wait client data,
// if timeout, close the connection.
#define SRS_CONSTS_RTMP_RECV_TIMEOUT_US (int64_t)(30*1000*1000LL)
// the timeout to wait for client control message,
// if timeout, we generally ignore and send the data to client,
// generally, it's the pulse time for data seding.
...
...
trunk/src/main/srs_main_ingest_hls.cpp
查看文件 @
0f4cb8e
...
...
@@ -1242,8 +1242,8 @@ int SrsIngestSrsOutput::connect()
srs_freep
(
client
);
client
=
new
SrsRtmpClient
(
transport
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_TIMEOUT_US
);
// connect to vhost/app
if
((
ret
=
client
->
handshake
())
!=
ERROR_SUCCESS
)
{
...
...
请
注册
或
登录
后发表评论