37 #ifndef RTCPBYEPACKET_H
39 #define RTCPBYEPACKET_H
41 #include "rtpconfig.h"
44 #if ! (defined(WIN32) || defined (_WIN32_WCE))
45 #include <netinet/in.h>
51 class RTCPCompoundPacket;
71 uint32_t
GetSSRC(
int index)
const;
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
RTCPBYEPacket(uint8_t *data, size_t datalen)
Creates an instance based on the data in data with length datalen.
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