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-06 18:37:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
09afaa250ab059b261f3858cf4a998a7612035ef
09afaa25
1 parent
6a4b1774
add comments of message array, add utest.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
17 行增加
和
0 行删除
trunk/src/rtmp/srs_protocol_msg_array.hpp
trunk/src/utest/srs_utest_protocol.cpp
trunk/src/rtmp/srs_protocol_msg_array.hpp
查看文件 @
09afaa2
...
...
@@ -50,7 +50,13 @@ public:
SrsSharedPtrMessage
**
msgs
;
int
size
;
public
:
/**
* create msg array, initialize array to NULL ptrs.
*/
SrsSharedPtrMessageArray
(
int
_size
);
/**
* free the msgs not sent out(not NULL).
*/
virtual
~
SrsSharedPtrMessageArray
();
};
...
...
trunk/src/utest/srs_utest_protocol.cpp
查看文件 @
09afaa2
...
...
@@ -413,5 +413,16 @@ VOID TEST(ProtocolMsgArrayTest, MessageArray)
EXPECT_EQ
(
3
,
msg
.
count
());
}
EXPECT_EQ
(
0
,
msg
.
count
());
if
(
true
)
{
SrsSharedPtrMessageArray
arr
(
3
);
arr
.
msgs
[
0
]
=
msg
.
copy
();
EXPECT_EQ
(
1
,
msg
.
count
());
arr
.
msgs
[
2
]
=
msg
.
copy
();
EXPECT_EQ
(
2
,
msg
.
count
());
}
EXPECT_EQ
(
0
,
msg
.
count
());
}
...
...
请
注册
或
登录
后发表评论