4 #ifndef __KINESIS_VIDEO_WEBRTC_CLIENT_PEERCONNECTION_PEERCONNECTION__
5 #define __KINESIS_VIDEO_WEBRTC_CLIENT_PEERCONNECTION_PEERCONNECTION__
13 #define LOCAL_ICE_UFRAG_LEN 4
14 #define LOCAL_ICE_PWD_LEN 24
15 #define LOCAL_CNAME_LEN 16
18 #define MAX_ICE_UFRAG_LEN 256
19 #define MAX_ICE_PWD_LEN 256
21 #define PEER_FRAME_BUFFER_SIZE_INCREMENT_FACTOR 1.5
24 #define VALID_CHAR_SET_FOR_JSON "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"
26 #define ICE_CANDIDATE_JSON_TEMPLATE (PCHAR) "{\"candidate\":\"candidate:%s\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0}"
28 #define MAX_ICE_CANDIDATE_JSON_LEN (MAX_SDP_ATTRIBUTE_VALUE_LENGTH + SIZEOF(ICE_CANDIDATE_JSON_TEMPLATE) + 1)
30 #define CODEC_HASH_TABLE_BUCKET_COUNT 50
31 #define CODEC_HASH_TABLE_BUCKET_LENGTH 2
32 #define RTX_HASH_TABLE_BUCKET_COUNT 50
33 #define RTX_HASH_TABLE_BUCKET_LENGTH 2
34 #define TWCC_HASH_TABLE_BUCKET_COUNT 100
35 #define TWCC_HASH_TABLE_BUCKET_LENGTH 2
37 #define DATA_CHANNEL_HASH_TABLE_BUCKET_COUNT 200
38 #define DATA_CHANNEL_HASH_TABLE_BUCKET_LENGTH 2
41 #define DEBUG_LOG_SDP ((PCHAR) "DEBUG_LOG_SDP")
43 #define MAX_ACCESS_THREADS_WEBRTC_CLIENT_CONTEXT 50
#define CERTIFICATE_FINGERPRINT_LENGTH
Definition: Include_i.h:90
#define LOCAL_ICE_PWD_LEN
Definition: PeerConnection.h:14
struct TwccRtpPacketInfo * PTwccRtpPacketInfo
RTX_CODEC
Definition: PeerConnection.h:45
@ RTC_RTX_CODEC_H265
Definition: PeerConnection.h:48
@ RTC_RTX_CODEC_VP8
Definition: PeerConnection.h:47
@ RTC_RTX_CODEC_H264_PROFILE_42E01F_LEVEL_ASYMMETRY_ALLOWED_PACKETIZATION_MODE
Definition: PeerConnection.h:46
STATUS onFrameDroppedFunc(UINT64, UINT16, UINT16, UINT32)
Definition: PeerConnection.c:441
#define LOCAL_ICE_UFRAG_LEN
Definition: PeerConnection.h:13
struct KvsPeerConnection * PKvsPeerConnection
#define MAX_ICE_PWD_LEN
Definition: PeerConnection.h:19
STATUS onFrameReadyFunc(UINT64, UINT16, UINT16, UINT32)
Definition: PeerConnection.c:381
#define LOCAL_CNAME_LEN
Definition: PeerConnection.h:15
VOID onSctpSessionOutboundPacket(UINT64, PBYTE, UINT32)
Definition: PeerConnection.c:595
struct AllocateSctpSortDataChannelsData * PAllocateSctpSortDataChannelsData
VOID onIceConnectionStateChange(UINT64, UINT64)
Definition: PeerConnection.c:488
STATUS changePeerConnectionState(PKvsPeerConnection, RTC_PEER_CONNECTION_STATE)
Definition: PeerConnection.c:328
STATUS sendPacketToRtpReceiver(PKvsPeerConnection, PBYTE, UINT32)
Definition: PeerConnection.c:236
struct TwccManager * PTwccManager
struct StunIpAddrContext * PStunIpAddrContext
struct WebRtcClientContext * PWebRtcClientContext
VOID onSctpSessionDataChannelOpen(UINT64, UINT32, PBYTE, UINT32)
Definition: PeerConnection.c:644
UINT32 parseExtId(PCHAR)
parses string of form "$number $whatever" returns $number as uint32
Definition: PeerConnection.c:1323
#define MAX_ICE_UFRAG_LEN
Definition: PeerConnection.h:18
STATUS twccManagerOnPacketSent(PKvsPeerConnection, PRtpPacket)
Definition: PeerConnection.c:1906
struct KvsPeerConnectionDiagnostics * PKvsPeerConnectionDiagnostics
VOID onSctpSessionDataChannelMessage(UINT64, UINT32, BOOL, PBYTE, UINT32)
Definition: PeerConnection.c:613
VOID(* RtcOnDataChannel)(UINT64, PRtcDataChannel)
RtcOnDataChannel is fired when the remote PeerConnection creates a new DataChannel.
Definition: Include.h:1060
VOID(* RtcOnSenderBandwidthEstimation)(UINT64, UINT32, UINT32, UINT32, UINT32, UINT64)
RtcOnSenderBandwidthEstimation is fired everytime a bandwidth estimation value is computed by sender....
Definition: Include.h:1015
VOID(* RtcOnIceCandidate)(UINT64, PCHAR)
RtcOnIceCandidate is fired when new iceCandidate is found. if PCHAR is NULL then candidate gathering ...
Definition: Include.h:1067
VOID(* RtcOnConnectionStateChange)(UINT64, RTC_PEER_CONNECTION_STATE)
RtcOnConnectionStateChange is fired to report a change in peer connection state.
Definition: Include.h:1080
#define MAX_ICE_CONFIG_URI_LEN
Definition: Include.h:466
RTC_PEER_CONNECTION_STATE
RTC_PEER_CONNECTION_STATE Stats of RTC peer connection.
Definition: Include.h:801
Definition: PeerConnection.h:153
PKvsPeerConnection pKvsPeerConnection
Definition: PeerConnection.h:155
PHashTable unkeyedDataChannels
Definition: PeerConnection.h:156
UINT32 currentDataChannelId
Definition: PeerConnection.h:154
Definition: Include_i.h:99
Definition: PeerConnection.h:64
UINT64 peerConnectionCreationTime
Definition: PeerConnection.h:65
UINT64 dtlsSessionSetupTime
Definition: PeerConnection.h:66
UINT64 closePeerConnectionTime
Definition: PeerConnection.h:68
UINT64 iceHolePunchingTime
Definition: PeerConnection.h:67
UINT64 freePeerConnectionTime
Definition: PeerConnection.h:69
Definition: PeerConnection.h:72
PHashTable pDataChannels
Definition: PeerConnection.h:125
RtcOnDataChannel onDataChannel
Definition: PeerConnection.h:128
PDoubleList pTransceivers
Definition: PeerConnection.h:91
volatile SIZE_T transportWideSequenceNumber
Definition: PeerConnection.h:79
MUTEX pSrtpSessionLock
Definition: PeerConnection.h:85
PHashTable pCodecTable
Definition: PeerConnection.h:118
RtcOnConnectionStateChange onConnectionStateChange
Definition: PeerConnection.h:134
RtcOnIceCandidate onIceCandidate
Definition: PeerConnection.h:131
RtcOnSenderBandwidthEstimation onSenderBandwidthEstimation
Definition: PeerConnection.h:146
PHashTable pRtxTable
Definition: PeerConnection.h:122
UINT32 padding
Definition: PeerConnection.h:78
UINT64 onIceCandidateCustomData
Definition: PeerConnection.h:130
UINT64 onDataChannelCustomData
Definition: PeerConnection.h:127
UINT64 onConnectionStateChangeCustomData
Definition: PeerConnection.h:133
RtcPeerConnection peerConnection
Definition: PeerConnection.h:73
UINT16 MTU
Definition: PeerConnection.h:137
BOOL isOffer
Definition: PeerConnection.h:111
PSctpSession pSctpSession
Definition: PeerConnection.h:88
PTwccManager pTwccManager
Definition: PeerConnection.h:145
PIceAgent pIceAgent
Definition: PeerConnection.h:81
PDoubleList pAnswerTransceivers
Definition: PeerConnection.h:93
MUTEX twccLock
Definition: PeerConnection.h:144
PSessionDescription pRemoteSessionDescription
Definition: PeerConnection.h:90
UINT64 iceConnectingStartTime
Definition: PeerConnection.h:149
MUTEX peerConnectionObjLock
Definition: PeerConnection.h:107
BOOL dtlsIsServer
Definition: PeerConnection.h:83
UINT64 onSenderBandwidthEstimationCustomData
Definition: PeerConnection.h:147
KvsPeerConnectionDiagnostics peerConnectionDiagnostics
Definition: PeerConnection.h:150
NullableBool canTrickleIce
Definition: PeerConnection.h:139
TIMER_QUEUE_HANDLE timerQueueHandle
Definition: PeerConnection.h:113
PDtlsSession pDtlsSession
Definition: PeerConnection.h:82
volatile ATOMIC_BOOL sctpIsEnabled
Definition: PeerConnection.h:95
RTC_PEER_CONNECTION_STATE connectionState
Definition: PeerConnection.h:135
UINT16 twccExtId
Definition: PeerConnection.h:143
PDoubleList pFakeTransceivers
Definition: PeerConnection.h:92
PSrtpSession pSrtpSession
Definition: PeerConnection.h:86
Definition: NullableDefs.h:60
An RtcPeerConnection instance allows an application to establish peer-to-peer communications with ano...
Definition: Include.h:1098
Definition: PeerConnection.h:159
UINT64 expirationDuration
Definition: PeerConnection.h:165
UINT64 stunDnsResolutionTime
Definition: PeerConnection.h:164
STATUS status
Definition: PeerConnection.h:166
BOOL isIpInitialized
Definition: PeerConnection.h:162
UINT64 startTime
Definition: PeerConnection.h:163
KvsIpAddress kvsIpAddr
Definition: PeerConnection.h:161
Definition: PeerConnection.h:57
UINT16 lastReportedSeqNum
Definition: PeerConnection.h:60
PHashTable pTwccRtpPktInfosHashTable
Definition: PeerConnection.h:58
UINT16 prevReportedBaseSeqNum
Definition: PeerConnection.h:61
UINT16 firstSeqNumInRollingWindow
Definition: PeerConnection.h:59
Definition: PeerConnection.h:51
UINT64 localTimeKvs
Definition: PeerConnection.h:52
UINT64 remoteTimeKvs
Definition: PeerConnection.h:53
UINT32 packetSize
Definition: PeerConnection.h:54
Definition: PeerConnection.h:171
PStunIpAddrContext pStunIpAddrCtx
Definition: PeerConnection.h:172
volatile ATOMIC_BOOL isContextInitialized
Definition: PeerConnection.h:173
MUTEX stunCtxlock
Definition: PeerConnection.h:175
volatile SIZE_T contextRefCnt
Definition: PeerConnection.h:174
Definition: IceAgent.h:200
Definition: RtpPacket.h:99
Definition: SrtpSession.h:15