Amazon Kinesis Webrtc C SDK
Include.h
Go to the documentation of this file.
1 /*
2  * Main public include file
3  */
4 #ifndef __KINESIS_VIDEO_WEBRTC_CLIENT_INCLUDE__
5 #define __KINESIS_VIDEO_WEBRTC_CLIENT_INCLUDE__
6 
7 #pragma once
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
14 // Public headers
16 #if defined(__clang__)
17 #pragma clang diagnostic push
18 #pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
19 #endif
20 #include <com/amazonaws/kinesis/video/client/Include.h>
21 #include <com/amazonaws/kinesis/video/common/Include.h>
24 #if defined(__clang__)
25 #pragma clang diagnostic pop
26 #endif
27 
28 /* TODO: Potentially move these call to PIC instead. Moving to PIC in the future would not cause any backward compatibility issues */
29 #define PROFILE_CALL(f, msg) \
30  do { \
31  startTimeInMacro = GETTIME(); \
32  f; \
33  DLOGP("[%s] Time taken: %" PRIu64 " ms", (msg), (GETTIME() - startTimeInMacro) / HUNDREDS_OF_NANOS_IN_A_MILLISECOND); \
34  } while (FALSE)
35 
36 #define PROFILE_CALL_WITH_T_OBJ(f, t, msg) \
37  do { \
38  startTimeInMacro = GETTIME(); \
39  f; \
40  t = (GETTIME() - startTimeInMacro) / HUNDREDS_OF_NANOS_IN_A_MILLISECOND; \
41  DLOGP("[%s] Time taken: %" PRIu64 " ms", (msg), (t)); \
42  } while (FALSE)
43 
44 #define PROFILE_WITH_START_TIME(t, msg) \
45  do { \
46  DLOGP("[%s] Time taken: %" PRIu64 " ms", msg, (GETTIME() - (t)) / HUNDREDS_OF_NANOS_IN_A_MILLISECOND); \
47  } while (FALSE)
48 
49 #define PROFILE_CALL_WITH_START_END_T_OBJ(f, s, e, d, msg) \
50  do { \
51  s = GETTIME() / HUNDREDS_OF_NANOS_IN_A_MILLISECOND; \
52  f; \
53  e = GETTIME() / HUNDREDS_OF_NANOS_IN_A_MILLISECOND; \
54  d = ((e) - (s)); \
55  DLOGP("[%s] Time taken: %" PRIu64 " ms", (msg), (d)); \
56  } while (FALSE)
57 
58 #define PROFILE_WITH_START_END_TIME_OBJ(t1, t2, d, msg) \
59  do { \
60  t1 = (t1 / HUNDREDS_OF_NANOS_IN_A_MILLISECOND); \
61  t2 = (GETTIME() / HUNDREDS_OF_NANOS_IN_A_MILLISECOND); \
62  d = ((t2) - (t1)); \
63  DLOGP("[%s] Time taken: %" PRIu64 " ms", (msg), (d)); \
64  } while (FALSE)
65 
66 #define PROFILE_WITH_START_TIME_OBJ(t1, t2, msg) \
67  do { \
68  t2 = (GETTIME() - (t1)) / HUNDREDS_OF_NANOS_IN_A_MILLISECOND; \
69  DLOGP("[%s] Time taken: %" PRIu64 " ms", (msg), t2); \
70  } while (FALSE)
71 
78 #define STATUS_WEBRTC_BASE 0x55000000
79 
83 
89 #define STATUS_SESSION_DESCRIPTION_INIT_NOT_OBJECT STATUS_WEBRTC_BASE + 0x00000001
90 #define STATUS_SESSION_DESCRIPTION_INIT_MISSING_SDP_OR_TYPE_MEMBER STATUS_WEBRTC_BASE + 0x00000002
91 #define STATUS_SESSION_DESCRIPTION_INIT_INVALID_TYPE STATUS_WEBRTC_BASE + 0x00000003
92 #define STATUS_SESSION_DESCRIPTION_INIT_MISSING_SDP STATUS_WEBRTC_BASE + 0x00000004
93 #define STATUS_SESSION_DESCRIPTION_INIT_MISSING_TYPE STATUS_WEBRTC_BASE + 0x00000005
94 #define STATUS_SESSION_DESCRIPTION_INIT_MAX_SDP_LEN_EXCEEDED STATUS_WEBRTC_BASE + 0x00000006
95 #define STATUS_SESSION_DESCRIPTION_INVALID_SESSION_DESCRIPTION STATUS_WEBRTC_BASE + 0x00000007
96 #define STATUS_SESSION_DESCRIPTION_MISSING_ICE_VALUES STATUS_WEBRTC_BASE + 0x00000008
97 #define STATUS_SESSION_DESCRIPTION_MISSING_CERTIFICATE_FINGERPRINT STATUS_WEBRTC_BASE + 0x00000009
98 #define STATUS_SESSION_DESCRIPTION_MAX_MEDIA_COUNT STATUS_WEBRTC_BASE + 0x0000000A
104 
110 #define STATUS_SDP_BASE STATUS_WEBRTC_BASE + 0x01000000
111 #define STATUS_SDP_MISSING_ITEMS STATUS_SDP_BASE + 0x00000001
112 #define STATUS_SDP_ATTRIBUTES_ERROR STATUS_SDP_BASE + 0x00000002
113 #define STATUS_SDP_BANDWIDTH_ERROR STATUS_SDP_BASE + 0x00000003
114 #define STATUS_SDP_CONNECTION_INFORMATION_ERROR STATUS_SDP_BASE + 0x00000004
115 #define STATUS_SDP_EMAIL_ADDRESS_ERROR STATUS_SDP_BASE + 0x00000005
116 #define STATUS_SDP_ENCYRPTION_KEY_ERROR STATUS_SDP_BASE + 0x00000006
117 #define STATUS_SDP_INFORMATION_ERROR STATUS_SDP_BASE + 0x00000007
118 #define STATUS_SDP_MEDIA_NAME_ERROR STATUS_SDP_BASE + 0x00000008
119 #define STATUS_SDP_ORIGIN_ERROR STATUS_SDP_BASE + 0x00000009
120 #define STATUS_SDP_PHONE_NUMBER_ERROR STATUS_SDP_BASE + 0x0000000A
121 #define STATUS_SDP_TIME_DECRYPTION_ERROR STATUS_SDP_BASE + 0x0000000B
122 #define STATUS_SDP_TIMEZONE_ERROR STATUS_SDP_BASE + 0x0000000C
123 #define STATUS_SDP_URI_ERROR STATUS_SDP_BASE + 0x0000000D
124 #define STATUS_SDP_VERSION_ERROR STATUS_SDP_BASE + 0x0000000E
125 #define STATUS_SDP_ATTRIBUTE_MAX_EXCEEDED STATUS_SDP_BASE + 0x0000000F
126 #define STATUS_SDP_MESSAGE_MALFORMED STATUS_SDP_BASE + 0x00000010
127 #define STATUS_SDP_MESSAGE_MALFORMED_NOT_ENOUGH_INFO STATUS_SDP_BASE + 0x00000011
128 #define STATUS_SDP_MESSAGE_MALFORMED_EQUAL_NOT_FOUND STATUS_SDP_BASE + 0x00000012
129 #define STATUS_SDP_MESSAGE_MALFORMED_NEWLINE_NOT_FOUND STATUS_SDP_BASE + 0x00000013
130 #define STATUS_SDP_MESSAGE_MALFORMED_NO_VALUE STATUS_SDP_BASE + 0x00000014
131 #define STATUS_SDP_MESSAGE_MALFORMED_NO_SESSION_ID STATUS_SDP_BASE + 0x00000015
132 #define STATUS_SDP_MESSAGE_MALFORMED_NO_SESSION_VERSION STATUS_SDP_BASE + 0x00000016
133 #define STATUS_SDP_MESSAGE_MALFORMED_INVALID_NETWORK_TYPE STATUS_SDP_BASE + 0x00000017
134 #define STATUS_SDP_MESSAGE_MALFORMED_INVALID_ADDRESS_TYPE STATUS_SDP_BASE + 0x00000018
135 #define STATUS_SDP_MESSAGE_MALFORMED_REDUNDANT_INFO STATUS_SDP_BASE + 0x00000019
136 #define STATUS_SDP_MESSAGE_MALFORMED_INVALID_BANDWIDTH STATUS_SDP_BASE + 0x0000001A
137 #define STATUS_SDP_MESSAGE_MALFORMED_INVALID_START_TIME STATUS_SDP_BASE + 0x0000001B
138 #define STATUS_SDP_MESSAGE_MALFORMED_INVALID_STOP_TIME STATUS_SDP_BASE + 0x0000001C
139 #define STATUS_SDP_MESSAGE_MALFORMED_INVALID_PORT STATUS_SDP_BASE + 0x0000001D
140 #define STATUS_SDP_MESSAGE_MALFORMED_INVALID_PORTNUM STATUS_SDP_BASE + 0x0000001E
141 #define STATUS_SDP_SNPRINTF_ERROR STATUS_SDP_BASE + 0x0000001F
142 #define STATUS_SDP_UNKNOWN_ERROR STATUS_SDP_BASE + 0x00000020
148 
153 #define STATUS_STUN_BASE STATUS_SDP_BASE + 0x01000000
154 #define STATUS_STUN_MESSAGE_INTEGRITY_NOT_LAST STATUS_STUN_BASE + 0x00000001
155 #define STATUS_STUN_MESSAGE_INTEGRITY_SIZE_ALIGNMENT STATUS_STUN_BASE + 0x00000002
156 #define STATUS_STUN_FINGERPRINT_NOT_LAST STATUS_STUN_BASE + 0x00000003
157 #define STATUS_STUN_MAGIC_COOKIE_MISMATCH STATUS_STUN_BASE + 0x00000004
158 #define STATUS_STUN_INVALID_ADDRESS_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000005
159 #define STATUS_STUN_INVALID_USERNAME_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000006
160 #define STATUS_STUN_INVALID_MESSAGE_INTEGRITY_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000007
161 #define STATUS_STUN_INVALID_FINGERPRINT_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000008
162 #define STATUS_STUN_MULTIPLE_MESSAGE_INTEGRITY_ATTRIBUTES STATUS_STUN_BASE + 0x00000009
163 #define STATUS_STUN_MULTIPLE_FINGERPRINT_ATTRIBUTES STATUS_STUN_BASE + 0x0000000A
164 #define STATUS_STUN_ATTRIBUTES_AFTER_FINGERPRINT_MESSAGE_INTEGRITY STATUS_STUN_BASE + 0x0000000B
165 #define STATUS_STUN_MESSAGE_INTEGRITY_AFTER_FINGERPRINT STATUS_STUN_BASE + 0x0000000C
166 #define STATUS_STUN_MAX_ATTRIBUTE_COUNT STATUS_STUN_BASE + 0x0000000D
167 #define STATUS_STUN_MESSAGE_INTEGRITY_MISMATCH STATUS_STUN_BASE + 0x0000000E
168 #define STATUS_STUN_FINGERPRINT_MISMATCH STATUS_STUN_BASE + 0x0000000F
169 #define STATUS_STUN_INVALID_PRIORITY_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000010
170 #define STATUS_STUN_INVALID_USE_CANDIDATE_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000011
171 #define STATUS_STUN_INVALID_LIFETIME_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000012
172 #define STATUS_STUN_INVALID_REQUESTED_TRANSPORT_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000013
173 #define STATUS_STUN_INVALID_REALM_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000014
174 #define STATUS_STUN_INVALID_NONCE_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000015
175 #define STATUS_STUN_INVALID_ERROR_CODE_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000016
176 #define STATUS_STUN_INVALID_ICE_CONTROL_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000017
177 #define STATUS_STUN_INVALID_CHANNEL_NUMBER_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000018
178 #define STATUS_STUN_INVALID_CHANGE_REQUEST_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x00000019
179 #define STATUS_STUN_INVALID_MESSAGE_LENGTH STATUS_STUN_BASE + 0x0000001A
180 #define STATUS_STUN_INVALID_ATTRIBUTE_LENGTH STATUS_STUN_BASE + 0x0000001B
181 #define STATUS_STUN_ATTRIBUTE_NOT_FOUND STATUS_STUN_BASE + 0x0000001C
182 #define STATUS_STUN_NO_MORE_ATTRIBUTE_FOUND STATUS_STUN_BASE + 0x0000001D
183 #define STATUS_STUN_UNKNOWN_ERROR STATUS_STUN_BASE + 0x0000001E
189 
194 #define STATUS_NETWORKING_BASE STATUS_STUN_BASE + 0x01000000
195 #define STATUS_GET_LOCAL_IP_ADDRESSES_FAILED STATUS_NETWORKING_BASE + 0x00000016
196 #define STATUS_CREATE_UDP_SOCKET_FAILED STATUS_NETWORKING_BASE + 0x00000017
197 #define STATUS_BINDING_SOCKET_FAILED STATUS_NETWORKING_BASE + 0x00000018
198 #define STATUS_GET_PORT_NUMBER_FAILED STATUS_NETWORKING_BASE + 0x00000019
199 #define STATUS_SEND_DATA_FAILED STATUS_NETWORKING_BASE + 0x0000001a
200 #define STATUS_RESOLVE_HOSTNAME_FAILED STATUS_NETWORKING_BASE + 0x0000001b
201 #define STATUS_HOSTNAME_NOT_FOUND STATUS_NETWORKING_BASE + 0x0000001c
202 #define STATUS_SOCKET_CONNECT_FAILED STATUS_NETWORKING_BASE + 0x0000001d
203 #define STATUS_CREATE_SSL_FAILED STATUS_NETWORKING_BASE + 0x0000001e
204 #define STATUS_SSL_CONNECTION_FAILED STATUS_NETWORKING_BASE + 0x0000001f
205 #define STATUS_SECURE_SOCKET_READ_FAILED STATUS_NETWORKING_BASE + 0x00000020
206 #define STATUS_SOCKET_CONNECTION_NOT_READY_TO_SEND STATUS_NETWORKING_BASE + 0x00000021
207 #define STATUS_SOCKET_CONNECTION_CLOSED_ALREADY STATUS_NETWORKING_BASE + 0x00000022
208 #define STATUS_SOCKET_SET_SEND_BUFFER_SIZE_FAILED STATUS_NETWORKING_BASE + 0x00000023
209 #define STATUS_GET_SOCKET_FLAG_FAILED STATUS_NETWORKING_BASE + 0x00000024
210 #define STATUS_SET_SOCKET_FLAG_FAILED STATUS_NETWORKING_BASE + 0x00000025
211 #define STATUS_CLOSE_SOCKET_FAILED STATUS_NETWORKING_BASE + 0x00000026
212 #define STATUS_CREATE_SOCKET_PAIR_FAILED STATUS_NETWORKING_BASE + 0x00000027
213 #define STATUS_SOCKET_WRITE_FAILED STATUS_NETWORKING_BASE + 0X00000028
214 #define STATUS_INVALID_ADDRESS_LENGTH STATUS_NETWORKING_BASE + 0X00000029
215 
221 
226 #define STATUS_DTLS_BASE STATUS_NETWORKING_BASE + 0x01000000
227 #define STATUS_CERTIFICATE_GENERATION_FAILED STATUS_DTLS_BASE + 0x00000001
228 #define STATUS_SSL_CTX_CREATION_FAILED STATUS_DTLS_BASE + 0x00000002
229 #define STATUS_SSL_REMOTE_CERTIFICATE_VERIFICATION_FAILED STATUS_DTLS_BASE + 0x00000003
230 #define STATUS_SSL_PACKET_BEFORE_DTLS_READY STATUS_DTLS_BASE + 0x00000004
231 #define STATUS_SSL_UNKNOWN_SRTP_PROFILE STATUS_DTLS_BASE + 0x00000005
232 #define STATUS_SSL_INVALID_CERTIFICATE_BITS STATUS_DTLS_BASE + 0x00000006
233 #define STATUS_DTLS_SESSION_ALREADY_FREED STATUS_DTLS_BASE + 0x00000007
239 
244 #define STATUS_ICE_BASE STATUS_DTLS_BASE + 0x01000000
245 #define STATUS_ICE_AGENT_NO_SELECTED_CANDIDATE_AVAILABLE STATUS_ICE_BASE + 0x00000001
246 #define STATUS_ICE_CANDIDATE_STRING_MISSING_PORT STATUS_ICE_BASE + 0x00000002
247 #define STATUS_ICE_CANDIDATE_STRING_MISSING_IP STATUS_ICE_BASE + 0x00000003
248 #define STATUS_ICE_CANDIDATE_STRING_INVALID_IP STATUS_ICE_BASE + 0x00000004
249 #define STATUS_ICE_CANDIDATE_STRING_IS_TCP STATUS_ICE_BASE + 0x00000005
250 #define STATUS_ICE_FAILED_TO_COMPUTE_MD5_FOR_LONG_TERM_CREDENTIAL STATUS_ICE_BASE + 0x00000006
251 #define STATUS_ICE_URL_INVALID_PREFIX STATUS_ICE_BASE + 0x00000007
252 #define STATUS_ICE_URL_TURN_MISSING_USERNAME STATUS_ICE_BASE + 0x00000008
253 #define STATUS_ICE_URL_TURN_MISSING_CREDENTIAL STATUS_ICE_BASE + 0x00000009
254 #define STATUS_ICE_AGENT_STATE_CHANGE_FAILED STATUS_ICE_BASE + 0x0000000a
255 #define STATUS_ICE_NO_LOCAL_CANDIDATE_AVAILABLE_AFTER_GATHERING_TIMEOUT STATUS_ICE_BASE + 0x0000000b
256 #define STATUS_ICE_AGENT_TERMINATED_ALREADY STATUS_ICE_BASE + 0x0000000c
257 #define STATUS_ICE_NO_CONNECTED_CANDIDATE_PAIR STATUS_ICE_BASE + 0x0000000d
258 #define STATUS_ICE_CANDIDATE_PAIR_LIST_EMPTY STATUS_ICE_BASE + 0x0000000e
259 #define STATUS_ICE_NOMINATED_CANDIDATE_NOT_CONNECTED STATUS_ICE_BASE + 0x00000010
260 #define STATUS_ICE_CANDIDATE_INIT_MALFORMED STATUS_ICE_BASE + 0x00000011
261 #define STATUS_ICE_CANDIDATE_MISSING_CANDIDATE STATUS_ICE_BASE + 0x00000012
262 #define STATUS_ICE_FAILED_TO_NOMINATE_CANDIDATE_PAIR STATUS_ICE_BASE + 0x00000013
263 #define STATUS_ICE_MAX_REMOTE_CANDIDATE_COUNT_EXCEEDED STATUS_ICE_BASE + 0x00000014
264 #define STATUS_ICE_INVALID_STATE STATUS_ICE_BASE + 0x0000001c
265 #define STATUS_ICE_NO_LOCAL_HOST_CANDIDATE_AVAILABLE STATUS_ICE_BASE + 0x0000001d
266 #define STATUS_ICE_NO_NOMINATED_VALID_CANDIDATE_PAIR_AVAILABLE STATUS_ICE_BASE + 0x0000001e
267 #define STATUS_TURN_CONNECTION_NO_HOST_INTERFACE_FOUND STATUS_ICE_BASE + 0x0000001f
268 #define STATUS_TURN_CONNECTION_STATE_TRANSITION_TIMEOUT STATUS_ICE_BASE + 0x00000020
269 #define STATUS_TURN_CONNECTION_FAILED_TO_CREATE_PERMISSION STATUS_ICE_BASE + 0x00000021
270 #define STATUS_TURN_CONNECTION_FAILED_TO_BIND_CHANNEL STATUS_ICE_BASE + 0x00000022
271 #define STATUS_TURN_NEW_DATA_CHANNEL_MSG_HEADER_BEFORE_PREVIOUS_MSG_FINISH STATUS_ICE_BASE + 0x00000023
272 #define STATUS_TURN_MISSING_CHANNEL_DATA_HEADER STATUS_ICE_BASE + 0x00000024
273 #define STATUS_ICE_FAILED_TO_RECOVER_FROM_DISCONNECTION STATUS_ICE_BASE + 0x00000025
274 #define STATUS_ICE_NO_AVAILABLE_ICE_CANDIDATE_PAIR STATUS_ICE_BASE + 0x00000026
275 #define STATUS_TURN_CONNECTION_PEER_NOT_USABLE STATUS_ICE_BASE + 0x00000027
276 #define STATUS_ICE_SERVER_INDEX_INVALID STATUS_ICE_BASE + 0x00000028
277 #define STATUS_ICE_CANDIDATE_STRING_MISSING_TYPE STATUS_ICE_BASE + 0x00000029
278 #define STATUS_TURN_CONNECTION_ALLOCATION_FAILED STATUS_ICE_BASE + 0x0000002a
279 #define STATUS_TURN_INVALID_STATE STATUS_ICE_BASE + 0x0000002b
280 #define STATUS_TURN_CONNECTION_GET_CREDENTIALS_FAILED STATUS_ICE_BASE + 0x0000002c
281 
287 
292 #define STATUS_SRTP_BASE STATUS_ICE_BASE + 0x01000000
293 #define STATUS_SRTP_DECRYPT_FAILED STATUS_SRTP_BASE + 0x00000001
294 #define STATUS_SRTP_ENCRYPT_FAILED STATUS_SRTP_BASE + 0x00000002
295 #define STATUS_SRTP_TRANSMIT_SESSION_CREATION_FAILED STATUS_SRTP_BASE + 0x00000003
296 #define STATUS_SRTP_RECEIVE_SESSION_CREATION_FAILED STATUS_SRTP_BASE + 0x00000004
297 #define STATUS_SRTP_INIT_FAILED STATUS_SRTP_BASE + 0x00000005
298 #define STATUS_SRTP_NOT_READY_YET STATUS_SRTP_BASE + 0x00000006
304 
309 #define STATUS_RTP_BASE STATUS_SRTP_BASE + 0x01000000
310 #define STATUS_RTP_INPUT_PACKET_TOO_SMALL STATUS_RTP_BASE + 0x00000001
311 #define STATUS_RTP_INPUT_MTU_TOO_SMALL STATUS_RTP_BASE + 0x00000002
312 #define STATUS_RTP_INVALID_NALU STATUS_RTP_BASE + 0x00000003
313 #define STATUS_RTP_INVALID_EXTENSION_LEN STATUS_RTP_BASE + 0x00000004
314 #define STATUS_RTP_INVALID_VERSION STATUS_RTP_BASE + 0x00000005
315 #define STATUS_RTP_UNKNOWN_ERROR STATUS_RTP_BASE + 0x00000006
321 
326 #define STATUS_SIGNALING_BASE STATUS_RTP_BASE + 0x01000000
327 #define STATUS_SIGNALING_INVALID_READY_STATE STATUS_SIGNALING_BASE + 0x00000001
328 #define STATUS_SIGNALING_GET_TOKEN_CALL_FAILED STATUS_SIGNALING_BASE + 0x00000002
329 #define STATUS_SIGNALING_DESCRIBE_CALL_FAILED STATUS_SIGNALING_BASE + 0x00000003
330 #define STATUS_SIGNALING_CREATE_CALL_FAILED STATUS_SIGNALING_BASE + 0x00000004
331 #define STATUS_SIGNALING_GET_ENDPOINT_CALL_FAILED STATUS_SIGNALING_BASE + 0x00000005
332 #define STATUS_SIGNALING_GET_ICE_CONFIG_CALL_FAILED STATUS_SIGNALING_BASE + 0x00000006
333 #define STATUS_SIGNALING_READY_CALLBACK_FAILED STATUS_SIGNALING_BASE + 0x00000007
334 #define STATUS_SIGNALING_CONNECT_CALL_FAILED STATUS_SIGNALING_BASE + 0x00000008
335 #define STATUS_SIGNALING_CONNECTED_CALLBACK_FAILED STATUS_SIGNALING_BASE + 0x00000009
336 #define STATUS_SIGNALING_INVALID_CHANNEL_INFO_VERSION STATUS_SIGNALING_BASE + 0x0000000A
337 #define STATUS_SIGNALING_INVALID_SIGNALING_CALLBACKS_VERSION STATUS_SIGNALING_BASE + 0x0000000B
338 #define STATUS_SIGNALING_INVALID_CHANNEL_NAME_LENGTH STATUS_SIGNALING_BASE + 0x0000000C
339 #define STATUS_SIGNALING_INVALID_CHANNEL_ARN_LENGTH STATUS_SIGNALING_BASE + 0x0000000D
340 #define STATUS_SIGNALING_INVALID_REGION_LENGTH STATUS_SIGNALING_BASE + 0x0000000E
341 #define STATUS_SIGNALING_INVALID_CPL_LENGTH STATUS_SIGNALING_BASE + 0x0000000F
342 #define STATUS_SIGNALING_INVALID_CERTIFICATE_PATH_LENGTH STATUS_SIGNALING_BASE + 0x00000010
343 #define STATUS_SIGNALING_INVALID_AGENT_POSTFIX_LENGTH STATUS_SIGNALING_BASE + 0x00000011
344 #define STATUS_SIGNALING_INVALID_AGENT_LENGTH STATUS_SIGNALING_BASE + 0x00000012
345 #define STATUS_SIGNALING_INVALID_KMS_KEY_LENGTH STATUS_SIGNALING_BASE + 0x00000013
346 #define STATUS_SIGNALING_LWS_CREATE_CONTEXT_FAILED STATUS_SIGNALING_BASE + 0x00000014
347 #define STATUS_SIGNALING_LWS_CLIENT_CONNECT_FAILED STATUS_SIGNALING_BASE + 0x00000015
348 #define STATUS_SIGNALING_CHANNEL_BEING_DELETED STATUS_SIGNALING_BASE + 0x00000016
349 #define STATUS_SIGNALING_INVALID_CLIENT_INFO_VERSION STATUS_SIGNALING_BASE + 0x00000017
350 #define STATUS_SIGNALING_INVALID_CLIENT_INFO_CLIENT_LENGTH STATUS_SIGNALING_BASE + 0x00000018
351 #define STATUS_SIGNALING_MAX_ICE_CONFIG_COUNT STATUS_SIGNALING_BASE + 0x00000019
352 #define STATUS_SIGNALING_MAX_ICE_URI_COUNT STATUS_SIGNALING_BASE + 0x0000001A
353 #define STATUS_SIGNALING_MAX_ICE_URI_LEN STATUS_SIGNALING_BASE + 0x0000001B
354 #define STATUS_SIGNALING_NO_CONFIG_SPECIFIED STATUS_SIGNALING_BASE + 0x0000001C
355 #define STATUS_SIGNALING_INVALID_ICE_CONFIG_INFO_VERSION STATUS_SIGNALING_BASE + 0x0000001D
356 #define STATUS_SIGNALING_NO_CONFIG_URI_SPECIFIED STATUS_SIGNALING_BASE + 0x0000001E
357 #define STATUS_SIGNALING_NO_ARN_RETURNED_ON_CREATE STATUS_SIGNALING_BASE + 0x0000001F
358 #define STATUS_SIGNALING_MISSING_ENDPOINTS_IN_GET_ENDPOINT STATUS_SIGNALING_BASE + 0x00000020
359 #define STATUS_SIGNALING_INVALID_MESSAGE_TYPE STATUS_SIGNALING_BASE + 0x00000021
360 #define STATUS_SIGNALING_INVALID_SIGNALING_MESSAGE_VERSION STATUS_SIGNALING_BASE + 0x00000022
361 #define STATUS_SIGNALING_NO_PEER_CLIENT_ID_IN_MESSAGE STATUS_SIGNALING_BASE + 0x00000023
362 #define STATUS_SIGNALING_MESSAGE_DELIVERY_FAILED STATUS_SIGNALING_BASE + 0x00000024
363 #define STATUS_SIGNALING_MAX_MESSAGE_LEN_AFTER_ENCODING STATUS_SIGNALING_BASE + 0x00000025
364 #define STATUS_SIGNALING_RECEIVE_BINARY_DATA_NOT_SUPPORTED STATUS_SIGNALING_BASE + 0x00000026
365 #define STATUS_SIGNALING_RECEIVE_EMPTY_DATA_NOT_SUPPORTED STATUS_SIGNALING_BASE + 0x00000027
366 #define STATUS_SIGNALING_RECEIVED_MESSAGE_LARGER_THAN_MAX_DATA_LEN STATUS_SIGNALING_BASE + 0x00000028
367 #define STATUS_SIGNALING_INVALID_PAYLOAD_LEN_IN_MESSAGE STATUS_SIGNALING_BASE + 0x00000029
368 #define STATUS_SIGNALING_NO_PAYLOAD_IN_MESSAGE STATUS_SIGNALING_BASE + 0x0000002A
369 #define STATUS_SIGNALING_DUPLICATE_MESSAGE_BEING_SENT STATUS_SIGNALING_BASE + 0x0000002B
370 #define STATUS_SIGNALING_ICE_TTL_LESS_THAN_GRACE_PERIOD STATUS_SIGNALING_BASE + 0x0000002C
371 #define STATUS_SIGNALING_DISCONNECTED_CALLBACK_FAILED STATUS_SIGNALING_BASE + 0x0000002D
372 #define STATUS_SIGNALING_INVALID_MESSAGE_TTL_VALUE STATUS_SIGNALING_BASE + 0x0000002E
373 #define STATUS_SIGNALING_ICE_CONFIG_REFRESH_FAILED STATUS_SIGNALING_BASE + 0x0000002F
374 #define STATUS_SIGNALING_RECONNECT_FAILED STATUS_SIGNALING_BASE + 0x00000030
375 #define STATUS_SIGNALING_DELETE_CALL_FAILED STATUS_SIGNALING_BASE + 0x00000031
376 #define STATUS_SIGNALING_INVALID_METRICS_VERSION STATUS_SIGNALING_BASE + 0x00000032
377 #define STATUS_SIGNALING_INVALID_CLIENT_INFO_CACHE_FILE_PATH_LEN STATUS_SIGNALING_BASE + 0x00000033
378 #define STATUS_SIGNALING_LWS_CALL_FAILED STATUS_SIGNALING_BASE + 0x00000034
379 #define STATUS_SIGNALING_INVALID_STREAM_ARN_LENGTH STATUS_SIGNALING_BASE + 0x00000035
380 #define STATUS_SIGNALING_MISMATCH_MEDIA_STORAGE_CONFIG STATUS_SIGNALING_BASE + 0x00000036
381 #define STATUS_SIGNALING_UPDATE_MEDIA_STORAGE_CONFIG STATUS_SIGNALING_BASE + 0x00000037
382 #define STATUS_SIGNALING_MEDIA_STORAGE_DISABLED STATUS_SIGNALING_BASE + 0x00000038
383 #define STATUS_SIGNALING_INVALID_CHANNEL_ARN STATUS_SIGNALING_BASE + 0x00000039
384 #define STATUS_SIGNALING_JOIN_SESSION_CALL_FAILED STATUS_SIGNALING_BASE + 0x0000004a
385 #define STATUS_SIGNALING_JOIN_SESSION_CONNECTED_FAILED STATUS_SIGNALING_BASE + 0x0000004b
386 #define STATUS_SIGNALING_DESCRIBE_MEDIA_CALL_FAILED STATUS_SIGNALING_BASE + 0x0000004c
387 
393 
399 #define STATUS_PEERCONNECTION_BASE STATUS_SIGNALING_BASE + 0x01000000
400 #define STATUS_PEERCONNECTION_CREATE_ANSWER_WITHOUT_REMOTE_DESCRIPTION STATUS_PEERCONNECTION_BASE + 0x00000001
401 #define STATUS_PEERCONNECTION_CODEC_INVALID STATUS_PEERCONNECTION_BASE + 0x00000002
402 #define STATUS_PEERCONNECTION_CODEC_MAX_EXCEEDED STATUS_PEERCONNECTION_BASE + 0x00000003
403 #define STATUS_PEERCONNECTION_EARLY_DNS_RESOLUTION_FAILED STATUS_PEERCONNECTION_BASE + 0x00000004
409 
414 #define STATUS_SCTP_BASE STATUS_PEERCONNECTION_BASE + 0x01000000
415 #define STATUS_SCTP_SESSION_SETUP_FAILED STATUS_SCTP_BASE + 0x00000001
416 #define STATUS_SCTP_INVALID_DCEP_PACKET STATUS_SCTP_BASE + 0x00000002
422 
427 #define STATUS_RTCP_BASE STATUS_SCTP_BASE + 0x01000000
428 #define STATUS_RTCP_INPUT_PACKET_TOO_SMALL STATUS_RTCP_BASE + 0x00000001
429 #define STATUS_RTCP_INPUT_PACKET_INVALID_VERSION STATUS_RTCP_BASE + 0x00000002
430 #define STATUS_RTCP_INPUT_PACKET_LEN_MISMATCH STATUS_RTCP_BASE + 0x00000003
431 #define STATUS_RTCP_INPUT_NACK_LIST_INVALID STATUS_RTCP_BASE + 0x00000004
432 #define STATUS_RTCP_INPUT_SSRC_INVALID STATUS_RTCP_BASE + 0x00000005
433 #define STATUS_RTCP_INPUT_PARTIAL_PACKET STATUS_RTCP_BASE + 0x00000006
434 #define STATUS_RTCP_INPUT_REMB_TOO_SMALL STATUS_RTCP_BASE + 0x00000007
435 #define STATUS_RTCP_INPUT_REMB_INVALID STATUS_RTCP_BASE + 0x00000008
441 
447 #define STATUS_ROLLING_BUFFER_BASE STATUS_RTCP_BASE + 0x01000000
448 #define STATUS_ROLLING_BUFFER_NOT_IN_RANGE STATUS_ROLLING_BUFFER_BASE + 0x00000001
454 
463 #define MAX_CHANNEL_NAME_LEN 256
464 
468 #define MAX_SIGNALING_CLIENT_ID_LEN 256
469 
474 #define MAX_ICE_CONFIG_USER_NAME_LEN 256
475 
480 #define MAX_ICE_CONFIG_CREDENTIAL_LEN 256
481 
485 #define MAX_SIGNALING_ENDPOINT_URI_LEN 512
486 
490 #define MAX_CORRELATION_ID_LEN 256
491 
495 #define MAX_ERROR_TYPE_STRING_LEN 256
496 
500 #define MAX_STATUS_CODE_STRING_LEN 256
501 
505 #define MAX_MESSAGE_DESCRIPTION_LEN 1024
506 
510 #define MAX_SESSION_DESCRIPTION_INIT_SDP_LEN 25000
511 
515 #define MAX_MEDIA_STREAM_ID_LEN 255
516 
520 #define MAX_RTCCONFIGURATION_CERTIFICATES 3
521 
525 #define MAX_MEDIA_STREAM_TRACK_ID_LEN 255
526 
530 #define MAX_ICE_CANDIDATE_INIT_CANDIDATE_LEN 255
531 
535 #define MAX_DATA_CHANNEL_NAME_LEN 255
536 
540 #define MAX_DATA_CHANNEL_PROTOCOL_LEN 255
541 
545 #define MAX_SIGNALING_MESSAGE_LEN (10 * 1024)
551 
559 #define PEER_CONNECTION_CURRENT_VERSION 0
560 
564 #define CHANNEL_INFO_CURRENT_VERSION 1
565 
569 #define SIGNALING_CLIENT_INFO_CURRENT_VERSION 2
570 
574 #define SIGNALING_CLIENT_CALLBACKS_CURRENT_VERSION 0
575 
579 #define SIGNALING_CLIENT_CURRENT_VERSION 1
580 
584 #define SIGNALING_CHANNEL_DESCRIPTION_CURRENT_VERSION 0
585 
589 #define SIGNALING_ICE_CONFIG_INFO_CURRENT_VERSION 0
590 
594 #define SIGNALING_MESSAGE_CURRENT_VERSION 0
595 
599 #define RTC_ICE_METRICS_CURRENT_VERSION 0
600 
604 #define RTC_STREAM_METRICS_CURRENT_VERSION 0
605 
609 #define SIGNALING_CLIENT_METRICS_CURRENT_VERSION 1
610 
614 #define PEER_CONNECTION_METRICS_CURRENT_VERSION 0
615 
619 #define ICE_AGENT_METRICS_CURRENT_VERSION 0
620 
626 
634 #define MAX_ICE_CONFIG_URI_COUNT 4
635 
639 #define MAX_ICE_CONFIG_COUNT 5
640 
646 #define MAX_ICE_SERVERS_COUNT (MAX_ICE_CONFIG_COUNT * MAX_ICE_CONFIG_URI_COUNT + 1)
652 
660 #define SIGNALING_CREATE_TIMEOUT (10 * HUNDREDS_OF_NANOS_IN_A_SECOND)
661 
665 #define SIGNALING_CONNECT_STATE_TIMEOUT (15 * HUNDREDS_OF_NANOS_IN_A_SECOND)
666 
670 #define SIGNALING_DISCONNECT_STATE_TIMEOUT (15 * HUNDREDS_OF_NANOS_IN_A_SECOND)
671 
675 #define SIGNALING_REFRESH_ICE_CONFIG_STATE_TIMEOUT (20 * HUNDREDS_OF_NANOS_IN_A_SECOND)
676 
680 #define SIGNALING_CONNECT_TIMEOUT (5 * HUNDREDS_OF_NANOS_IN_A_SECOND)
681 
685 #define THREADPOOL_MIN_THREADS 1
686 
690 #define THREADPOOL_MAX_THREADS 10
691 
695 #define WEBRTC_THREADPOOL_MIN_THREADS_ENV_VAR (PCHAR) "AWS_KVS_WEBRTC_THREADPOOL_MIN_THREADS"
696 
700 #define WEBRTC_THREADPOOL_MAX_THREADS_ENV_VAR (PCHAR) "AWS_KVS_WEBRTC_THREADPOOL_MAX_THREADS"
701 
702 #ifdef _WIN32
706 #define SIGNALING_SEND_TIMEOUT (15 * HUNDREDS_OF_NANOS_IN_A_SECOND)
707 #else
711 #define SIGNALING_SEND_TIMEOUT (5 * HUNDREDS_OF_NANOS_IN_A_SECOND)
712 #endif
716 #define SIGNALING_DELETE_TIMEOUT (5 * HUNDREDS_OF_NANOS_IN_A_SECOND)
717 
721 #define SIGNALING_DEFAULT_MESSAGE_TTL_VALUE (60 * HUNDREDS_OF_NANOS_IN_A_SECOND)
722 
723 #define SIGNALING_JOIN_STORAGE_SESSION_WAIT_TIMEOUT (6 * HUNDREDS_OF_NANOS_IN_A_SECOND)
724 
728 #define DEFAULT_JITTER_BUFFER_MAX_LATENCY (2000L * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
734 #define SIGNALING_VALID_NAME_CHARS "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_.-"
735 
739 #define MAX_RTP_SEQUENCE_NUM ((UINT32) MAX_UINT16)
740 
744 #define MAX_RTP_TIMESTAMP ((UINT32) MAX_UINT32)
745 
749 #define KINESIS_VIDEO_STUN_URL_POSTFIX "amazonaws.com"
750 #define KINESIS_VIDEO_STUN_URL_POSTFIX_CN "amazonaws.com.cn"
751 #define KINESIS_VIDEO_STUN_URL "stun:stun.kinesisvideo.%s.%s:443"
752 #define KINESIS_VIDEO_STUN_URL_WITHOUT_PORT "stun.kinesisvideo.%s.%s"
753 
757 #define SIGNALING_DEFAULT_SSL_PORT DEFAULT_SSL_PORT_NUMBER
758 
762 #define SIGNALING_DEFAULT_NON_SSL_PORT DEFAULT_NON_SSL_PORT_NUMBER
763 
764 /* CHK_LOG_ERR_NV has been replaced with CHK_LOG_ERR. */
765 #define CHK_LOG_ERR_NV(condition) DLOGE("CHK_LOG_ERR_NV has been replaced with CHK_LOG_ERR");
766 
770 #define SIGNALING_STATES_DEFAULT_RETRY_COUNT 1
771 
775 #define SIGNALING_DEFAULT_API_CALL_CACHE_TTL (10 * HUNDREDS_OF_NANOS_IN_AN_HOUR)
776 
780 #define SIGNALING_API_CALL_CACHE_TTL_SENTINEL_VALUE 0
781 
785 #define CREATE_SIGNALING_CLIENT_RETRY_ATTEMPTS_SENTINEL_VALUE -1
786 
790 typedef UINT64 SIGNALING_CLIENT_HANDLE;
792 
796 #ifndef INVALID_SIGNALING_CLIENT_HANDLE_VALUE
797 #define INVALID_SIGNALING_CLIENT_HANDLE_VALUE ((SIGNALING_CLIENT_HANDLE) INVALID_PIC_HANDLE_VALUE)
798 #endif
799 
803 #ifndef IS_VALID_SIGNALING_CLIENT_HANDLE
804 #define IS_VALID_SIGNALING_CLIENT_HANDLE(h) ((h) != INVALID_SIGNALING_CLIENT_HANDLE_VALUE)
805 #endif
806 
810 
820 typedef enum {
830 
834 typedef enum {
837 } SDP_TYPE;
838 
842 typedef enum {
846 
850 typedef enum {
859 
860  // RTC_CODEC_MAX **MUST** be the last enum in the list **ALWAYS** and not assigned a value
863 
869 typedef enum {
872 
875 
881 typedef enum {
887 
891 typedef enum {
897 
901 typedef enum {
910 
914 typedef enum {
941 
945 typedef enum {
949 
953 typedef enum {
958 
962 typedef enum {
969 } NAT_BEHAVIOR;
970 
974 typedef enum {
976 
993 
999 
1010 typedef VOID (*RtcOnFrame)(UINT64, PFrame);
1011 
1019 typedef VOID (*RtcOnBandwidthEstimation)(UINT64, DOUBLE);
1020 
1036 typedef VOID (*RtcOnSenderBandwidthEstimation)(UINT64, UINT32, UINT32, UINT32, UINT32, UINT64);
1037 
1047 typedef VOID (*RtcOnPictureLoss)(UINT64);
1048 
1054 typedef struct __RtcDataChannel {
1056  UINT32 id;
1060 
1066 typedef VOID (*RtcOnMessage)(UINT64, PRtcDataChannel, BOOL, PBYTE, UINT32);
1067 
1073 typedef VOID (*RtcOnOpen)(UINT64, PRtcDataChannel);
1074 
1081 typedef VOID (*RtcOnDataChannel)(UINT64, PRtcDataChannel);
1082 
1088 typedef VOID (*RtcOnIceCandidate)(UINT64, PCHAR);
1089 
1094 typedef BOOL (*IceSetInterfaceFilterFunc)(UINT64, PCHAR);
1095 
1107 
1119 typedef struct {
1120  UINT32 version;
1122 
1128 typedef struct {
1130  CHAR trackId[MAX_MEDIA_STREAM_ID_LEN + 1];
1131  CHAR streamId[MAX_MEDIA_STREAM_ID_LEN + 1];
1134 
1144 typedef struct {
1147 
1154 typedef struct {
1158 
1165 typedef struct {
1166  CHAR urls[MAX_ICE_CONFIG_URI_LEN + 1];
1167  CHAR username[MAX_ICE_CONFIG_USER_NAME_LEN + 1];
1168  CHAR credential[MAX_ICE_CONFIG_CREDENTIAL_LEN + 1];
1170 
1175 typedef struct {
1176  // The certificate bits and the size
1179 
1180  // The private key bits and the size in bytes
1181  PBYTE pPrivateKey;
1184 
1192 typedef struct {
1197 
1200 
1203 
1207 
1210 
1214 
1217 
1218  UINT32 sendBufSize;
1219 
1221 
1224 
1229 
1236 typedef struct {
1240 
1260 
1267 typedef struct {
1274 
1280 typedef struct {
1285 
1289 typedef struct {
1290  UINT32 version;
1291 
1293 
1294  CHAR correlationId[MAX_CORRELATION_ID_LEN + 1];
1295 
1296  CHAR peerClientId[MAX_SIGNALING_CLIENT_ID_LEN + 1];
1297 
1298  UINT32 payloadLen;
1299 
1300  CHAR payload[MAX_SIGNALING_MESSAGE_LEN + 1];
1302 
1306 typedef struct {
1309 
1310  SERVICE_CALL_RESULT statusCode;
1311 
1312  CHAR errorType[MAX_ERROR_TYPE_STRING_LEN + 1];
1313 
1314  CHAR description[MAX_MESSAGE_DESCRIPTION_LEN + 1];
1316 
1320 typedef struct {
1321  UINT32 version;
1322  CHAR clientId[MAX_SIGNALING_CLIENT_ID_LEN + 1];
1323  UINT32 loggingLevel;
1331  KvsRetryStrategyCallbacks signalingRetryStrategyCallbacks;
1338 
1342 typedef struct {
1343  UINT32 version;
1344 
1346 
1347  PCHAR pChannelArn;
1351 
1352  PCHAR pRegion;
1354 
1357 
1358  PCHAR pCertPath;
1359 
1362 
1364 
1365  PCHAR pUserAgent;
1366 
1367  PCHAR pKmsKeyId;
1368 
1370 
1372 
1373  BOOL reserved;
1374 
1375  UINT64 cachingPeriod;
1379 
1380  BOOL retry;
1381 
1382  BOOL reconnect;
1383 
1384  UINT64 messageTtl;
1386 
1387  UINT32 tagCount;
1388 
1389  PTag pTags;
1390 
1391  /* --- V1 members --- */
1392 
1394 
1398 
1400 
1402 
1411 typedef struct {
1412  UINT32 version;
1413  UINT64 ttl;
1414  UINT32 uriCount;
1416  CHAR userName[MAX_ICE_CONFIG_USER_NAME_LEN + 1];
1417  CHAR password[MAX_ICE_CONFIG_CREDENTIAL_LEN + 1];
1419 
1420 typedef struct {
1422  CHAR storageStreamArn[MAX_ARN_LEN + 1];
1442 
1458 typedef STATUS (*SignalingClientErrorReportFunc)(UINT64, STATUS, PCHAR, UINT32);
1459 
1483 typedef struct {
1484  UINT32 version;
1485  UINT64 customData;
1489  GetCurrentTimeFunc getCurrentTimeFn;
1491 
1495 typedef struct {
1496  UINT32 version;
1497  CHAR channelArn[MAX_ARN_LEN + 1];
1498  CHAR channelName[MAX_CHANNEL_NAME_LEN + 1];
1501  CHAR updateVersion[MAX_UPDATE_VERSION_LEN + 1];
1503  UINT64 messageTtl;
1505  UINT64 creationTime;
1507 
1513 typedef struct {
1519 
1526 typedef struct {
1527  BOOL ordered;
1532  CHAR protocol[MAX_DATA_CHANNEL_PROTOCOL_LEN + 1];
1533  BOOL negotiated;
1541 
1553 typedef struct {
1554  UINT32 version;
1560 
1567 typedef struct {
1568  UINT32 version;
1573 
1577 typedef struct {
1578  UINT32 version;
1584 
1588 typedef struct {
1589  UINT32 version;
1592 
1596 typedef struct {
1597  UINT32 version;
1600 
1605 typedef struct {
1606  UINT64 timestamp;
1610 
1614 typedef struct {
1615  UINT32 targetBitrate;
1619  UINT16 width;
1620  UINT16 height;
1621  UINT16 bitDepth;
1631 
1647 
1657 
1665 PUBLIC_API STATUS freePeerConnection(PRtcPeerConnection*);
1666 
1680 
1691 
1702 
1713 
1723 
1733 
1742 PUBLIC_API STATUS peerConnectionAsync(startRoutine fn, PVOID data);
1743 
1756 
1769 
1782 
1792 PUBLIC_API STATUS serializeSessionDescriptionInit(PRtcSessionDescriptionInit, PCHAR, PUINT32);
1793 
1803 PUBLIC_API STATUS deserializeSessionDescriptionInit(PCHAR, UINT32, PRtcSessionDescriptionInit);
1804 
1814 PUBLIC_API STATUS deserializeRtcIceCandidateInit(PCHAR, UINT32, PRtcIceCandidateInit);
1815 
1828 
1841 
1852 PUBLIC_API STATUS restartIce(PRtcPeerConnection);
1853 
1863 PUBLIC_API STATUS closePeerConnection(PRtcPeerConnection);
1864 
1878 
1888 PUBLIC_API STATUS transceiverOnFrame(PRtcRtpTransceiver, UINT64, RtcOnFrame);
1889 
1900 
1911 
1922 PUBLIC_API STATUS freeTransceiver(PRtcRtpTransceiver*);
1923 
1929 PUBLIC_API STATUS initKvsWebRtc(VOID);
1930 
1936 PUBLIC_API STATUS deinitKvsWebRtc(VOID);
1937 
1948 PUBLIC_API STATUS addSupportedCodec(PRtcPeerConnection, RTC_CODEC);
1949 
1958 PUBLIC_API STATUS writeFrame(PRtcRtpTransceiver, PFrame);
1959 
1966 
1980 PUBLIC_API STATUS addIceCandidate(PRtcPeerConnection, PCHAR);
1981 
1999 
2009 PUBLIC_API STATUS dataChannelOnMessage(PRtcDataChannel, UINT64, RtcOnMessage);
2010 
2020 PUBLIC_API STATUS dataChannelOnOpen(PRtcDataChannel, UINT64, RtcOnOpen);
2021 
2035 PUBLIC_API STATUS dataChannelSend(PRtcDataChannel, BOOL, PBYTE, UINT32);
2036 
2050 PUBLIC_API STATUS discoverNatBehavior(PCHAR, NAT_BEHAVIOR*, NAT_BEHAVIOR*, IceSetInterfaceFilterFunc, UINT64);
2051 
2060 PUBLIC_API PCHAR getNatBehaviorStr(NAT_BEHAVIOR natBehavior);
2061 
2073 PUBLIC_API STATUS createSignalingClientSync(PSignalingClientInfo, PChannelInfo, PSignalingClientCallbacks, PAwsCredentialProvider,
2075 
2086 
2099 
2111 
2126 
2136 
2147 
2156 
2166 
2175 PUBLIC_API STATUS signalingClientGetStateString(SIGNALING_CLIENT_STATE, PCHAR*);
2176 
2194 
2202 
2210 
2218 
2237 
2245 PUBLIC_API STATUS createRtcCertificate(PRtcCertificate*);
2246 
2254 PUBLIC_API STATUS freeRtcCertificate(PRtcCertificate);
2255 
2257 #ifdef __cplusplus
2258 }
2259 #endif
2260 #endif /* __KINESIS_VIDEO_WEBRTC_CLIENT_INCLUDE__ */
CHAR DOMString[255U+1]
DOMString type is used to store strings of size 256 bytes (inclusive of '\0' character.
Definition: Stats.h:83
RTC_STATS_TYPE
Type of Stats object requested by the application Reference https://www.w3.org/TR/webrtc-stats/#rtcst...
Definition: Stats.h:107
VOID(* RtcOnOpen)(UINT64, PRtcDataChannel)
Definition: Include.h:1073
STATUS(* SignalingClientErrorReportFunc)(UINT64, STATUS, PCHAR, UINT32)
Definition: Include.h:1458
VOID(* RtcOnMessage)(UINT64, PRtcDataChannel, BOOL, PBYTE, UINT32)
RtcOnMessage is fired when a message is received for the DataChannel.
Definition: Include.h:1066
STATUS(* SignalingClientMessageReceivedFunc)(UINT64, PReceivedSignalingMessage)
Definition: Include.h:1441
VOID(* RtcOnDataChannel)(UINT64, PRtcDataChannel)
RtcOnDataChannel is fired when the remote PeerConnection creates a new DataChannel.
Definition: Include.h:1081
struct __RtcDataChannel * PRtcDataChannel
VOID(* RtcOnSenderBandwidthEstimation)(UINT64, UINT32, UINT32, UINT32, UINT32, UINT64)
RtcOnSenderBandwidthEstimation is fired everytime a bandwidth estimation value is computed by sender....
Definition: Include.h:1036
VOID(* RtcOnFrame)(UINT64, PFrame)
RtcOnFrame is fired everytime a frame is received from the remote peer. It is available via the RtpRe...
Definition: Include.h:1010
STATUS(* SignalingClientStateChangedFunc)(UINT64, SIGNALING_CLIENT_STATE)
Definition: Include.h:1473
struct __RtcDataChannel RtcDataChannel
RtcDataChannel represents a bi-directional data channel between two peers.
VOID(* RtcOnIceCandidate)(UINT64, PCHAR)
RtcOnIceCandidate is fired when new iceCandidate is found. if PCHAR is NULL then candidate gathering ...
Definition: Include.h:1088
BOOL(* IceSetInterfaceFilterFunc)(UINT64, PCHAR)
IceSetInterfaceFilterFunc is fired when a callback function to filter network interfaces is assigned....
Definition: Include.h:1094
VOID(* RtcOnPictureLoss)(UINT64)
RtcOnPictureLoss is fired everytime a Picture Loss Indication (PLI) feedback message is received....
Definition: Include.h:1047
VOID(* RtcOnConnectionStateChange)(UINT64, RTC_PEER_CONNECTION_STATE)
RtcOnConnectionStateChange is fired to report a change in peer connection state.
Definition: Include.h:1101
VOID(* RtcOnBandwidthEstimation)(UINT64, DOUBLE)
RtcOnBandwidthEstimation is fired everytime a bandwidth estimation value is computed....
Definition: Include.h:1019
#define MAX_ICE_CONFIG_URI_COUNT
Definition: Include.h:634
#define MAX_ICE_SERVERS_COUNT
Definition: Include.h:646
#define MAX_MEDIA_STREAM_ID_LEN
Definition: Include.h:515
#define MAX_ICE_CONFIG_CREDENTIAL_LEN
Definition: Include.h:480
#define MAX_RTCCONFIGURATION_CERTIFICATES
Definition: Include.h:520
#define MAX_ICE_CONFIG_USER_NAME_LEN
Definition: Include.h:474
#define MAX_DATA_CHANNEL_PROTOCOL_LEN
Definition: Include.h:540
#define MAX_MESSAGE_DESCRIPTION_LEN
Definition: Include.h:505
#define MAX_SESSION_DESCRIPTION_INIT_SDP_LEN
Definition: Include.h:510
#define MAX_SIGNALING_MESSAGE_LEN
Definition: Include.h:545
#define MAX_ICE_CANDIDATE_INIT_CANDIDATE_LEN
Definition: Include.h:530
#define MAX_ERROR_TYPE_STRING_LEN
Definition: Include.h:495
#define MAX_CORRELATION_ID_LEN
Definition: Include.h:490
#define MAX_SIGNALING_CLIENT_ID_LEN
Definition: Include.h:468
#define MAX_CHANNEL_NAME_LEN
Definition: Include.h:463
#define MAX_DATA_CHANNEL_NAME_LEN
Definition: Include.h:535
RTC_PEER_CONNECTION_STATE
RTC_PEER_CONNECTION_STATE Stats of RTC peer connection.
Definition: Include.h:820
RTC_RTP_TRANSCEIVER_DIRECTION
RTC_RTP_TRANSCEIVER_DIRECTION indicates direction of a transceiver.
Definition: Include.h:881
SIGNALING_CLIENT_STATE
Defines different states a signaling client traverses.
Definition: Include.h:914
SIGNALING_CHANNEL_ROLE_TYPE
Channel role type.
Definition: Include.h:953
SIGNALING_CHANNEL_TYPE
Channel type as reported by the service.
Definition: Include.h:945
SIGNALING_MESSAGE_TYPE
Defines different signaling messages.
Definition: Include.h:901
RTC_CODEC
The enum specifies the codec types for audio and video tracks.
Definition: Include.h:850
ICE_TRANSPORT_POLICY
ICE_TRANSPORT_POLICY restrict which ICE candidates are used in a session.
Definition: Include.h:869
MEDIA_STREAM_TRACK_KIND
The enum specifies the type of track in the stream.
Definition: Include.h:842
SDP_TYPE
Definition: Include.h:834
enum SIGNALING_CLIENT_STATE * PSIGNALING_CLIENT_STATE
SIGNALING_API_CALL_CACHE_TYPE
Type of caching implementation to use with the signaling client.
Definition: Include.h:974
SIGNALING_CHANNEL_STATUS
Defines channel status as reported by the service.
Definition: Include.h:891
NAT_BEHAVIOR
Detected network environment.
Definition: Include.h:962
@ RTC_PEER_CONNECTION_STATE_NONE
Starting state of peer connection.
Definition: Include.h:821
@ RTC_PEER_CONNECTION_TOTAL_STATE_COUNT
This state indicates maximum number of Peer connection states.
Definition: Include.h:828
@ RTC_PEER_CONNECTION_STATE_DISCONNECTED
This state is set when ICE Agent is disconnected.
Definition: Include.h:825
@ RTC_PEER_CONNECTION_STATE_CONNECTING
This state is set when ICE agent checks connection.
Definition: Include.h:823
@ RTC_PEER_CONNECTION_STATE_FAILED
This state is set when ICE Agent transitions to fail state.
Definition: Include.h:826
@ RTC_PEER_CONNECTION_STATE_NEW
This state is set when ICE Agent is waiting for remote credential.
Definition: Include.h:822
@ RTC_PEER_CONNECTION_STATE_CLOSED
This state leads to termination of streaming session.
Definition: Include.h:827
@ RTC_PEER_CONNECTION_STATE_CONNECTED
This state is set when CIE Agent is ready.
Definition: Include.h:824
@ RTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE
This indicates that the peer can not send or receive data.
Definition: Include.h:885
@ RTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV
This indicates that peer can send and receive data.
Definition: Include.h:882
@ RTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY
This indicates that the peer can only send information.
Definition: Include.h:883
@ RTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY
This indicates that the peer can only receive information.
Definition: Include.h:884
@ SIGNALING_CLIENT_STATE_UNKNOWN
Starting state of signaling client.
Definition: Include.h:915
@ SIGNALING_CLIENT_STATE_JOIN_SESSION
Definition: Include.h:935
@ SIGNALING_CLIENT_STATE_DESCRIBE_MEDIA
Definition: Include.h:934
@ SIGNALING_CLIENT_STATE_GET_ENDPOINT
This state is set to provide an endpoint for sending/receiving messages.
Definition: Include.h:922
@ SIGNALING_CLIENT_STATE_CONNECTED
On transitioning to this state, the timeout on the state machine is reset.
Definition: Include.h:929
@ SIGNALING_CLIENT_STATE_NEW
This state indicates a new client state.
Definition: Include.h:916
@ SIGNALING_CLIENT_STATE_READY
Definition: Include.h:925
@ SIGNALING_CLIENT_STATE_JOIN_SESSION_WAITING
Definition: Include.h:936
@ SIGNALING_CLIENT_STATE_GET_ICE_CONFIG
Definition: Include.h:923
@ SIGNALING_CLIENT_STATE_JOIN_SESSION_CONNECTED
Definition: Include.h:937
@ SIGNALING_CLIENT_STATE_DESCRIBE
Definition: Include.h:918
@ SIGNALING_CLIENT_STATE_MAX_VALUE
This state indicates maximum number of signaling client states.
Definition: Include.h:938
@ SIGNALING_CLIENT_STATE_DELETE
This state transition happens when the application calls signalingClientDeleteSync API.
Definition: Include.h:931
@ SIGNALING_CLIENT_STATE_DISCONNECTED
This state transition happens either from connect or connected state.
Definition: Include.h:930
@ SIGNALING_CLIENT_STATE_GET_CREDENTIALS
This state involves getting a token using AWS credentials.
Definition: Include.h:917
@ SIGNALING_CLIENT_STATE_DELETED
Definition: Include.h:932
@ SIGNALING_CLIENT_STATE_CREATE
Definition: Include.h:920
@ SIGNALING_CLIENT_STATE_CONNECTING
Definition: Include.h:927
@ SIGNALING_CHANNEL_ROLE_TYPE_MASTER
Channel role is master.
Definition: Include.h:955
@ SIGNALING_CHANNEL_ROLE_TYPE_VIEWER
Channel role is viewer.
Definition: Include.h:956
@ SIGNALING_CHANNEL_ROLE_TYPE_UNKNOWN
Channel role is unknown.
Definition: Include.h:954
@ SIGNALING_CHANNEL_TYPE_UNKNOWN
Channel type is unknown.
Definition: Include.h:946
@ SIGNALING_CHANNEL_TYPE_SINGLE_MASTER
Channel type is master.
Definition: Include.h:947
@ SIGNALING_MESSAGE_TYPE_STATUS_RESPONSE
This message notifies the awaiting send after checking for failure in message delivery.
Definition: Include.h:907
@ SIGNALING_MESSAGE_TYPE_RECONNECT_ICE_SERVER
This message moves signaling state back to get ICE config.
Definition: Include.h:906
@ SIGNALING_MESSAGE_TYPE_OFFER
This message type leads to checks in existence of peer id and payload in the message.
Definition: Include.h:902
@ SIGNALING_MESSAGE_TYPE_ANSWER
This message type leads to checks in length/existence of payload in the message.
Definition: Include.h:903
@ SIGNALING_MESSAGE_TYPE_UNKNOWN
This message type is set when the type of message received is unknown.
Definition: Include.h:908
@ SIGNALING_MESSAGE_TYPE_GO_AWAY
This message moves signaling back to describe state.
Definition: Include.h:905
@ SIGNALING_MESSAGE_TYPE_ICE_CANDIDATE
This message type leads to checks in length/existence of payload in the message.
Definition: Include.h:904
@ RTC_CODEC_ALAW
ALAW audio codec.
Definition: Include.h:855
@ RTC_CODEC_VP8
VP8 video codec.
Definition: Include.h:853
@ RTC_CODEC_AAC
AAC audio codec.
Definition: Include.h:858
@ RTC_CODEC_MULAW
MULAW audio codec.
Definition: Include.h:854
@ RTC_CODEC_UNKNOWN
Definition: Include.h:856
@ RTC_CODEC_H265
H265 video codec.
Definition: Include.h:857
@ RTC_CODEC_OPUS
OPUS audio codec.
Definition: Include.h:852
@ RTC_CODEC_MAX
Placeholder for max number of supported codecs.
Definition: Include.h:861
@ RTC_CODEC_H264_PROFILE_42E01F_LEVEL_ASYMMETRY_ALLOWED_PACKETIZATION_MODE
H264 video codec.
Definition: Include.h:851
@ ICE_TRANSPORT_POLICY_ALL
The ICE Agent can use any type of candidate when this value is specified.
Definition: Include.h:873
@ ICE_TRANSPORT_POLICY_RELAY
Definition: Include.h:870
@ MEDIA_STREAM_TRACK_KIND_VIDEO
Video track. Track information is set before add transceiver.
Definition: Include.h:844
@ MEDIA_STREAM_TRACK_KIND_AUDIO
Audio track. Track information is set before add transceiver.
Definition: Include.h:843
@ SDP_TYPE_ANSWER
SessionDescription is type answer.
Definition: Include.h:836
@ SDP_TYPE_OFFER
SessionDescription is type offer.
Definition: Include.h:835
@ SIGNALING_API_CALL_CACHE_TYPE_DESCRIBE_GETENDPOINT
Definition: Include.h:977
@ SIGNALING_API_CALL_CACHE_TYPE_NONE
No caching. The calls to the backend will be made for every API.
Definition: Include.h:975
@ SIGNALING_API_CALL_CACHE_TYPE_FILE
Definition: Include.h:986
@ SIGNALING_CHANNEL_STATUS_CREATING
Signaling channel is being created.
Definition: Include.h:892
@ SIGNALING_CHANNEL_STATUS_ACTIVE
Signaling channel is active.
Definition: Include.h:893
@ SIGNALING_CHANNEL_STATUS_DELETING
Signaling channel is being deleted.
Definition: Include.h:895
@ SIGNALING_CHANNEL_STATUS_UPDATING
Signaling channel is being updated.
Definition: Include.h:894
@ NAT_BEHAVIOR_NO_UDP_CONNECTIVITY
No UDP connectvity.
Definition: Include.h:965
@ NAT_BEHAVIOR_ENDPOINT_INDEPENDENT
Nat behavior is irregardless of change in external address.
Definition: Include.h:966
@ NAT_BEHAVIOR_NOT_BEHIND_ANY_NAT
Host is not behind any NAT.
Definition: Include.h:964
@ NAT_BEHAVIOR_PORT_DEPENDENT
Nat behavior changes when external address or port is changed.
Definition: Include.h:968
@ NAT_BEHAVIOR_NONE
Dummy placeholder.
Definition: Include.h:963
@ NAT_BEHAVIOR_ADDRESS_DEPENDENT
Nat behavior changes changes when external address is changed, but remain same if only port is change...
Definition: Include.h:967
PUBLIC_API STATUS initKvsWebRtc(VOID)
Initializes global state needed for all RtcPeerConnections. It must only be called once.
Definition: PeerConnection.c:1711
PUBLIC_API STATUS setLocalDescription(PRtcPeerConnection, PRtcSessionDescriptionInit)
Instructs the RtcPeerConnection to apply the supplied RtcSessionDescriptionInit as the local descript...
Definition: PeerConnection.c:1482
PUBLIC_API STATUS freeTransceiver(PRtcRtpTransceiver *)
Frees the previously created transceiver object.
Definition: Rtp.c:74
PUBLIC_API STATUS dataChannelSend(PRtcDataChannel, BOOL, PBYTE, UINT32)
Send data via the PRtcDataChannel.
Definition: DataChannel.c:52
PUBLIC_API STATUS addIceCandidate(PRtcPeerConnection, PCHAR)
Provides a remote candidate to the ICE Agent.
Definition: PeerConnection.c:1636
PUBLIC_API STATUS createOffer(PRtcPeerConnection, PRtcSessionDescriptionInit)
Populate the provided answer that contains an RFC 3264 offer with the supported configurations for th...
Definition: PeerConnection.c:1414
PUBLIC_API STATUS peerConnectionGetCurrentLocalDescription(PRtcPeerConnection, PRtcSessionDescriptionInit)
Definition: PeerConnection.c:1259
PUBLIC_API STATUS signalingClientGetIceConfigInfoCount(SIGNALING_CLIENT_HANDLE, PUINT32)
Gets the retrieved ICE configuration information object count.
Definition: Client.c:281
PUBLIC_API STATUS dataChannelOnOpen(PRtcDataChannel, UINT64, RtcOnOpen)
Set a callback for data channel open.
Definition: DataChannel.c:87
PUBLIC_API STATUS createSignalingClientSync(PSignalingClientInfo, PChannelInfo, PSignalingClientCallbacks, PAwsCredentialProvider, PSIGNALING_CLIENT_HANDLE)
Creates a Signaling client and returns a handle to it.
Definition: Client.c:55
PUBLIC_API STATUS peerConnectionOnSenderBandwidthEstimation(PRtcPeerConnection, UINT64, RtcOnSenderBandwidthEstimation)
Set a callback for transport-wide sender bandwidth estimation results.
Definition: PeerConnection.c:1201
PUBLIC_API STATUS writeFrame(PRtcRtpTransceiver, PFrame)
Packetizes and sends media via the configuration specified by the RtcRtpTransceiver.
Definition: Rtp.c:206
PUBLIC_API STATUS peerConnectionOnDataChannel(PRtcPeerConnection, UINT64, RtcOnDataChannel)
Definition: PeerConnection.c:1150
PUBLIC_API STATUS freePeerConnection(PRtcPeerConnection *)
Free a RtcPeerConnection.
Definition: PeerConnection.c:989
PUBLIC_API STATUS setRemoteDescription(PRtcPeerConnection, PRtcSessionDescriptionInit)
Instructs the RtcPeerConnection to apply the supplied RtcSessionDescriptionInit as the remote descrip...
Definition: PeerConnection.c:1304
PUBLIC_API STATUS rtcPeerConnectionGetMetrics(PRtcPeerConnection, PRtcRtpTransceiver, PRtcStats)
Get the relevant/all metrics based on the RTCStatsType field. This does not include any signaling rel...
Definition: Metrics.c:217
PUBLIC_API PCHAR getNatBehaviorStr(NAT_BEHAVIOR natBehavior)
Return the string representation for each NAT_BEHAVIOR enum.
Definition: NatBehaviorDiscovery.c:361
PUBLIC_API STATUS addConfigToServerList(PRtcPeerConnection *, PIceConfigInfo)
Give peer connection an ice config to add to its server list.
Definition: PeerConnection.c:1132
PUBLIC_API STATUS peerConnectionOnIceCandidate(PRtcPeerConnection, UINT64, RtcOnIceCandidate)
Set a callback when new Ice collects new local candidate.
Definition: PeerConnection.c:1107
PUBLIC_API STATUS addTransceiver(PRtcPeerConnection, PRtcMediaStreamTrack, PRtcRtpTransceiverInit, PRtcRtpTransceiver *)
Create a new RtcRtpTransceiver and add it to the set of transceivers.
Definition: PeerConnection.c:1498
PUBLIC_API STATUS signalingClientDisconnectSync(SIGNALING_CLIENT_HANDLE)
Disconnects the signaling client.
Definition: Client.c:247
PUBLIC_API STATUS createRtcCertificate(PRtcCertificate *)
Creates an RtcCertificate object.
Definition: Crypto.c:4
PUBLIC_API STATUS serializeSessionDescriptionInit(PRtcSessionDescriptionInit, PCHAR, PUINT32)
Create a JSON string from RtcSessionDescriptionInit.
Definition: SessionDescription.c:4
PUBLIC_API STATUS discoverNatBehavior(PCHAR, NAT_BEHAVIOR *, NAT_BEHAVIOR *, IceSetInterfaceFilterFunc, UINT64)
Use the process described in https://tools.ietf.org/html/rfc5780#section-4.3 to discover NAT behavior...
Definition: NatBehaviorDiscovery.c:259
PUBLIC_API STATUS createDataChannel(PRtcPeerConnection, PCHAR, PRtcDataChannelInit, PRtcDataChannel *)
createDataChannel creates a new RtcDataChannel object with the given label.
Definition: DataChannel.c:5
PUBLIC_API STATUS peerConnectionAsync(startRoutine fn, PVOID data)
Definition: PeerConnection.c:525
PUBLIC_API STATUS createAnswer(PRtcPeerConnection, PRtcSessionDescriptionInit)
Populate the provided answer that contains an RFC 3264 answer with the supported configurations for t...
Definition: PeerConnection.c:1454
PUBLIC_API STATUS peerConnectionGetMetrics(PRtcPeerConnection, PPeerConnectionMetrics)
Get peer connection related metrics.
Definition: PeerConnection.c:1901
PUBLIC_API STATUS dataChannelOnMessage(PRtcDataChannel, UINT64, RtcOnMessage)
Set a callback for data channel message.
Definition: DataChannel.c:70
PUBLIC_API STATUS transceiverOnPictureLoss(PRtcRtpTransceiver, UINT64, RtcOnPictureLoss)
Set a callback for picture loss packet (PLI)
Definition: Rtp.c:162
PUBLIC_API STATUS signalingClientGetIceConfigInfo(SIGNALING_CLIENT_HANDLE, UINT32, PIceConfigInfo *)
Gets the ICE configuration information object given its index.
Definition: Client.c:298
PUBLIC_API STATUS signalingClientGetStateString(SIGNALING_CLIENT_STATE, PCHAR *)
Definition: Client.c:343
PUBLIC_API STATUS closePeerConnection(PRtcPeerConnection)
Close the underlying DTLS session and IceAgent connection. Trigger RtcOnConnectionStateChange to RTC_...
Definition: PeerConnection.c:1675
PUBLIC_API STATUS signalingClientFetchSync(SIGNALING_CLIENT_HANDLE)
Fetches all assets needed to ready the state machine before attempting to connect....
Definition: Client.c:183
PUBLIC_API STATUS peerConnectionGetLocalDescription(PRtcPeerConnection, PRtcSessionDescriptionInit)
Definition: PeerConnection.c:1227
PUBLIC_API STATUS transceiverOnBandwidthEstimation(PRtcRtpTransceiver, UINT64, RtcOnBandwidthEstimation)
Set a callback for bandwidth estimation results.
Definition: Rtp.c:145
PUBLIC_API STATUS transceiverOnFrame(PRtcRtpTransceiver, UINT64, RtcOnFrame)
Set a callback for transceiver frame.
Definition: Rtp.c:128
PUBLIC_API STATUS deserializeSessionDescriptionInit(PCHAR, UINT32, PRtcSessionDescriptionInit)
Parses a JSON string and returns an allocated PSessionDescriptionInit.
Definition: SessionDescription.c:53
PUBLIC_API STATUS signalingClientGetCurrentState(SIGNALING_CLIENT_HANDLE, PSIGNALING_CLIENT_STATE)
Gets the Signaling client current state.
Definition: Client.c:315
PUBLIC_API STATUS updateEncoderStats(PRtcRtpTransceiver, PRtcEncoderStats)
call this function to update stats which depend on external encoder
Definition: Rtp.c:179
PUBLIC_API STATUS iceAgentGetMetrics(PRtcPeerConnection, PKvsIceAgentMetrics)
Get peer connection related metrics.
Definition: PeerConnection.c:1932
PUBLIC_API STATUS freeRtcCertificate(PRtcCertificate)
Frees previously generated RtcCertificate object.
Definition: Crypto.c:46
PUBLIC_API STATUS signalingClientConnectSync(SIGNALING_CLIENT_HANDLE)
Connects the signaling client to the web socket in order to send/receive messages.
Definition: Client.c:164
PUBLIC_API STATUS signalingClientGetMetrics(SIGNALING_CLIENT_HANDLE, PSignalingClientMetrics)
Get signaling related metrics.
Definition: Client.c:423
PUBLIC_API STATUS signalingClientDeleteSync(SIGNALING_CLIENT_HANDLE)
Deletes the signaling channel referenced by SIGNALING_CLIENT_HANDLE.
Definition: Client.c:264
PUBLIC_API STATUS createPeerConnection(PRtcConfiguration, PRtcPeerConnection *)
Initialize a RtcPeerConnection with the provided Configuration.
Definition: PeerConnection.c:891
PUBLIC_API STATUS restartIce(PRtcPeerConnection)
Instructs the RtcPeerConnection that ICE should be restarted. Subsequent calls to createOffer will cr...
Definition: PeerConnection.c:1652
PUBLIC_API NullableBool canTrickleIceCandidates(PRtcPeerConnection)
The canTrickleIceCandidates attribute indicates whether the remote peer is able to accept trickled IC...
Definition: PeerConnection.c:1694
PUBLIC_API STATUS deinitKvsWebRtc(VOID)
Deinitializes global state needed for all RtcPeerConnections. It must only be called once.
Definition: PeerConnection.c:1787
PUBLIC_API STATUS signalingClientSendMessageSync(SIGNALING_CLIENT_HANDLE, PSignalingMessage)
Send a message through a Signaling client.
Definition: Client.c:147
PUBLIC_API STATUS peerConnectionOnConnectionStateChange(PRtcPeerConnection, UINT64, RtcOnConnectionStateChange)
Definition: PeerConnection.c:1175
PUBLIC_API STATUS addSupportedCodec(PRtcPeerConnection, RTC_CODEC)
Adds to the list of codecs we support receiving.
Definition: PeerConnection.c:1607
PUBLIC_API STATUS deserializeRtcIceCandidateInit(PCHAR, UINT32, PRtcIceCandidateInit)
Parses a JSON string and populates a PRtcIceCandidateInit.
Definition: SessionDescription.c:1350
PUBLIC_API STATUS freeSignalingClient(PSIGNALING_CLIENT_HANDLE)
Frees the Signaling client object.
Definition: Client.c:124
struct SignalingClientCallbacks * PSignalingClientCallbacks
struct MediaStorageConfig * PMediaStorageConfig
struct SignalingClientInfo * PSignalingClientInfo
struct RtcIceServer * PRtcIceServer
struct RtcSessionDescriptionInit * PRtcSessionDescriptionInit
struct RtcRtpTransceiverInit * PRtcRtpTransceiverInit
struct KvsRtcConfiguration * PKvsRtcConfiguration
struct RtcRtpTransceiver * PRtcRtpTransceiver
struct RtcPeerConnection * PRtcPeerConnection
struct RtcMediaStreamTrack * PRtcMediaStreamTrack
struct RtcCertificate * PRtcCertificate
struct ReceivedSignalingMessage * PReceivedSignalingMessage
struct RtcConfiguration * PRtcConfiguration
struct ChannelInfo * PChannelInfo
struct SignalingMessage * PSignalingMessage
struct RtcDataChannelInit * PRtcDataChannelInit
struct RtcIceCandidateInit * PRtcIceCandidateInit
struct RtcRtpReceiver * PRtcRtpReceiver
struct SignalingChannelDescription * PSignalingChannelDescription
struct IceConfigInfo * PIceConfigInfo
#define MAX_ICE_CONFIG_URI_LEN
Definition: Stats.h:30
struct KvsIceAgentMetrics * PKvsIceAgentMetrics
struct RtcStreamMetrics * PRtcStreamMetrics
struct PeerConnectionMetrics * PPeerConnectionMetrics
struct RtcEncoderStats * PRtcEncoderStats
struct SignalingClientMetrics * PSignalingClientMetrics
struct RtcStats * PRtcStats
struct RtcIceMetrics * PRtcIceMetrics
UINT64 filterCustomData
Custom Data that can be populated by the developer while developing filter function.
Definition: Include.h:1220
PCHAR pRegion
Definition: Include.h:1352
UINT32 tagCount
Number of tags associated with the stream.
Definition: Include.h:1387
PCHAR pKmsKeyId
Optional KMS key id ARN. Maximum length is defined by MAX_ARN_LEN+1.
Definition: Include.h:1367
UINT32 uriCount
Number of Ice URI objects.
Definition: Include.h:1414
MEDIA_STREAM_TRACK_KIND kind
Kind of track - audio or video.
Definition: Include.h:1132
BOOL retry
Flag determines if a retry of the network calls is to be done on errors up to max retry times.
Definition: Include.h:1380
UINT64 signalingEndTime
Definition: Include.h:1580
BOOL storageStatus
Indicate the association between channelArn and storageStreamArn.
Definition: Include.h:1421
RtcIceServerStats rtcIceServerStats
Server related stats. Reference in Stats.h.
Definition: Include.h:1555
PCHAR pCertPath
Optional certificate path. Maximum length is defined by MAX_PATH_LEN+1.
Definition: Include.h:1358
UINT32 version
Version of peer connection structure.
Definition: Include.h:1120
SignalingClientStats signalingClientStats
Signaling client metrics stats. Reference in Stats.h.
Definition: Include.h:1582
UINT64 SIGNALING_CLIENT_HANDLE
Definition of the signaling client handle.
Definition: Include.h:790
UINT32 signalingMessagesMinimumThreads
Unused field post v1.8.1.
Definition: Include.h:1335
UINT32 sendBufSize
Socket send buffer length. Item larger then this size will get dropped. Use system default if 0.
Definition: Include.h:1218
UINT32 version
Version of the SignalingChannelDescription struct.
Definition: Include.h:1496
UINT32 version
Current version of the structure.
Definition: Include.h:1290
UINT32 version
Current version of the structure.
Definition: Include.h:1484
UINT32 certificateSize
Size of certificate in bytes (optional)
Definition: Include.h:1178
RtcRemoteInboundRtpStreamStats rtcInboundStats
Inbound RTP Stats. Reference in Stats.h.
Definition: Include.h:1569
UINT32 signalingMessagesMaximumThreads
Unused field post v1.8.1.
Definition: Include.h:1336
PTag pTags
Stream tags array.
Definition: Include.h:1389
UINT32 iceLocalCandidateGatheringTimeout
Definition: Include.h:1198
BOOL reserved
Reserved field for compatibility.
Definition: Include.h:1373
BOOL enableIceStats
Enable ICE stats to be calculated.
Definition: Include.h:1227
UINT64 messageTtl
Definition: Include.h:1503
PCHAR pChannelArn
Definition: Include.h:1347
KvsIceAgentStats kvsIceAgentStats
ICE agent metrics. Reference in Stats.h.
Definition: Include.h:1590
NullableUint16 maxRetransmits
Control number of times a channel retransmits data if not delivered successfully.
Definition: Include.h:1531
ICE_TRANSPORT_POLICY iceTransportPolicy
Indicates which candidates the ICE Agent is allowed to use.
Definition: Include.h:1237
UINT32 id
Definition: Include.h:1056
SIGNALING_CHANNEL_TYPE channelType
Channel type when creating.
Definition: Include.h:1369
DOUBLE rollingBufferBitratebps
Definition: Include.h:1516
SignalingClientErrorReportFunc errorReportFn
Error reporting function. This is an optional member.
Definition: Include.h:1487
RtcIceCandidatePairStats rtcIceCandidatePairStats
Candidate pair stats. Reference in Stats.h.
Definition: Include.h:1558
RtcTransportStats rtcTransportStats
Transport stats. Reference in Stats.h.
Definition: Include.h:1571
UINT64 signalingCallTime
Definition: Include.h:1581
RTC_CODEC codec
non-standard, codec that the track is using
Definition: Include.h:1129
SDP_TYPE type
Indicates an offer/answer SDP type.
Definition: Include.h:1268
RtcIceCandidateStats localRtcIceCandidateStats
Local candidate stats. Reference in Stats.h.
Definition: Include.h:1556
KvsRtcConfiguration kvsRtcConfiguration
Non-standard configuration options.
Definition: Include.h:1239
RTC_RTP_TRANSCEIVER_DIRECTION direction
Transceiver direction - SENDONLY, RECVONLY, SENDRECV.
Definition: Include.h:1514
UINT64 cachingPeriod
Definition: Include.h:1375
UINT32 version
Version of the structure.
Definition: Include.h:1343
UINT32 version
Version of the struct.
Definition: Include.h:1412
RtcOutboundRtpStreamStats rtcOutboundStats
Outbound RTP Stats. Reference in Stats.h.
Definition: Include.h:1570
RTC_RTP_TRANSCEIVER_DIRECTION direction
Transceiver direction.
Definition: Include.h:1155
UINT16 bitDepth
Only valid for video. bits per pixel (24, 30, 36), note it's not per channel but per pixel.
Definition: Include.h:1621
KvsRetryStrategyCallbacks signalingRetryStrategyCallbacks
Retry strategy callbacks used while creating signaling client.
Definition: Include.h:1331
SignalingClientStateChangedFunc stateChangeFn
Signaling client state change callback.
Definition: Include.h:1488
BOOL negotiated
Definition: Include.h:1533
UINT32 loggingLevel
Definition: Include.h:1323
UINT32 stateMachineRetryCountReadOnly
Definition: Include.h:1333
PCHAR pUserAgent
Combined user agent. Maximum length is defined by MAX_USER_AGENT_LEN+1.
Definition: Include.h:1365
UINT16 width
Only valid for video.
Definition: Include.h:1619
SIGNALING_CHANNEL_STATUS channelStatus
Current channel status as reported by the service.
Definition: Include.h:1499
BOOL useMediaStorage
use the feature of media storage.
Definition: Include.h:1399
SIGNALING_CHANNEL_TYPE channelType
Channel type as reported by the service.
Definition: Include.h:1500
SERVICE_CALL_RESULT statusCode
Response status code.
Definition: Include.h:1310
RtcRtpReceiver receiver
RtcRtpReceiver that has track specific information.
Definition: Include.h:1156
RtcMediaStreamTrack track
Track with details of codec, trackId, streamId and track kind.
Definition: Include.h:1145
UINT32 version
Structure version.
Definition: Include.h:1578
UINT64 ttl
TTL of the configuration is 100ns.
Definition: Include.h:1413
UINT64 creationTime
Timestamp of when the channel gets created.
Definition: Include.h:1505
UINT64 messageTtl
Definition: Include.h:1384
UINT32 version
Structure version.
Definition: Include.h:1568
BOOL asyncIceServerConfig
Definition: Include.h:1395
PeerConnectionStats peerConnectionStats
Peer connection metrics stats. Reference in Stats.h.
Definition: Include.h:1598
BOOL voiceActivity
Only valid for audio. TRUE if last audio packet contained voice.
Definition: Include.h:1623
SIGNALING_MESSAGE_TYPE messageType
Type of signaling message.
Definition: Include.h:1292
UINT32 version
Version of the structure.
Definition: Include.h:1321
PBYTE pCertificate
Certificate bits.
Definition: Include.h:1177
BOOL generateRSACertificate
Definition: Include.h:1215
UINT32 encodeTimeMsec
milliseconds spent encoding frames since last encoder update
Definition: Include.h:1622
UINT32 privateKeySize
Size of private key in bytes (optional)
Definition: Include.h:1182
RTC_STATS_TYPE requestedTypeOfStats
Type of stats requested. Set to RTC_ALL to get all supported stats.
Definition: Include.h:1607
UINT64 signalingStartTime
Definition: Include.h:1579
BOOL useTrickleIce
Indicates if an offer should set trickle ice.
Definition: Include.h:1269
UINT64 customData
Custom data passed by the caller.
Definition: Include.h:1485
BOOL disableSenderSideBandwidthEstimation
Definition: Include.h:1225
PCHAR cacheFilePath
Definition: Include.h:1326
PCHAR pControlPlaneUrl
Definition: Include.h:1355
SIGNALING_CHANNEL_ROLE_TYPE channelRoleType
Channel role type for the endpoint - master/viewer.
Definition: Include.h:1371
SIGNALING_API_CALL_CACHE_TYPE cachingPolicy
Backend API call caching policy.
Definition: Include.h:1393
DOUBLE rollingBufferDurationSec
Maximum duration of media that needs to be buffered (in seconds). The lowest allowed is 0....
Definition: Include.h:1515
UINT32 iceConnectionCheckTimeout
Definition: Include.h:1201
PBYTE pPrivateKey
Private key bit.
Definition: Include.h:1181
GetCurrentTimeFunc getCurrentTimeFn
callback to override system time, used for testing clock skew
Definition: Include.h:1489
UINT32 targetBitrate
Definition: Include.h:1615
NullableUint16 maxPacketLifeTime
Definition: Include.h:1528
UINT32 iceCandidateNominationTimeout
Definition: Include.h:1204
PCHAR pStorageStreamArn
Definition: Include.h:1349
UINT32 payloadLen
Optional payload length. If 0, the length will be calculated.
Definition: Include.h:1298
BOOL ordered
Decides the order in which data is sent. If true, data is sent in order.
Definition: Include.h:1527
UINT32 iceConnectionCheckPollingInterval
Definition: Include.h:1208
CHAR name[255+1]
Define name of data channel. Max length is 256 characters.
Definition: Include.h:1055
UINT32 version
Structure version.
Definition: Include.h:1589
PCHAR pChannelName
Name of the signaling channel name. Maximum length is defined by MAX_CHANNEL_NAME_LEN + 1.
Definition: Include.h:1345
SignalingMessage signalingMessage
Definition: Include.h:1307
UINT64 timestamp
Timestamp of request for stats.
Definition: Include.h:1606
PCHAR pCustomUserAgent
Optional custom user agent name. Maximum length is defined by MAX_USER_AGENT_LEN+1.
Definition: Include.h:1363
SIGNALING_CLIENT_HANDLE * PSIGNALING_CLIENT_HANDLE
Definition: Include.h:791
UINT32 version
Structure version.
Definition: Include.h:1554
UINT16 height
Only valid for video.
Definition: Include.h:1620
IceSetInterfaceFilterFunc iceSetInterfaceFilterFunc
Definition: Include.h:1222
INT32 generatedCertificateBits
Definition: Include.h:1211
UINT16 maximumTransmissionUnit
Definition: Include.h:1193
SignalingClientMessageReceivedFunc messageReceivedFn
Callback registration for received SDP.
Definition: Include.h:1486
BOOL reconnect
Flag determines if reconnection should be attempted on connection drop.
Definition: Include.h:1382
PCHAR pUserAgentPostfix
Definition: Include.h:1360
INT32 signalingClientCreationMaxRetryAttempts
Max attempts to create signaling client before returning error to the caller.
Definition: Include.h:1332
UINT32 version
Structure version.
Definition: Include.h:1597
RtcStatsObject rtcStatsObject
Object that is populated by the SDK on request.
Definition: Include.h:1608
RtcIceCandidateStats remoteRtcIceCandidateStats
Remote candidate stats. Reference in Stats.h.
Definition: Include.h:1557
DOMString encoderImplementation
encoder name eg "libvpx" or "x264"
Definition: Include.h:1624
Contains all signaling channel related information.
Definition: Include.h:1342
ICE configuration information struct.
Definition: Include.h:1411
KVS ICE Agent Collection of ICE agent related stats. Can be expanded in the future.
Definition: Include.h:1588
: IceAgent profiling Stats related to the KVS ICE Agent
Definition: Stats.h:260
Definition: Include.h:1192
Definition: Include.h:1420
Definition: NullableDefs.h:60
Custom data type to allow setting UINT16 data type to NULL since C does not support setting basic dat...
Definition: NullableDefs.h:87
SignalingStats Collection of signaling related stats. Can be expanded in the future.
Definition: Include.h:1596
Definition: Stats.h:637
Structure defining the signaling message to be received.
Definition: Include.h:1306
Specifies the certificate and the private key used by the certificate. The Certificates are in the fo...
Definition: Include.h:1175
The Configuration defines a set of parameters to configure how the peer-to-peer communication establi...
Definition: Include.h:1236
RtcDataChannelInit dictionary used to configure properties of the underlying channel such as data rel...
Definition: Include.h:1526
The stats object is populated by the application to include details about the encoder.
Definition: Include.h:1614
Rtc ICE candidate interface.
Definition: Include.h:1280
RtcIceCandidatePairStats Stats related to the local-remote ICE candidate pair.
Definition: Stats.h:202
: RtcIceCandidateStats Stats related to a specific candidate in a pair
Definition: Stats.h:279
Statistics relted to ICE candidates.
Definition: Include.h:1553
: RtcIceServerStats Stats related to the ICE Server
Definition: Stats.h:245
RtcIceServer is used to describe the STUN and TURN servers that can be used by the ICE Agent to estab...
Definition: Include.h:1165
Represents a single track in a MediaStream.
Definition: Include.h:1128
RtcOutboundRtpStreamStats Gathers stats for media stream from the embedded device Note: RTCOutboundRt...
Definition: Stats.h:356
An RtcPeerConnection instance allows an application to establish peer-to-peer communications with ano...
Definition: Include.h:1119
RTCRemoteInboundRtpStreamStats Represents the remote endpoint's measurement metrics for a particular ...
Definition: Stats.h:408
RTCRtpReceiver allows an application to inspect the receipt of a MediaStreamTrack.
Definition: Include.h:1144
RtcRtpTransceiverInit is used to configure a transceiver when creating it.
Definition: Include.h:1513
The RTCRtpTransceiver represents a combination of an RTCRtpSender and an RTCRtpReceiver that share a ...
Definition: Include.h:1154
SessionDescription is used by RtcPeerConnection to expose local and remote session descriptions.
Definition: Include.h:1267
RTCStatsObject Represents an object passed in by the application developer which will be populated in...
Definition: Stats.h:652
The stats object is populated based on RTCStatsType request.
Definition: Include.h:1605
Collection of RTP stream related stats Reference: https://www.w3.org/TR/webrtc-stats/#remoteinboundrt...
Definition: Include.h:1567
RtcTransportStats Represents the stats corresponding to an RTCDtlsTransport and its underlying RTCIce...
Definition: Stats.h:296
Signaling channel description returned from the service.
Definition: Include.h:1495
Register Signaling client callbacks.
Definition: Include.h:1483
Populate Signaling client with client ID and application log level.
Definition: Include.h:1320
SignalingStats Collection of signaling related stats. Can be expanded in the future.
Definition: Include.h:1577
SignalingClientMetrics Represent the stats related to the KVS WebRTC SDK signaling client.
Definition: Stats.h:584
Structure defining the basic signaling message.
Definition: Include.h:1289
RtcDataChannel represents a bi-directional data channel between two peers.
Definition: Include.h:1054