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

RTC: Use shared message for RTP packet

This commit is contained in:
winlin 2020-05-14 14:26:19 +08:00
parent 4e1935f678
commit f794a7d3a7
8 changed files with 195 additions and 59 deletions

View file

@ -341,6 +341,9 @@ public:
// @remark user should never free the payload.
// @param pheader, the header to copy to the message. NULL to ignore.
virtual srs_error_t create(SrsMessageHeader* pheader, char* payload, int size);
// Create shared ptr message from RAW payload.
// @remark Note that the header is set to zero.
virtual void wrap(char* payload, int size);
// Get current reference count.
// when this object created, count set to 0.
// if copy() this object, count increase 1.