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-07-20 13:25:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
198a7f1e9d9de23b4aeadd4fb232664cb716c461
198a7f1e
1 parent
a9f7f1ec
refine the rtmp consts name
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
21 行增加
和
21 行删除
trunk/src/app/srs_app_edge.cpp
trunk/src/app/srs_app_forward.cpp
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/kernel/srs_kernel_consts.hpp
trunk/src/rtmp/srs_protocol_stack.hpp
trunk/src/app/srs_app_edge.cpp
查看文件 @
198a7f1
...
...
@@ -122,8 +122,8 @@ int SrsEdgeIngester::cycle()
}
srs_assert
(
client
);
client
->
set_recv_timeout
(
SRS_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_SEND_TIMEOUT_US
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
SrsRequest
*
req
=
_req
;
...
...
@@ -368,8 +368,8 @@ int SrsEdgeForwarder::start()
}
srs_assert
(
client
);
client
->
set_recv_timeout
(
SRS_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_SEND_TIMEOUT_US
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
SrsRequest
*
req
=
_req
;
...
...
@@ -411,7 +411,7 @@ int SrsEdgeForwarder::cycle()
{
int
ret
=
ERROR_SUCCESS
;
client
->
set_recv_timeout
(
SRS_PULSE_TIMEOUT_US
);
client
->
set_recv_timeout
(
SRS_
CONSTS_RTMP_
PULSE_TIMEOUT_US
);
SrsPithyPrint
pithy_print
(
SRS_STAGE_EDGE
);
...
...
trunk/src/app/srs_app_forward.cpp
查看文件 @
198a7f1
...
...
@@ -208,8 +208,8 @@ int SrsForwarder::cycle()
}
srs_assert
(
client
);
client
->
set_recv_timeout
(
SRS_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_SEND_TIMEOUT_US
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
if
((
ret
=
client
->
handshake
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"handshake with server failed. ret=%d"
,
ret
);
...
...
@@ -282,7 +282,7 @@ int SrsForwarder::forward()
{
int
ret
=
ERROR_SUCCESS
;
client
->
set_recv_timeout
(
SRS_PULSE_TIMEOUT_US
);
client
->
set_recv_timeout
(
SRS_
CONSTS_RTMP_
PULSE_TIMEOUT_US
);
SrsPithyPrint
pithy_print
(
SRS_STAGE_FORWARDER
);
...
...
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
198a7f1
...
...
@@ -115,8 +115,8 @@ int SrsRtmpConn::do_cycle()
srs_trace
(
"RTMP client ip=%s"
,
ip
.
c_str
());
rtmp
->
set_recv_timeout
(
SRS_RECV_TIMEOUT_US
);
rtmp
->
set_send_timeout
(
SRS_SEND_TIMEOUT_US
);
rtmp
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
rtmp
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
if
((
ret
=
rtmp
->
handshake
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"rtmp handshake failed. ret=%d"
,
ret
);
...
...
@@ -290,8 +290,8 @@ int SrsRtmpConn::stream_service_cycle()
srs_client_type_string
(
type
).
c_str
(),
req
->
stream
.
c_str
(),
req
->
duration
);
// client is identified, set the timeout to service timeout.
rtmp
->
set_recv_timeout
(
SRS_RECV_TIMEOUT_US
);
rtmp
->
set_send_timeout
(
SRS_SEND_TIMEOUT_US
);
rtmp
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
rtmp
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
// set chunk size to larger.
int
chunk_size
=
_srs_config
->
get_chunk_size
(
req
->
vhost
);
...
...
@@ -501,7 +501,7 @@ int SrsRtmpConn::playing(SrsSource* source)
SrsAutoFree
(
SrsConsumer
,
consumer
);
srs_verbose
(
"consumer created success."
);
rtmp
->
set_recv_timeout
(
SRS_PULSE_TIMEOUT_US
);
rtmp
->
set_recv_timeout
(
SRS_
CONSTS_RTMP_
PULSE_TIMEOUT_US
);
SrsPithyPrint
pithy_print
(
SRS_STAGE_PLAY_USER
);
...
...
@@ -962,8 +962,8 @@ int SrsRtmpConn::do_token_traverse_auth(SrsSocket* io, SrsRtmpClient* client)
srs_assert
(
client
);
client
->
set_recv_timeout
(
SRS_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_SEND_TIMEOUT_US
);
client
->
set_recv_timeout
(
SRS_CONSTS_RTMP_RECV_TIMEOUT_US
);
client
->
set_send_timeout
(
SRS_CONSTS_RTMP_SEND_TIMEOUT_US
);
if
((
ret
=
client
->
handshake
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"handshake with server failed. ret=%d"
,
ret
);
...
...
trunk/src/kernel/srs_kernel_consts.hpp
查看文件 @
198a7f1
...
...
@@ -55,16 +55,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// the timeout to wait client data,
// if timeout, close the connection.
#define SRS_SEND_TIMEOUT_US (int64_t)(30*1000*1000LL)
#define SRS_
CONSTS_RTMP_
SEND_TIMEOUT_US (int64_t)(30*1000*1000LL)
// the timeout to send data to client,
// if timeout, close the connection.
#define SRS_RECV_TIMEOUT_US (int64_t)(30*1000*1000LL)
#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.
#define SRS_PULSE_TIMEOUT_US (int64_t)(200*1000LL)
#define SRS_
CONSTS_RTMP_
PULSE_TIMEOUT_US (int64_t)(200*1000LL)
/**
* max rtmp header size:
...
...
@@ -73,7 +73,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* 4bytes timestamp header,
* that is, 1+11+4=16bytes.
*/
#define RTMP_MAX_FMT0_HEADER_SIZE 16
#define
SRS_CONSTS_
RTMP_MAX_FMT0_HEADER_SIZE 16
/**
* max rtmp header size:
* 1bytes basic header,
...
...
@@ -81,7 +81,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* that is, 1+4=5bytes.
*/
// always use fmt0 as cache.
//#define RTMP_MAX_FMT3_HEADER_SIZE 5
//#define
SRS_CONSTS_
RTMP_MAX_FMT3_HEADER_SIZE 5
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
...
...
trunk/src/rtmp/srs_protocol_stack.hpp
查看文件 @
198a7f1
...
...
@@ -100,7 +100,7 @@ private:
* used for type0, 11bytes(or 15bytes with extended timestamp) header.
* or for type3, 1bytes(or 5bytes with extended timestamp) header.
*/
char
out_header_cache
[
RTMP_MAX_FMT0_HEADER_SIZE
];
char
out_header_cache
[
SRS_CONSTS_
RTMP_MAX_FMT0_HEADER_SIZE
];
/**
* output chunk size, default to 128, set by config.
*/
...
...
请
注册
或
登录
后发表评论