优化rtsp/http/rtmp服务器内存占用

This commit is contained in:
xiongziliang
2019-04-23 11:52:40 +08:00
parent bb9a02b817
commit ebd2ed2d97
3 changed files with 10 additions and 1 deletions

View File

@@ -271,7 +271,7 @@ bool RtspSession::handleReq_RECORD(const Parser &parser){
SockUtil::setNoDelay(_sock->rawFD(),false);
if(_rtpType == Rtsp::RTP_TCP){
//如果是rtsp推流服务器并且是TCP推流那么加大TCP接收缓存这样能提升接收性能
_sock->setReadBuffer(std::make_shared<BufferRaw>(128 * 1024));
_sock->setReadBuffer(std::make_shared<BufferRaw>(256 * 1024));
}
(*this) << SocketFlags(kSockFlags);
};