1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for bug #235, refine the queue recv thread.

This commit is contained in:
winlin 2014-12-01 22:53:03 +08:00
parent 0b631ee80d
commit 0e7836868c
2 changed files with 17 additions and 3 deletions

View file

@ -114,13 +114,13 @@ void SrsRecvThread::on_thread_stop()
}
SrsQueueRecvThread::SrsQueueRecvThread(SrsRtmpServer* rtmp_sdk, int timeout_ms)
: SrsRecvThread(this, rtmp_sdk, timeout_ms)
: trd(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();