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

For #907, Wrap ST, only use in service ST.

This commit is contained in:
winlin 2017-05-30 09:05:02 +08:00
parent 54411e0768
commit 1bf99e8f3e
49 changed files with 340 additions and 513 deletions

View file

@ -39,7 +39,7 @@ ISrsAsyncCallTask::~ISrsAsyncCallTask()
SrsAsyncCallWorker::SrsAsyncCallWorker()
{
trd = NULL;
wait = st_cond_new();
wait = srs_cond_new();
}
SrsAsyncCallWorker::~SrsAsyncCallWorker()
@ -53,7 +53,7 @@ SrsAsyncCallWorker::~SrsAsyncCallWorker()
}
tasks.clear();
st_cond_destroy(wait);
srs_cond_destroy(wait);
}
int SrsAsyncCallWorker::execute(ISrsAsyncCallTask* t)
@ -61,7 +61,7 @@ int SrsAsyncCallWorker::execute(ISrsAsyncCallTask* t)
int ret = ERROR_SUCCESS;
tasks.push_back(t);
st_cond_signal(wait);
srs_cond_signal(wait);
return ret;
}
@ -80,7 +80,7 @@ int SrsAsyncCallWorker::start()
void SrsAsyncCallWorker::stop()
{
st_cond_signal(wait);
srs_cond_signal(wait);
trd->stop();
}
@ -90,7 +90,7 @@ int SrsAsyncCallWorker::cycle()
while (!trd->pull()) {
if (tasks.empty()) {
st_cond_wait(wait);
srs_cond_wait(wait);
}
std::vector<ISrsAsyncCallTask*> copy = tasks;