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

RTC: Fix RTCP app bug. Add is_rtcp_app API.

This commit is contained in:
winlin 2020-08-06 17:18:45 +08:00
parent e2bf5eaf47
commit 2f1e77aeaf
2 changed files with 32 additions and 4 deletions

View file

@ -51,6 +51,7 @@ enum SrsRtcpType
};
// RTCP Header, @see http://tools.ietf.org/html/rfc3550#section-6.1
// @remark The header must be 4 bytes, which align with the max field size 2B.
struct SrsRtcpHeader
{
uint16_t rc:5;
@ -84,15 +85,14 @@ public:
class SrsRtcpApp : public SrsRtcpCommon
{
private:
SrsRtcpHeader header_;
uint32_t ssrc_;
uint8_t name_[4];
uint8_t payload_[kRtcpPacketSize];
int payload_len_;
public:
SrsRtcpApp();
virtual ~SrsRtcpApp();
static bool is_rtcp_app(uint8_t *data, int nb_data);
virtual uint8_t type() const;
uint32_t get_ssrc() const;