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

refine code, rename the sync call to common class.

This commit is contained in:
winlin 2015-05-23 07:57:45 +08:00
parent 0bb90145ba
commit 2f0ef87d6d
6 changed files with 43 additions and 41 deletions

View file

@ -286,7 +286,7 @@ SrsHlsMuxer::SrsHlsMuxer()
acodec = SrsCodecAudioReserved1;
should_write_cache = false;
should_write_file = true;
async = new SrsDvrAsyncCallThread();
async = new SrsAsyncCallWorker();
context = new SrsTsContext();
}
@ -669,7 +669,7 @@ int SrsHlsMuxer::segment_close(string log_desc)
segments.push_back(current);
// use async to call the http hooks, for it will cause thread switch.
if ((ret = async->call(new SrsDvrAsyncCallOnHls(req,
if ((ret = async->execute(new SrsDvrAsyncCallOnHls(req,
current->full_path, current->uri, m3u8, m3u8_url,
current->sequence_no, current->duration))) != ERROR_SUCCESS)
{
@ -677,7 +677,7 @@ int SrsHlsMuxer::segment_close(string log_desc)
}
// use async to call the http hooks, for it will cause thread switch.
if ((ret = async->call(new SrsDvrAsyncCallOnHlsNotify(req, current->uri))) != ERROR_SUCCESS) {
if ((ret = async->execute(new SrsDvrAsyncCallOnHlsNotify(req, current->uri))) != ERROR_SUCCESS) {
return ret;
}