大幅优化性能

This commit is contained in:
xiongziliang
2018-09-14 18:04:41 +08:00
parent 237a7d71f3
commit 492d083f5b
12 changed files with 60 additions and 35 deletions

View File

@@ -119,7 +119,7 @@ void RtmpPlayer::onConnect(const SockException &err){
strongSelf->_onPlayResult(SockException(Err_timeout,"play rtmp timeout"));
strongSelf->teardown();
return false;
}));
},getExecutor()));
startClientSession([weakSelf](){
auto strongSelf=weakSelf.lock();
if(!strongSelf) {
@@ -233,7 +233,7 @@ inline void RtmpPlayer::send_pause(bool bPause) {
uint32_t timeStamp = ::time(NULL);
strongSelf->sendUserControl(CONTROL_PING_REQUEST, timeStamp);
return true;
}));
},getExecutor()));
}
}