通过减少线程切换提高服务器性能

This commit is contained in:
xiongziliang
2019-03-21 22:28:12 +08:00
parent 6238f5aa58
commit b78c14a2a3
9 changed files with 33 additions and 65 deletions

View File

@@ -192,7 +192,7 @@ static onceToken s_token([](){
auto path = http_root + "/" + vhost + "/" + app + "/" + stream + "_" + to_string(time(NULL)) + ".flv";
FlvRecorder::Ptr recorder(new FlvRecorder);
try{
recorder->startRecord(dynamic_pointer_cast<RtmpMediaSource>(sender.shared_from_this()),path);
recorder->startRecord(nullptr,dynamic_pointer_cast<RtmpMediaSource>(sender.shared_from_this()),path);
s_mapFlvRecorder[vhost + "/" + app + "/" + stream] = recorder;
}catch(std::exception &ex){
WarnL << ex.what();