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-16 09:26:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0d6b91039d408328caab31a1077d56a809b6bebc
0d6b9103
1 parent
bacbec66
fix #257, refine latency, send when got one+ msgs, 2.0.72
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
16 行增加
和
13 行删除
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/app/srs_app_source.cpp
trunk/src/app/srs_app_source.hpp
trunk/src/core/srs_core.hpp
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
0d6b910
...
...
@@ -629,7 +629,14 @@ int SrsRtmpConn::do_playing(SrsSource* source, SrsQueueRecvThread* trd)
// wait for message to incoming.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/251
consumer
->
wait
(
SRS_PERF_MW_MIN_MSGS
,
mw_sleep
,
realtime
);
// @see https://github.com/winlinvip/simple-rtmp-server/issues/257
if
(
realtime
)
{
// for realtime, min required msgs is 0, send when got one+ msgs.
consumer
->
wait
(
0
,
mw_sleep
);
}
else
{
// for no-realtime, got some msgs then send.
consumer
->
wait
(
SRS_PERF_MW_MIN_MSGS
,
mw_sleep
);
}
// for send wait time debug
srs_verbose
(
"send thread now=%"
PRId64
"us wakeup"
,
srs_update_system_time_ms
());
...
...
trunk/src/app/srs_app_source.cpp
查看文件 @
0d6b910
...
...
@@ -452,6 +452,9 @@ int SrsConsumer::enqueue(SrsSharedPtrMessage* __msg, bool atc, int tba, int tbv,
}
#ifdef SRS_PERF_QUEUE_COND_WAIT
srs_verbose
(
"enqueue msg, time=%"
PRId64
", size=%d, duration=%d, waiting=%d, min_msg=%d"
,
msg
->
timestamp
,
msg
->
size
,
queue
->
duration
(),
mw_waiting
,
mw_min_msgs
);
// fire the mw when msgs is enough.
if
(
mw_waiting
)
{
int
duration_ms
=
queue
->
duration
();
...
...
@@ -493,7 +496,7 @@ int SrsConsumer::dump_packets(SrsMessageArray* msgs, int& count)
}
#ifdef SRS_PERF_QUEUE_COND_WAIT
void
SrsConsumer
::
wait
(
int
nb_msgs
,
int
duration
,
bool
realtime
)
void
SrsConsumer
::
wait
(
int
nb_msgs
,
int
duration
)
{
mw_min_msgs
=
nb_msgs
;
mw_duration
=
duration
;
...
...
@@ -509,14 +512,8 @@ void SrsConsumer::wait(int nb_msgs, int duration, bool realtime)
// the enqueue will notify this cond.
mw_waiting
=
true
;
// use timeout wait for realtime mode.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/257
if
(
realtime
)
{
st_cond_timedwait
(
mw_wait
,
duration
*
1000
);
}
else
{
// use cond block wait for high performance mode.
st_cond_wait
(
mw_wait
);
}
// use cond block wait for high performance mode.
st_cond_wait
(
mw_wait
);
}
#endif
...
...
trunk/src/app/srs_app_source.hpp
查看文件 @
0d6b910
...
...
@@ -244,9 +244,8 @@ public:
* wait for messages incomming, atleast nb_msgs and in duration.
* @param nb_msgs the messages count to wait.
* @param duration the messgae duration to wait.
* @param realtime whether use realtime mode.
*/
virtual
void
wait
(
int
nb_msgs
,
int
duration
,
bool
realtime
);
virtual
void
wait
(
int
nb_msgs
,
int
duration
);
#endif
/**
* when client send the pause message.
...
...
trunk/src/core/srs_core.hpp
查看文件 @
0d6b910
...
...
@@ -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 7
1
#define VERSION_REVISION 7
2
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
#define RTMP_SIG_SRS_ROLE "origin/edge server"
...
...
请
注册
或
登录
后发表评论