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-12-13 11:22:40 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5529813fcb8e7fe80c85f7fd87e3375a99c9f387
5529813f
1 parent
66fd4bbf
for bug #257, support NULL msg in msgs to send.
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
15 行增加
和
10 行删除
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/app/srs_app_source.hpp
trunk/src/rtmp/srs_protocol_stack.cpp
trunk/src/app/srs_app_config.cpp
查看文件 @
5529813
...
...
@@ -2201,11 +2201,11 @@ bool SrsConfig::get_realtime_enabled(string vhost)
}
conf
=
conf
->
get
(
"min_latency"
);
if
(
!
conf
||
conf
->
arg0
()
!=
"off"
)
{
if
(
!
conf
||
conf
->
arg0
()
.
empty
()
)
{
return
SRS_PERF_MIN_LATENCY_ENABLED
;
}
return
false
;
return
conf
->
arg0
()
==
"on"
;
}
int
SrsConfig
::
get_global_chunk_size
()
...
...
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
5529813
...
...
@@ -688,14 +688,12 @@ int SrsRtmpConn::do_playing(SrsSource* source, SrsQueueRecvThread* trd)
}
// 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
)
{
if
(
!
srs_is_client_gracefully_close
(
ret
))
{
srs_error
(
"send messages to client failed. ret=%d"
,
ret
);
}
return
ret
;
// no need to assert msg, for the rtmp will assert it.
if
(
count
>
0
&&
(
ret
=
rtmp
->
send_and_free_messages
(
msgs
.
msgs
,
count
,
res
->
stream_id
))
!=
ERROR_SUCCESS
)
{
if
(
!
srs_is_client_gracefully_close
(
ret
))
{
srs_error
(
"send messages to client failed. ret=%d"
,
ret
);
}
return
ret
;
}
// if duration specified, and exceed it, stop play live.
...
...
trunk/src/app/srs_app_source.hpp
查看文件 @
5529813
...
...
@@ -237,7 +237,6 @@ public:
* get packets in consumer queue.
* @param msgs the msgs array to dump packets to send.
* @param count the count in array, output param.
* @max_count the max count to dequeue, must be positive.
*/
virtual
int
dump_packets
(
SrsMessageArray
*
msgs
,
int
&
count
);
#ifdef SRS_PERF_QUEUE_COND_WAIT
...
...
trunk/src/rtmp/srs_protocol_stack.cpp
查看文件 @
5529813
...
...
@@ -768,6 +768,10 @@ int SrsProtocol::do_send_messages(SrsSharedPtrMessage** msgs, int nb_msgs)
// if cache is consumed, try another loop.
for
(
int
i
=
0
;
i
<
nb_msgs
;
i
++
)
{
SrsSharedPtrMessage
*
msg
=
msgs
[
i
];
if
(
!
msg
)
{
continue
;
}
// ignore empty message.
if
(
!
msg
->
payload
||
msg
->
size
<=
0
)
{
...
...
@@ -1155,6 +1159,10 @@ int SrsProtocol::send_and_free_messages(SrsSharedPtrMessage** msgs, int nb_msgs,
for
(
int
i
=
0
;
i
<
nb_msgs
;
i
++
)
{
SrsSharedPtrMessage
*
msg
=
msgs
[
i
];
if
(
!
msg
)
{
continue
;
}
// check perfer cid and stream,
// when one msg stream id is ok, ignore left.
if
(
msg
->
check
(
stream_id
))
{
...
...
请
注册
或
登录
后发表评论