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-19 09:19:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
db13c725a694554ca81a64ebf8779dbb109af873
db13c725
1 parent
61a648f1
refine #259, rename the on_dispose to wakeup. 2.0.73
显示空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
10 行增加
和
9 行删除
trunk/src/app/srs_app_recv_thread.cpp
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_recv_thread.cpp
查看文件 @
db13c72
...
...
@@ -162,7 +162,6 @@ int SrsQueueRecvThread::start()
void
SrsQueueRecvThread
::
stop
()
{
_consumer
=
NULL
;
trd
.
stop
();
}
...
...
@@ -208,7 +207,7 @@ int SrsQueueRecvThread::handle(SrsCommonMessage* msg)
queue
.
push_back
(
msg
);
#ifdef SRS_PERF_QUEUE_COND_WAIT
if
(
_consumer
)
{
_consumer
->
on_dispose
();
_consumer
->
wakeup
();
}
#endif
return
ERROR_SUCCESS
;
...
...
@@ -219,7 +218,7 @@ void SrsQueueRecvThread::on_recv_error(int ret)
recv_error_code
=
ret
;
#ifdef SRS_PERF_QUEUE_COND_WAIT
if
(
_consumer
)
{
_consumer
->
on_dispose
();
_consumer
->
wakeup
();
}
#endif
}
...
...
trunk/src/app/srs_app_rtmp_conn.cpp
查看文件 @
db13c72
...
...
@@ -581,6 +581,7 @@ int SrsRtmpConn::do_playing(SrsSource* source, SrsQueueRecvThread* trd)
srs_assert
(
consumer
!=
NULL
);
SrsAutoFree
(
SrsConsumer
,
consumer
);
trd
->
set_consumer
(
consumer
);
srs_verbose
(
"consumer created success."
);
// initialize other components
...
...
@@ -595,7 +596,6 @@ int SrsRtmpConn::do_playing(SrsSource* source, SrsQueueRecvThread* trd)
// when mw_sleep changed, resize the socket send buffer.
mw_enabled
=
true
;
change_mw_sleep
(
_srs_config
->
get_mw_sleep_ms
(
req
->
vhost
));
trd
->
set_consumer
(
consumer
);
while
(
true
)
{
// to use isolate thread to recv, can improve about 33% performance.
...
...
trunk/src/app/srs_app_source.cpp
查看文件 @
db13c72
...
...
@@ -516,7 +516,7 @@ void SrsConsumer::wait(int nb_msgs, int duration)
st_cond_wait
(
mw_wait
);
}
void
SrsConsumer
::
on_dispose
()
void
SrsConsumer
::
wakeup
()
{
if
(
mw_waiting
)
{
st_cond_signal
(
mw_wait
);
...
...
@@ -1635,7 +1635,7 @@ void SrsSource::on_unpublish()
_source_id
=
-
1
;
}
int
SrsSource
::
create_consumer
(
SrsConsumer
*&
consumer
)
int
SrsSource
::
create_consumer
(
SrsConsumer
*&
consumer
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
trunk/src/app/srs_app_source.hpp
查看文件 @
db13c72
...
...
@@ -247,9 +247,11 @@ public:
*/
virtual
void
wait
(
int
nb_msgs
,
int
duration
);
/**
* when waiting, a message incomming, we rouse it
* when the consumer(for player) got msg from recv thread,
* it must be processed for maybe it's a close msg, so the cond
* wait must be wakeup.
*/
virtual
void
on_dispose
();
virtual
void
wakeup
();
#endif
/**
* when client send the pause message.
...
...
trunk/src/core/srs_core.hpp
查看文件 @
db13c72
...
...
@@ -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
2
#define VERSION_REVISION 7
3
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
#define RTMP_SIG_SRS_ROLE "origin/edge server"
...
...
请
注册
或
登录
后发表评论