38 #ifndef CCXX_RTP_RTCPPKT_H_
39 #define CCXX_RTP_RTCPPKT_H_
43 #ifdef CCXX_NAMESPACES
193 {
return (ntohl(ssrc)); }
219 unsigned char data[1];
255 #if __BYTE_ORDER == __BIG_ENDIAN
256 unsigned char version:2;
258 unsigned char padding:1;
259 unsigned char block_count:5;
261 unsigned char block_count:5;
263 unsigned char padding:1;
264 unsigned char version:2;
303 {
return ((ntohs(fh.length) + 1) << 2); }
310 {
return (ntohl(
info.RR.ssrc)); }
333 enum { defaultPathMTU = 1500 };
351 checkCompoundRTCPHeader(
size_t len);
380 { memcpy(&receiverInfo,&ri,
397 {
return receiverInfo.fractionLost; }
401 {
return ( ((uint32)ntohs(receiverInfo.lostLSW)) +
402 (((uint32)receiverInfo.lostMSB) << 16) ); }
406 {
return ntohl(receiverInfo.highestSeqNum); }
416 {
return ntohl(receiverInfo.jitter); }
425 {
return (uint16)((ntohl(receiverInfo.lsr) & 0xFFFF0000) >> 16); }
434 {
return (uint16)(ntohl(receiverInfo.lsr) & 0xFFFF); }
444 {
return ntohl(receiverInfo.dlsr); }
460 { memcpy(&senderInfo,&si,
477 {
return ntohl(senderInfo.NTPMSW); }
485 {
return ntohl(senderInfo.NTPLSW); }
489 {
return ntohl(senderInfo.RTPTimestamp); }
496 {
return ntohl(senderInfo.packetCount); }
500 {
return ntohl(senderInfo.octetCount); }
529 #ifdef CCXX_NAMESPACES
533 #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.
static const uint16 RTCP_VALID_MASK
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.
__EXPORT AppLog & info(AppLog &sl)
Manipulator for info level.
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
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.