37 #ifndef RTCPBYEPACKET_H 39 #define RTCPBYEPACKET_H 41 #include "rtpconfig.h" 44 #ifdef RTP_SUPPORT_NETINET_IN 45 #include <netinet/in.h> 46 #endif // RTP_SUPPORT_NETINET_IN 51 class RTCPCompoundPacket;
66 int GetSSRCCount()
const;
71 uint32_t GetSSRC(
int index)
const;
74 bool HasReasonForLeaving()
const;
77 size_t GetReasonLength()
const;
80 uint8_t *GetReasonData();
94 RTCPCommonHeader *hdr = (RTCPCommonHeader *)data;
95 return (
int)(hdr->count);
102 uint32_t *ssrc = (uint32_t *)(data+
sizeof(RTCPCommonHeader)+
sizeof(uint32_t)*index);
110 if (reasonoffset == 0)
119 if (reasonoffset == 0)
121 uint8_t *reasonlen = (data+reasonoffset);
122 return (
size_t)(*reasonlen);
129 if (reasonoffset == 0)
131 uint8_t *reasonlen = (data+reasonoffset);
132 if ((*reasonlen) == 0)
134 return (data+reasonoffset+1);
139 #endif // RTCPBYEPACKET_H uint8_t * GetReasonData()
Returns the actual reason for leaving data.
Definition: rtcpbyepacket.h:125
size_t GetReasonLength() const
Returns the length of the string which describes why the source(s) left.
Definition: rtcpbyepacket.h:115
Describes an RTCP BYE packet.
Definition: rtcpbyepacket.h:54
Definition: rtpfaketransmitter.h:64
bool HasReasonForLeaving() const
Returns true if the BYE packet contains a reason for leaving.
Definition: rtcpbyepacket.h:106
int GetSSRCCount() const
Returns the number of SSRC identifiers present in this BYE packet.
Definition: rtcpbyepacket.h:89
uint32_t GetSSRC(int index) const
Returns the SSRC described by index which may have a value from 0 to GetSSRCCount()-1 (note that no c...
Definition: rtcpbyepacket.h:98
Base class for specific types of RTCP packets.
Definition: rtcppacket.h:50