37 #ifndef RTCPBYEPACKET_H
39 #define RTCPBYEPACKET_H
41 #include "rtpconfig.h"
44 #if ! (defined(WIN32) || defined (_WIN32_WCE))
45 #include <netinet/in.h>
68 uint32_t
GetSSRC(
int index)
const;
91 RTCPCommonHeader *hdr = (RTCPCommonHeader *)data;
92 return (
int)(hdr->count);
99 uint32_t *ssrc = (uint32_t *)(data+
sizeof(RTCPCommonHeader)+
sizeof(uint32_t)*index);
107 if (reasonoffset == 0)
116 if (reasonoffset == 0)
118 uint8_t *reasonlen = (data+reasonoffset);
119 return (
size_t)(*reasonlen);
126 if (reasonoffset == 0)
128 uint8_t *reasonlen = (data+reasonoffset);
129 if ((*reasonlen) == 0)
131 return (data+reasonoffset+1);
134 #endif // RTCPBYEPACKET_H
Describes an RTCP BYE packet.
Definition: rtcpbyepacket.h:51
RTCPBYEPacket(uint8_t *data, size_t datalen)
Creates an instance based on the data in data with length datalen.
Base class for specific types of RTCP packets.
Definition: rtcppacket.h:47
Represents an RTCP compound packet.
Definition: rtcpcompoundpacket.h:50
int GetSSRCCount() const
Returns the number of SSRC identifiers present in this BYE packet.
Definition: rtcpbyepacket.h:86
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:95
size_t GetReasonLength() const
Returns the length of the string which describes why the source(s) left.
Definition: rtcpbyepacket.h:112
uint8_t * GetReasonData()
Returns the actual reason for leaving data.
Definition: rtcpbyepacket.h:122
bool HasReasonForLeaving() const
Returns true if the BYE packet contains a reason for leaving.
Definition: rtcpbyepacket.h:103