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-01 22:53:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0e7836868c480aa9ed0cf82db233965876d4dd9e
0e783686
1 parent
0b631ee8
for bug #235, refine the queue recv thread.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
17 行增加
和
3 行删除
trunk/src/app/srs_app_recv_thread.cpp
trunk/src/app/srs_app_recv_thread.hpp
trunk/src/app/srs_app_recv_thread.cpp
查看文件 @
0e78368
...
...
@@ -114,13 +114,13 @@ void SrsRecvThread::on_thread_stop()
}
SrsQueueRecvThread
::
SrsQueueRecvThread
(
SrsRtmpServer
*
rtmp_sdk
,
int
timeout_ms
)
:
SrsRecvThrea
d
(
this
,
rtmp_sdk
,
timeout_ms
)
:
tr
d
(
this
,
rtmp_sdk
,
timeout_ms
)
{
}
SrsQueueRecvThread
::~
SrsQueueRecvThread
()
{
stop
();
trd
.
stop
();
// clear all messages.
std
::
vector
<
SrsMessage
*>::
iterator
it
;
...
...
@@ -131,6 +131,16 @@ SrsQueueRecvThread::~SrsQueueRecvThread()
queue
.
clear
();
}
int
SrsQueueRecvThread
::
start
()
{
return
trd
.
start
();
}
void
SrsQueueRecvThread
::
stop
()
{
trd
.
stop
();
}
bool
SrsQueueRecvThread
::
empty
()
{
return
queue
.
empty
();
...
...
trunk/src/app/srs_app_recv_thread.hpp
查看文件 @
0e78368
...
...
@@ -87,14 +87,18 @@ public:
* @see: SrsRtmpConn::playing
* @see: https://github.com/winlinvip/simple-rtmp-server/issues/217
*/
class
SrsQueueRecvThread
:
virtual
public
ISrsMessageHandler
,
virtual
public
SrsRecvThread
class
SrsQueueRecvThread
:
virtual
public
ISrsMessageHandler
{
private
:
std
::
vector
<
SrsMessage
*>
queue
;
SrsRecvThread
trd
;
public
:
SrsQueueRecvThread
(
SrsRtmpServer
*
rtmp_sdk
,
int
timeout_ms
);
virtual
~
SrsQueueRecvThread
();
public
:
virtual
int
start
();
virtual
void
stop
();
public
:
virtual
bool
empty
();
virtual
int
size
();
virtual
SrsMessage
*
pump
();
...
...
请
注册
或
登录
后发表评论