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

For #307, RTC RTP support padding

This commit is contained in:
winlin 2020-04-13 13:44:55 +08:00
parent 216b3bf414
commit 0bb61f7d98
2 changed files with 27 additions and 0 deletions

View file

@ -74,6 +74,7 @@ public:
int64_t get_timestamp() const { return timestamp; }
void set_ssrc(uint32_t ssrc);
uint32_t get_ssrc() const { return ssrc; }
void set_padding(bool v) { padding = v; }
};
class SrsRtpPacket2
@ -81,10 +82,16 @@ class SrsRtpPacket2
public:
SrsRtpHeader rtp_header;
ISrsEncoder* payload;
int padding;
public:
SrsRtpPacket2();
virtual ~SrsRtpPacket2();
public:
// Append size of bytes as padding.
virtual void set_padding(int size);
// interface ISrsEncoder
public:
virtual int nb_bytes();
virtual srs_error_t encode(SrsBuffer* buf);
};