37 #ifndef RTCPRRPACKET_H 39 #define RTCPRRPACKET_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 uint32_t GetSenderSSRC()
const;
69 int GetReceptionReportCount()
const;
75 uint32_t GetSSRC(
int index)
const;
81 uint8_t GetFractionLost(
int index)
const;
87 int32_t GetLostPacketCount(
int index)
const;
93 uint32_t GetExtendedHighestSequenceNumber(
int index)
const;
99 uint32_t GetJitter(
int index)
const;
105 uint32_t GetLSR(
int index)
const;
111 uint32_t GetDLSR(
int index)
const;
118 RTCPReceiverReport *GotoReport(
int index)
const;
126 uint32_t *ssrcptr = (uint32_t *)(data+
sizeof(RTCPCommonHeader));
127 return ntohl(*ssrcptr);
133 RTCPCommonHeader *hdr = (RTCPCommonHeader *)data;
134 return ((
int)hdr->count);
137 inline RTCPReceiverReport *RTCPRRPacket::GotoReport(
int index)
const 139 RTCPReceiverReport *r = (RTCPReceiverReport *)(data+
sizeof(RTCPCommonHeader)+
sizeof(uint32_t)+index*
sizeof(RTCPReceiverReport));
147 RTCPReceiverReport *r = GotoReport(index);
148 return ntohl(r->ssrc);
155 RTCPReceiverReport *r = GotoReport(index);
156 return r->fractionlost;
163 RTCPReceiverReport *r = GotoReport(index);
164 uint32_t count = ((uint32_t)r->packetslost[2])|(((uint32_t)r->packetslost[1])<<8)|(((uint32_t)r->packetslost[0])<<16);
165 if ((count&0x00800000) != 0)
167 int32_t *count2 = (int32_t *)(&count);
175 RTCPReceiverReport *r = GotoReport(index);
176 return ntohl(r->exthighseqnr);
183 RTCPReceiverReport *r = GotoReport(index);
184 return ntohl(r->jitter);
191 RTCPReceiverReport *r = GotoReport(index);
192 return ntohl(r->lsr);
199 RTCPReceiverReport *r = GotoReport(index);
200 return ntohl(r->dlsr);
205 #endif // RTCPRRPACKET_H int GetReceptionReportCount() const
Returns the number of reception report blocks present in this packet.
Definition: rtcprrpacket.h:129
uint32_t GetExtendedHighestSequenceNumber(int index) const
Returns the extended highest sequence number of the reception report block described by index which m...
Definition: rtcprrpacket.h:171
Describes an RTCP receiver report packet.
Definition: rtcprrpacket.h:54
uint32_t GetSSRC(int index) const
Returns the SSRC of the reception report block described by index which may have a value from 0 to Ge...
Definition: rtcprrpacket.h:143
uint32_t GetJitter(int index) const
Returns the jitter field of the reception report block described by index which may have a value from...
Definition: rtcprrpacket.h:179
Definition: rtpfaketransmitter.h:64
uint32_t GetLSR(int index) const
Returns the LSR field of the reception report block described by index which may have a value from 0 ...
Definition: rtcprrpacket.h:187
uint32_t GetDLSR(int index) const
Returns the DLSR field of the reception report block described by index which may have a value from 0...
Definition: rtcprrpacket.h:195
int32_t GetLostPacketCount(int index) const
Returns the number of lost packets in the reception report block described by index which may have a ...
Definition: rtcprrpacket.h:159
uint32_t GetSenderSSRC() const
Returns the SSRC of the participant who sent this packet.
Definition: rtcprrpacket.h:121
uint8_t GetFractionLost(int index) const
Returns the `fraction lost' field of the reception report described by index which may have a value f...
Definition: rtcprrpacket.h:151
Base class for specific types of RTCP packets.
Definition: rtcppacket.h:50