避免内存拷贝,大幅提高rtmp服务器的性能

This commit is contained in:
xiongziliang
2019-03-22 14:37:03 +08:00
parent 2b4d8a123d
commit e445c7e14c
5 changed files with 87 additions and 56 deletions

View File

@@ -74,6 +74,7 @@ protected:
void sendRequest(int iCmd, const string &str);
void sendResponse(int iType, const string &str);
void sendRtmp(uint8_t ui8Type, uint32_t ui32StreamId, const std::string &strBuf, uint32_t ui32TimeStamp, int iChunkID);
void sendRtmp(uint8_t ui8Type, uint32_t ui32StreamId, const Buffer::Ptr &buffer, uint32_t ui32TimeStamp, int iChunkID);
protected:
int _iReqID = 0;
uint32_t _ui32StreamId = STREAM_CONTROL;