Amazon Kinesis Webrtc C SDK
Rtcp.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TWCC_TICKS_PER_SECOND   (1000000LL / 250)
 
#define MICROSECONDS_PER_SECOND   1000000LL
 
#define MILLISECONDS_PER_SECOND   1000LL
 
#define TWCC_PACKET_LOST_TIME   ((UINT64) (-1LL))
 
#define TWCC_PACKET_UNITIALIZED_TIME   0
 
#define TWCC_ESTIMATOR_TIME_WINDOW   (1 * HUNDREDS_OF_NANOS_IN_A_SECOND)
 
#define TWCC_FB_PACKETCHUNK_SIZE   2
 
#define IS_TWCC_RUNLEN(packetChunk)   ((((packetChunk) >> 15u) & 1u) == 0)
 
#define TWCC_RUNLEN_STATUS_SYMBOL(packetChunk)   (((packetChunk) >> 13u) & 3u)
 
#define TWCC_RUNLEN_GET(packetChunk)   ((packetChunk) & 0x1fffu)
 
#define TWCC_IS_NOTRECEIVED(statusSymbol)   ((statusSymbol) == TWCC_STATUS_SYMBOL_NOTRECEIVED)
 
#define TWCC_ISRECEIVED(statusSymbol)   ((statusSymbol) == TWCC_STATUS_SYMBOL_SMALLDELTA || (statusSymbol) == TWCC_STATUS_SYMBOL_LARGEDELTA)
 
#define TWCC_RUNLEN_ISRECEIVED(packetChunk)   TWCC_ISRECEIVED(TWCC_RUNLEN_STATUS_SYMBOL(packetChunk))
 
#define TWCC_STATUSVECTOR_IS_2BIT(packetChunk)   (((packetChunk) >> 14u) & 1u)
 
#define TWCC_STATUSVECTOR_SSIZE(packetChunk)   (TWCC_STATUSVECTOR_IS_2BIT(packetChunk) ? 2u : 1u)
 
#define TWCC_STATUSVECTOR_SMASK(packetChunk)   (TWCC_STATUSVECTOR_IS_2BIT(packetChunk) ? 2u : 1u)
 
#define TWCC_STATUSVECTOR_STATUS(packetChunk, i)    (((packetChunk) >> (14u - (i) * TWCC_STATUSVECTOR_SSIZE(packetChunk))) & TWCC_STATUSVECTOR_SMASK(packetChunk))
 
#define TWCC_STATUSVECTOR_COUNT(packetChunk)   (TWCC_STATUSVECTOR_IS_2BIT(packetChunk) ? 7 : 14)
 
#define TWCC_PACKET_STATUS_COUNT(payload)   (getUnalignedInt16BigEndian((payload) + 10))
 

Enumerations

enum  TWCC_STATUS_SYMBOL { TWCC_STATUS_SYMBOL_NOTRECEIVED = 0 , TWCC_STATUS_SYMBOL_SMALLDELTA , TWCC_STATUS_SYMBOL_LARGEDELTA }
 

Functions

STATUS onRtcpPacket (PKvsPeerConnection, PBYTE, UINT32)
 
STATUS onRtcpRembPacket (PRtcpPacket, PKvsPeerConnection)
 
STATUS onRtcpPLIPacket (PRtcpPacket, PKvsPeerConnection)
 
STATUS parseRtcpTwccPacket (PRtcpPacket, PTwccManager)
 
STATUS onRtcpTwccPacket (PRtcpPacket, PKvsPeerConnection)
 
STATUS updateTwccHashTable (PTwccManager, PINT64, PUINT64, PUINT64, PUINT64, PUINT64)
 

Macro Definition Documentation

◆ IS_TWCC_RUNLEN

#define IS_TWCC_RUNLEN (   packetChunk)    ((((packetChunk) >> 15u) & 1u) == 0)

◆ MICROSECONDS_PER_SECOND

#define MICROSECONDS_PER_SECOND   1000000LL

◆ MILLISECONDS_PER_SECOND

#define MILLISECONDS_PER_SECOND   1000LL

◆ TWCC_ESTIMATOR_TIME_WINDOW

#define TWCC_ESTIMATOR_TIME_WINDOW   (1 * HUNDREDS_OF_NANOS_IN_A_SECOND)

◆ TWCC_FB_PACKETCHUNK_SIZE

#define TWCC_FB_PACKETCHUNK_SIZE   2

◆ TWCC_IS_NOTRECEIVED

#define TWCC_IS_NOTRECEIVED (   statusSymbol)    ((statusSymbol) == TWCC_STATUS_SYMBOL_NOTRECEIVED)

◆ TWCC_ISRECEIVED

#define TWCC_ISRECEIVED (   statusSymbol)    ((statusSymbol) == TWCC_STATUS_SYMBOL_SMALLDELTA || (statusSymbol) == TWCC_STATUS_SYMBOL_LARGEDELTA)

◆ TWCC_PACKET_LOST_TIME

#define TWCC_PACKET_LOST_TIME   ((UINT64) (-1LL))

◆ TWCC_PACKET_STATUS_COUNT

#define TWCC_PACKET_STATUS_COUNT (   payload)    (getUnalignedInt16BigEndian((payload) + 10))

◆ TWCC_PACKET_UNITIALIZED_TIME

#define TWCC_PACKET_UNITIALIZED_TIME   0

◆ TWCC_RUNLEN_GET

#define TWCC_RUNLEN_GET (   packetChunk)    ((packetChunk) & 0x1fffu)

◆ TWCC_RUNLEN_ISRECEIVED

#define TWCC_RUNLEN_ISRECEIVED (   packetChunk)    TWCC_ISRECEIVED(TWCC_RUNLEN_STATUS_SYMBOL(packetChunk))

◆ TWCC_RUNLEN_STATUS_SYMBOL

#define TWCC_RUNLEN_STATUS_SYMBOL (   packetChunk)    (((packetChunk) >> 13u) & 3u)

◆ TWCC_STATUSVECTOR_COUNT

#define TWCC_STATUSVECTOR_COUNT (   packetChunk)    (TWCC_STATUSVECTOR_IS_2BIT(packetChunk) ? 7 : 14)

◆ TWCC_STATUSVECTOR_IS_2BIT

#define TWCC_STATUSVECTOR_IS_2BIT (   packetChunk)    (((packetChunk) >> 14u) & 1u)

◆ TWCC_STATUSVECTOR_SMASK

#define TWCC_STATUSVECTOR_SMASK (   packetChunk)    (TWCC_STATUSVECTOR_IS_2BIT(packetChunk) ? 2u : 1u)

◆ TWCC_STATUSVECTOR_SSIZE

#define TWCC_STATUSVECTOR_SSIZE (   packetChunk)    (TWCC_STATUSVECTOR_IS_2BIT(packetChunk) ? 2u : 1u)

◆ TWCC_STATUSVECTOR_STATUS

#define TWCC_STATUSVECTOR_STATUS (   packetChunk,
 
)     (((packetChunk) >> (14u - (i) * TWCC_STATUSVECTOR_SSIZE(packetChunk))) & TWCC_STATUSVECTOR_SMASK(packetChunk))

◆ TWCC_TICKS_PER_SECOND

#define TWCC_TICKS_PER_SECOND   (1000000LL / 250)

Enumeration Type Documentation

◆ TWCC_STATUS_SYMBOL

Enumerator
TWCC_STATUS_SYMBOL_NOTRECEIVED 
TWCC_STATUS_SYMBOL_SMALLDELTA 
TWCC_STATUS_SYMBOL_LARGEDELTA 

Function Documentation

◆ onRtcpPacket()

STATUS onRtcpPacket ( PKvsPeerConnection  pKvsPeerConnection,
PBYTE  pBuff,
UINT32  buffLen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onRtcpPLIPacket()

STATUS onRtcpPLIPacket ( PRtcpPacket  pRtcpPacket,
PKvsPeerConnection  pKvsPeerConnection 
)
Here is the call graph for this function:

◆ onRtcpRembPacket()

STATUS onRtcpRembPacket ( PRtcpPacket  pRtcpPacket,
PKvsPeerConnection  pKvsPeerConnection 
)
Here is the call graph for this function:

◆ onRtcpTwccPacket()

STATUS onRtcpTwccPacket ( PRtcpPacket  pRtcpPacket,
PKvsPeerConnection  pKvsPeerConnection 
)
Here is the call graph for this function:

◆ parseRtcpTwccPacket()

STATUS parseRtcpTwccPacket ( PRtcpPacket  pRtcpPacket,
PTwccManager  pTwccManager 
)
Here is the caller graph for this function:

◆ updateTwccHashTable()

STATUS updateTwccHashTable ( PTwccManager  pTwccManager,
PINT64  duration,
PUINT64  receivedBytes,
PUINT64  receivedPackets,
PUINT64  sentBytes,
PUINT64  sentPackets 
)
Here is the caller graph for this function: