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

For #906, #902, replace the endless thread with coroutine

This commit is contained in:
winlin 2017-05-29 17:56:26 +08:00
parent fc380fe48d
commit 44f542f77f
7 changed files with 28 additions and 151 deletions

View file

@ -38,7 +38,7 @@ class SrsTsTransmuxer;
* for example, the audio stream cache to make android(weixin) happy.
* we start a thread to shrink the queue.
*/
class SrsBufferCache : public ISrsEndlessThreadHandler
class SrsBufferCache : public ISrsCoroutineHandler
{
private:
double fast_cache;
@ -46,7 +46,7 @@ private:
SrsMessageQueue* queue;
SrsSource* source;
SrsRequest* req;
SrsEndlessThread* pthread;
SrsCoroutine* trd;
public:
SrsBufferCache(SrsSource* s, SrsRequest* r);
virtual ~SrsBufferCache();