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-11-12 18:19:47 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
7f6583a097894b7d1c3aefef6d31a5986bc1c253
7f6583a0
2 parents
a1a6292a
95315925
Merge branch 'srs.master'
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
8 行增加
和
8 行删除
trunk/src/rtmp/srs_protocol_stack.cpp
trunk/src/rtmp/srs_protocol_stack.hpp
trunk/src/rtmp/srs_protocol_stack.cpp
查看文件 @
7f6583a
...
...
@@ -564,21 +564,21 @@ int SrsProtocol::do_send_message(SrsMessage* msg)
srs_assert
(
nbh
>
0
);
// header iov
iov
[
0
].
iov_base
=
header
;
iov
[
0
].
iov_len
=
nbh
;
out_iov
[
0
].
iov_base
=
header
;
out_iov
[
0
].
iov_len
=
nbh
;
// payload iov
int
payload_size
=
pend
-
p
;
if
(
payload_size
>
out_chunk_size
)
{
payload_size
=
out_chunk_size
;
}
iov
[
1
].
iov_base
=
p
;
iov
[
1
].
iov_len
=
payload_size
;
out_iov
[
1
].
iov_base
=
p
;
out_iov
[
1
].
iov_len
=
payload_size
;
// send by writev
// sendout header and payload by writev.
// decrease the sys invoke count to get higher performance.
if
((
ret
=
skt
->
writev
(
iov
,
2
,
NULL
))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
skt
->
writev
(
out_
iov
,
2
,
NULL
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"send with writev failed. ret=%d"
,
ret
);
return
ret
;
}
...
...
@@ -592,7 +592,7 @@ int SrsProtocol::do_send_message(SrsMessage* msg)
void
SrsProtocol
::
generate_chunk_header
(
SrsMessageHeader
*
mh
,
bool
c0
,
int
*
pnbh
,
char
**
ph
)
{
char
*
cache
=
out_c0_cache
;
char
*
cache
=
out_c0
c3
_cache
;
// to directly set the field.
char
*
pp
=
NULL
;
...
...
trunk/src/rtmp/srs_protocol_stack.hpp
查看文件 @
7f6583a
...
...
@@ -215,11 +215,11 @@ private:
* used for type0, 11bytes(or 15bytes with extended timestamp) header.
* or for type3, 1bytes(or 5bytes with extended timestamp) header.
*/
char
out_c0_cache
[
SRS_CONSTS_RTMP_MAX_FMT0_HEADER_SIZE
];
char
out_c0
c3
_cache
[
SRS_CONSTS_RTMP_MAX_FMT0_HEADER_SIZE
];
/**
* output iovec cache.
*/
iovec
iov
[
2
];
iovec
out_
iov
[
2
];
/**
* output chunk size, default to 128, set by config.
*/
...
...
请
注册
或
登录
后发表评论