4 #ifndef __KINESIS_VIDEO_WEBRTC_CLIENT_RTP_RTPPACKET_H
5 #define __KINESIS_VIDEO_WEBRTC_CLIENT_RTP_RTPPACKET_H
13 #define MIN_HEADER_LENGTH 12
14 #define VERSION_SHIFT 6
15 #define VERSION_MASK 0x3
16 #define PADDING_SHIFT 5
17 #define PADDING_MASK 0x1
18 #define EXTENSION_SHIFT 4
19 #define EXTENSION_MASK 0x1
20 #define CSRC_COUNT_MASK 0xF
21 #define MARKER_SHIFT 7
22 #define MARKER_MASK 0x1
23 #define PAYLOAD_TYPE_MASK 0x7F
24 #define SEQ_NUMBER_OFFSET 2
25 #define TIMESTAMP_OFFSET 4
27 #define CSRC_OFFSET 12
30 #define RTP_HEADER_LEN(pRtpPacket) \
31 (12 + (pRtpPacket)->header.csrcCount * CSRC_LENGTH + ((pRtpPacket)->header.extension ? 4 + (pRtpPacket)->header.extensionLength : 0))
33 #define RTP_GET_RAW_PACKET_SIZE(pRtpPacket) (RTP_HEADER_LEN(pRtpPacket) + ((pRtpPacket)->payloadLength))
35 #define GET_UINT16_SEQ_NUM(seqIndex) ((UINT16) ((seqIndex) % (MAX_UINT16 + 1)))
48 #define TWCC_EXT_PROFILE 0xBEDE
49 #define TWCC_PAYLOAD(extId, sequenceNum) htonl((((extId) & 0xfu) << 28u) | (1u << 24u) | ((UINT32) (sequenceNum) << 8u))
50 #define TWCC_SEQNUM(extPayload) ((UINT16) getUnalignedInt16BigEndian(extPayload + 1))
112 STATUS
createRtpPacket(UINT8, BOOL, BOOL, UINT8, BOOL, UINT8, UINT16, UINT32, UINT32, PUINT32, UINT16, UINT32, PBYTE, PBYTE, UINT32,
PRtpPacket*);
113 STATUS
setRtpPacket(UINT8, BOOL, BOOL, UINT8, BOOL, UINT8, UINT16, UINT32, UINT32, PUINT32, UINT16, UINT32, PBYTE, PBYTE, UINT32,
PRtpPacket);
PayloadArray * PPayloadArray
Definition: RtpPacket.h:96
RtpPacket * PRtpPacket
Definition: RtpPacket.h:110
STATUS(* DepayRtpPayloadFunc)(PBYTE, UINT32, PBYTE, PUINT32, PBOOL)
Definition: RtpPacket.h:52
STATUS createBytesFromRtpPacket(PRtpPacket, PBYTE, PUINT32)
Definition: RtpPacket.c:216
STATUS setBytesFromRtpPacket(PRtpPacket, PBYTE, UINT32)
Definition: RtpPacket.c:244
STATUS createRtpPacket(UINT8, BOOL, BOOL, UINT8, BOOL, UINT8, UINT16, UINT32, UINT32, PUINT32, UINT16, UINT32, PBYTE, PBYTE, UINT32, PRtpPacket *)
Definition: RtpPacket.c:5
STATUS freeRtpPacket(PRtpPacket *)
Definition: RtpPacket.c:66
STATUS setRtpPacket(UINT8, BOOL, BOOL, UINT8, BOOL, UINT8, UINT16, UINT32, UINT32, PUINT32, UINT16, UINT32, PBYTE, PBYTE, UINT32, PRtpPacket)
Definition: RtpPacket.c:31
STATUS constructRtpPackets(PPayloadArray, UINT8, UINT16, UINT32, UINT32, PRtpPacket, UINT32)
Definition: RtpPacket.c:325
STATUS constructRetransmitRtpPacketFromBytes(PBYTE, UINT32, UINT16, UINT8, UINT32, PRtpPacket *)
Definition: RtpPacket.c:116
STATUS setRtpPacketFromBytes(PBYTE, UINT32, PRtpPacket)
Definition: RtpPacket.c:160
RtpPacketHeader * PRtpPacketHeader
Definition: RtpPacket.h:85
STATUS createRtpPacketFromBytes(PBYTE, UINT32, PRtpPacket *)
Definition: RtpPacket.c:87
Definition: RtpPacket.h:87
UINT32 payloadLength
Definition: RtpPacket.h:89
UINT32 maxPayloadSubLenSize
Definition: RtpPacket.h:93
UINT32 payloadSubLenSize
Definition: RtpPacket.h:92
UINT32 maxPayloadLength
Definition: RtpPacket.h:90
PBYTE payloadBuffer
Definition: RtpPacket.h:88
PUINT32 payloadSubLength
Definition: RtpPacket.h:91
Definition: RtpPacket.h:99
PBYTE payload
Definition: RtpPacket.h:101
PBYTE pRawPacket
Definition: RtpPacket.h:103
UINT32 rawPacketLength
Definition: RtpPacket.h:104
RtpPacketHeader header
Definition: RtpPacket.h:100
UINT64 sentTime
Definition: RtpPacket.h:108
UINT64 receivedTime
Definition: RtpPacket.h:106
UINT32 payloadLength
Definition: RtpPacket.h:102