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

For #307, zero copy for RTP audio packet

This commit is contained in:
winlin 2020-04-11 22:54:44 +08:00
parent bf62244908
commit 4b2404c203
4 changed files with 148 additions and 29 deletions

View file

@ -70,6 +70,20 @@ public:
uint32_t get_ssrc() const { return ssrc; }
};
class SrsRtpPacket2
{
public:
SrsRtpHeader rtp_header;
// @remark We only refer to the memory, user must free it.
char* payload;
int nn_payload;
public:
SrsRtpPacket2();
virtual ~SrsRtpPacket2();
public:
virtual srs_error_t encode(SrsBuffer* stream);
};
class SrsRtpSharedPacket
{
private: