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-19 10:44:50 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5f48d4f566a9696fd303764da330aedb9784c55b
5f48d4f5
1 parent
df35f75d
refine comments for SrsMessageArray. 2.0.25
显示空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
10 行增加
和
6 行删除
trunk/src/app/srs_app_edge.cpp
trunk/src/app/srs_app_forward.cpp
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/core/srs_core.hpp
trunk/src/rtmp/srs_protocol_msg_array.cpp
trunk/src/app/srs_app_edge.cpp
查看文件 @
5f48d4f
...
...
@@ -498,6 +498,7 @@ int SrsEdgeForwarder::cycle()
}
// forward all messages.
// each msg in msgs.msgs must be free, for the SrsMessageArray never free them.
int
count
=
0
;
if
((
ret
=
queue
->
dump_packets
(
msgs
.
max
,
msgs
.
msgs
,
count
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"get message to push to origin failed. ret=%d"
,
ret
);
...
...
@@ -522,7 +523,7 @@ int SrsEdgeForwarder::cycle()
continue
;
}
//
all msgs to forward to origin
.
//
sendout messages, all messages are freed by send_and_free_messages()
.
if
((
ret
=
client
->
send_and_free_messages
(
msgs
.
msgs
,
count
,
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"edge publish push message to server failed. ret=%d"
,
ret
);
return
ret
;
...
...
trunk/src/app/srs_app_forward.cpp
查看文件 @
5f48d4f
...
...
@@ -416,6 +416,7 @@ int SrsForwarder::forward()
}
// forward all messages.
// each msg in msgs.msgs must be free, for the SrsMessageArray never free them.
int
count
=
0
;
if
((
ret
=
queue
->
dump_packets
(
msgs
.
max
,
msgs
.
msgs
,
count
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"get message to forward failed. ret=%d"
,
ret
);
...
...
@@ -438,7 +439,7 @@ int SrsForwarder::forward()
continue
;
}
//
all msgs to forward
.
//
sendout messages, all messages are freed by send_and_free_messages()
.
if
((
ret
=
client
->
send_and_free_messages
(
msgs
.
msgs
,
count
,
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"forwarder messages to server failed. ret=%d"
,
ret
);
return
ret
;
...
...
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
5f48d4f
...
...
@@ -558,6 +558,7 @@ int SrsRtmpConn::playing(SrsSource* source)
pithy_print
.
elapse
();
// get messages from consumer.
// each msg in msgs.msgs must be free, for the SrsMessageArray never free them.
int
count
=
0
;
if
((
ret
=
consumer
->
dump_packets
(
msgs
.
max
,
msgs
.
msgs
,
count
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"get messages from consumer failed. ret=%d"
,
ret
);
...
...
@@ -591,9 +592,7 @@ int SrsRtmpConn::playing(SrsSource* source)
}
}
// sendout messages
// @remark, becareful, all msgs must be free explicitly,
// free by send_and_free_message or srs_freep.
// sendout messages, all messages are freed by send_and_free_messages().
if
(
count
>
0
)
{
// no need to assert msg, for the rtmp will assert it.
if
((
ret
=
rtmp
->
send_and_free_messages
(
msgs
.
msgs
,
count
,
res
->
stream_id
))
!=
ERROR_SUCCESS
)
{
...
...
trunk/src/core/srs_core.hpp
查看文件 @
5f48d4f
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 2
4
#define VERSION_REVISION 2
5
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
#define RTMP_SIG_SRS_ROLE "origin/edge server"
...
...
trunk/src/rtmp/srs_protocol_msg_array.cpp
查看文件 @
5f48d4f
...
...
@@ -40,6 +40,9 @@ SrsMessageArray::SrsMessageArray(int max_msgs)
SrsMessageArray
::~
SrsMessageArray
()
{
// we just free the msgs itself,
// both delete and delete[] is ok,
// for each msg in msgs is already freed by send_and_free_messages.
srs_freep
(
msgs
);
}
...
...
请
注册
或
登录
后发表评论