37 #ifndef CCXX_RTP_RTCPPKT_H_
38 #define CCXX_RTP_RTCPPKT_H_
190 {
return (ntohl(ssrc)); }
216 unsigned char data[1];
252 #if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
253 unsigned char version:2;
255 unsigned char padding:1;
256 unsigned char block_count:5;
258 unsigned char block_count:5;
260 unsigned char padding:1;
261 unsigned char version:2;
300 {
return ((ntohs(fh.length) + 1) << 2); }
307 {
return (ntohl(info.RR.ssrc)); }
330 enum { defaultPathMTU = 1500 };
348 checkCompoundRTCPHeader(
size_t len);
377 { memcpy(&receiverInfo,&ri,
394 {
return receiverInfo.fractionLost; }
398 {
return ( ((uint32)ntohs(receiverInfo.lostLSW)) +
399 (((uint32)receiverInfo.lostMSB) << 16) ); }
403 {
return ntohl(receiverInfo.highestSeqNum); }
413 {
return ntohl(receiverInfo.jitter); }
422 {
return (uint16)((ntohl(receiverInfo.lsr) & 0xFFFF0000) >> 16); }
431 {
return (uint16)(ntohl(receiverInfo.lsr) & 0xFFFF); }
441 {
return ntohl(receiverInfo.dlsr); }
457 { memcpy(&senderInfo,&si,
474 {
return ntohl(senderInfo.NTPMSW); }
482 {
return ntohl(senderInfo.NTPLSW); }
486 {
return ntohl(senderInfo.RTPTimestamp); }
493 {
return ntohl(senderInfo.packetCount); }
497 {
return ntohl(senderInfo.octetCount); }
528 #endif // ndef CCXX_RTP_RTCPPKT_H_
Struct for a receiver info block in a SR (sender report) or an RR (receiver report) RTCP packet...
uint32 lsr
last sender report timestamp.
uint32 getNTPTimestampFrac() const
Get fractional part of the NTP timestamp of this packet.
uint32 getNTPTimestampInt() const
Get integer part of the NTP timestamp of this packet.
RTCPReceiverInfo(RTCPCompoundHandler::ReceiverInfo &si)
unsigned char * rtcpSendBuffer
low level structs and RTCP packet parsing and building methods.
ReceiverInfo rinfo
info about the source.
uint32 highestSeqNum
highest sequence number.
uint32 ssrc
ssrc identifier of source leaving.
uint32 jitter
arrival jitter.
uint32 octetCount
cumulative octet counter.
Sender block information of SR RTCP reports.
Canonical end-point identifier.
uint16 getLastSRNTPTimestampFrac() const
Get the fractional part of the NTP timestamp of the last SR RTCP packet received from the source this...
Comment usually reporting state.
static const uint16 RTCP_VALID_VALUE
uint32 getLength() const
Get the packet length specified in its header, in octets and in host order.
void setPathMTU(uint16 mtu)
RTCPReceiverInfo(void *ri)
uint32 dlsr
delay since last sender report.
Fixed RTCP packet header.
uint16 getLastSRNTPTimestampInt() const
Get the integer part of the NTP timestamp of the last SR RTCP packet received from the source this re...
Phone number of the user.
uint16 lostLSW
cumulative lost two LSB.
Struct for BYE (leaving session) RTCP packets.
uint8 lostMSB
cumulative lost MSB of 3 octets.
uint8 len
item len in octets.
uint8 type
type of RTCP packet.
uint32 ssrc
SSRC identifer from sender.
uint32 NTPMSW
NTP timestamp higher octets.
uint32 ssrc
ssrc identifier of source.
uint32 getOctetCount() const
Struct for the sender info block in a SR (sender report) RTCP packet.
Struct for SR (sender report) RTCP packets.
uint8 length
[optional] length of reason.
uint16 blp
Bitmask of following Lost Packets.
uint8 type
item identifier.
SenderInfo sinfo
actual sender info.
SDESItem item
SDES item from sender.
Struct for a chunk of items in a SDES RTCP packet.
Struct representing general RTCP packet headers as they are sent through the network.
uint32 timevalIntervalTo65536(timeval &t)
Convert a time interval, expressed as a timeval, into a 32-bit time interval expressed in units of 1/...
uint32 getPacketCount() const
Get count of sent data packets.
RTCPCompoundHandler::SenderInfo senderInfo
Struct for Full Intra-frame Request (FIR) RTCP packet.
Personal NAME of the user.
uint32 RTPTimestamp
RTP timestamp.
uint16 fsn
First Sequence Number lost.
raw structure of the source and every receiver report in an SR or RR RTCP packet. ...
unsigned char * rtcpRecvBuffer
uint32 ssrc
source identifier.
uint32 getSSRC() const
Get the SSRC identifier specified in the packet header, in host order.
uint16 length
number of 32-bit words in the packet (minus one).
Struct for an item description of a SDES packet.
Base elements for RTP stacks: constants, types and global functions.
uint32 getRTPTimestamp() const
RTCPSenderInfo(RTCPCompoundHandler::SenderInfo &si)
Struct for Negative ACKnowledgements (NACK) RTCP packet.
uint8 fractionLost
packet fraction lost.
Report block information of SR/RR RTCP reports.
timeval NTP2Timeval(uint32 msw, uint32 lsw)
Convert a NTP timestamp, expressed as two 32-bit long words, into a timeval value.
uint32 getDelayLastSR() const
Get the delay between the last SR packet received and the transmission of this report.
RTCPCompoundHandler::ReceiverInfo receiverInfo
static const uint16 RTCP_VALID_MASK
uint32 ssrc
ssrc identifier of source.
uint32 ssrc
source identifier.
uint32 getCumulativePacketLost() const
Struct for APP (application specific) RTCP packets.
uint8 getFractionLost() const
Get fraction of lost packets, as a number between 0 and 255.
uint32 getJitter() const
Get the statistical variance of the RTP data packets interarrival time.
RTCPFixedHeader fh
Fixed RTCP header.
uint32 packetCount
cumulative packet counter.
uint32 ssrc
ssrc identifier of source.
uint32 NTPLSW
NTP timestamp lower octets.
uint32 getExtendedSeqNum() const
EMAIL address of the user.
SDESItemType
SDES items that may be carried in a Source DEScription RTCP packet.
Struct for the data contained in a receiver info block.
Location where the user is.
uint32 ssrc
source identifier.