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

Go to the source code of this file.

Classes

struct  __RtpPacketHeader
 
struct  __Payloads
 
struct  __RtpPacket
 

Macros

#define MIN_HEADER_LENGTH   12
 
#define VERSION_SHIFT   6
 
#define VERSION_MASK   0x3
 
#define SSRC_OFFSET   8
 
#define CSRC_LENGTH   4
 
#define RTP_HEADER_VERSION   2
 
#define RTP_HEADER_LEN(pRtpPacket)    (12 + (pRtpPacket)->header.csrcCount * CSRC_LENGTH + ((pRtpPacket)->header.extension ? 4 + (pRtpPacket)->header.extensionLength : 0))
 
#define RTP_GET_RAW_PACKET_SIZE(pRtpPacket)   (RTP_HEADER_LEN(pRtpPacket) + ((pRtpPacket)->payloadLength))
 
#define GET_UINT16_SEQ_NUM(seqIndex)   ((UINT16) ((seqIndex) % (MAX_UINT16 + 1)))
 
#define TWCC_EXT_PROFILE   0xBEDE
 
#define TWCC_PAYLOAD(extId, sequenceNum)   htonl((((extId) & 0xfu) << 28u) | (1u << 24u) | ((UINT32) (sequenceNum) << 8u))
 
#define TWCC_SEQNUM(extPayload)   ((UINT16) getUnalignedInt16BigEndian(extPayload + 1))
 

Typedefs

typedef STATUS(* DepayRtpPayloadFunc) (PBYTE, UINT32, PBYTE, PUINT32, PBOOL)
 
typedef struct __RtpPacketHeader RtpPacketHeader
 
typedef RtpPacketHeaderPRtpPacketHeader
 
typedef struct __Payloads PayloadArray
 
typedef PayloadArrayPPayloadArray
 
typedef struct __RtpPacket RtpPacket
 
typedef RtpPacketPRtpPacket
 

Functions

STATUS createRtpPacket (UINT8, BOOL, BOOL, UINT8, BOOL, UINT8, UINT16, UINT32, UINT32, PUINT32, UINT16, UINT32, PBYTE, PBYTE, UINT32, PRtpPacket *)
 
STATUS setRtpPacket (UINT8, BOOL, BOOL, UINT8, BOOL, UINT8, UINT16, UINT32, UINT32, PUINT32, UINT16, UINT32, PBYTE, PBYTE, UINT32, PRtpPacket)
 
STATUS freeRtpPacket (PRtpPacket *)
 
STATUS createRtpPacketFromBytes (PBYTE, UINT32, PRtpPacket *)
 
STATUS constructRetransmitRtpPacketFromBytes (PBYTE, UINT32, UINT16, UINT8, UINT32, PRtpPacket *)
 
STATUS setRtpPacketFromBytes (PBYTE, UINT32, PRtpPacket)
 
STATUS createBytesFromRtpPacket (PRtpPacket, PBYTE, PUINT32)
 
STATUS setBytesFromRtpPacket (PRtpPacket, PBYTE, UINT32)
 
STATUS constructRtpPackets (PPayloadArray, UINT8, UINT16, UINT32, UINT32, PRtpPacket, UINT32)
 

Macro Definition Documentation

◆ CSRC_LENGTH

#define CSRC_LENGTH   4

◆ GET_UINT16_SEQ_NUM

#define GET_UINT16_SEQ_NUM (   seqIndex)    ((UINT16) ((seqIndex) % (MAX_UINT16 + 1)))

◆ MIN_HEADER_LENGTH

#define MIN_HEADER_LENGTH   12

◆ RTP_GET_RAW_PACKET_SIZE

#define RTP_GET_RAW_PACKET_SIZE (   pRtpPacket)    (RTP_HEADER_LEN(pRtpPacket) + ((pRtpPacket)->payloadLength))

◆ RTP_HEADER_LEN

#define RTP_HEADER_LEN (   pRtpPacket)     (12 + (pRtpPacket)->header.csrcCount * CSRC_LENGTH + ((pRtpPacket)->header.extension ? 4 + (pRtpPacket)->header.extensionLength : 0))

◆ RTP_HEADER_VERSION

#define RTP_HEADER_VERSION   2

◆ SSRC_OFFSET

#define SSRC_OFFSET   8

◆ TWCC_EXT_PROFILE

#define TWCC_EXT_PROFILE   0xBEDE

◆ TWCC_PAYLOAD

#define TWCC_PAYLOAD (   extId,
  sequenceNum 
)    htonl((((extId) & 0xfu) << 28u) | (1u << 24u) | ((UINT32) (sequenceNum) << 8u))

◆ TWCC_SEQNUM

#define TWCC_SEQNUM (   extPayload)    ((UINT16) getUnalignedInt16BigEndian(extPayload + 1))

◆ VERSION_MASK

#define VERSION_MASK   0x3

◆ VERSION_SHIFT

#define VERSION_SHIFT   6

Typedef Documentation

◆ DepayRtpPayloadFunc

typedef STATUS(* DepayRtpPayloadFunc) (PBYTE, UINT32, PBYTE, PUINT32, PBOOL)

◆ PayloadArray

typedef struct __Payloads PayloadArray

◆ PPayloadArray

◆ PRtpPacket

◆ PRtpPacketHeader

◆ RtpPacket

typedef struct __RtpPacket RtpPacket

◆ RtpPacketHeader

Function Documentation

◆ constructRetransmitRtpPacketFromBytes()

STATUS constructRetransmitRtpPacketFromBytes ( PBYTE  rawPacket,
UINT32  packetLength,
UINT16  sequenceNum,
UINT8  payloadType,
UINT32  ssrc,
PRtpPacket ppRtpPacket 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ constructRtpPackets()

STATUS constructRtpPackets ( PPayloadArray  pPayloadArray,
UINT8  payloadType,
UINT16  startSequenceNumber,
UINT32  timestamp,
UINT32  ssrc,
PRtpPacket  pPackets,
UINT32  packetCount 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createBytesFromRtpPacket()

STATUS createBytesFromRtpPacket ( PRtpPacket  pRtpPacket,
PBYTE  pRawPacket,
PUINT32  pPacketLength 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createRtpPacket()

STATUS createRtpPacket ( UINT8  version,
BOOL  padding,
BOOL  extension,
UINT8  csrcCount,
BOOL  marker,
UINT8  payloadType,
UINT16  sequenceNumber,
UINT32  timestamp,
UINT32  ssrc,
PUINT32  csrcArray,
UINT16  extensionProfile,
UINT32  extensionLength,
PBYTE  extensionPayload,
PBYTE  payload,
UINT32  payloadLength,
PRtpPacket ppRtpPacket 
)
Here is the call graph for this function:

◆ createRtpPacketFromBytes()

STATUS createRtpPacketFromBytes ( PBYTE  rawPacket,
UINT32  packetLength,
PRtpPacket ppRtpPacket 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeRtpPacket()

STATUS freeRtpPacket ( PRtpPacket ppRtpPacket)
Here is the caller graph for this function:

◆ setBytesFromRtpPacket()

STATUS setBytesFromRtpPacket ( PRtpPacket  pRtpPacket,
PBYTE  pRawPacket,
UINT32  packetLength 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRtpPacket()

STATUS setRtpPacket ( UINT8  version,
BOOL  padding,
BOOL  extension,
UINT8  csrcCount,
BOOL  marker,
UINT8  payloadType,
UINT16  sequenceNumber,
UINT32  timestamp,
UINT32  ssrc,
PUINT32  csrcArray,
UINT16  extensionProfile,
UINT32  extensionLength,
PBYTE  extensionPayload,
PBYTE  payload,
UINT32  payloadLength,
PRtpPacket  pRtpPacket 
)
Here is the caller graph for this function:

◆ setRtpPacketFromBytes()

STATUS setRtpPacketFromBytes ( PBYTE  rawPacket,
UINT32  packetLength,
PRtpPacket  pRtpPacket 
)
Here is the call graph for this function:
Here is the caller graph for this function: