4 #ifndef __KINESIS_VIDEO_PRODUCER_INCLUDE__
5 #define __KINESIS_VIDEO_PRODUCER_INCLUDE__
16 #include <com/amazonaws/kinesis/video/client/Include.h>
26 #define STATUS_PRODUCER_BASE 0x15000000
27 #define STATUS_STOP_CALLBACK_CHAIN STATUS_PRODUCER_BASE + 0x00000001
28 #define STATUS_MAX_CALLBACK_CHAIN STATUS_PRODUCER_BASE + 0x00000002
29 #define STATUS_INVALID_PLATFORM_CALLBACKS_VERSION STATUS_PRODUCER_BASE + 0x00000003
30 #define STATUS_INVALID_PRODUCER_CALLBACKS_VERSION STATUS_PRODUCER_BASE + 0x00000004
31 #define STATUS_INVALID_STREAM_CALLBACKS_VERSION STATUS_PRODUCER_BASE + 0x00000005
32 #define STATUS_INVALID_AUTH_CALLBACKS_VERSION STATUS_PRODUCER_BASE + 0x00000006
33 #define STATUS_INVALID_API_CALLBACKS_VERSION STATUS_PRODUCER_BASE + 0x00000007
34 #define STATUS_INVALID_DESCRIBE_STREAM_RETURN_JSON STATUS_PRODUCER_BASE + 0x0000000f
35 #define STATUS_MAX_USER_AGENT_NAME_POSTFIX_LEN_EXCEEDED STATUS_PRODUCER_BASE + 0x00000013
36 #define STATUS_MAX_CUSTOM_USER_AGENT_LEN_EXCEEDED STATUS_PRODUCER_BASE + 0x00000014
37 #define STATUS_INVALID_ENDPOINT_CACHING_PERIOD STATUS_PRODUCER_BASE + 0x00000016
38 #define STATUS_DUPLICATE_PRODUCER_CALLBACK_FREE_FUNC STATUS_PRODUCER_BASE + 0x00000019
39 #define STATUS_DUPLICATE_STREAM_CALLBACK_FREE_FUNC STATUS_PRODUCER_BASE + 0x0000001a
40 #define STATUS_DUPLICATE_AUTH_CALLBACK_FREE_FUNC STATUS_PRODUCER_BASE + 0x0000001b
41 #define STATUS_DUPLICATE_API_CALLBACK_FREE_FUNC STATUS_PRODUCER_BASE + 0x0000001c
42 #define STATUS_FILE_LOGGER_INDEX_FILE_TOO_LARGE STATUS_PRODUCER_BASE + 0x0000001d
43 #define STATUS_STREAM_BEING_SHUTDOWN STATUS_PRODUCER_BASE + 0x00000026
44 #define STATUS_CLIENT_BEING_SHUTDOWN STATUS_PRODUCER_BASE + 0x00000027
45 #define STATUS_CONTINUOUS_RETRY_RESET_FAILED STATUS_PRODUCER_BASE + 0x00000028
51 #define IS_RETRIABLE_PRODUCER_ERROR(error) \
52 ((error) == STATUS_INVALID_DESCRIBE_STREAM_RETURN_JSON || (error) == STATUS_STREAM_BEING_SHUTDOWN || (error) == STATUS_CLIENT_BEING_SHUTDOWN)
57 #define MAX_CALLBACK_CHAIN_COUNT 20
62 #define DEFAULT_CALLBACK_CHAIN_COUNT 5
76 #define PRODUCER_CALLBACKS_CURRENT_VERSION 0
80 #define PLATFORM_CALLBACKS_CURRENT_VERSION 0
84 #define STREAM_CALLBACKS_CURRENT_VERSION 0
88 #define AUTH_CALLBACKS_CURRENT_VERSION 0
92 #define API_CALLBACKS_CURRENT_VERSION 0
366 PUBLIC_API STATUS
createDefaultCallbacksProviderWithIotCertificateAndTimeouts(PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, UINT64,
367 UINT64, PClientCallbacks*);
STATUS(* FreeAuthCallbacksFunc)(PUINT64)
Frees auth callbacks.
Definition: Include.h:138
STATUS(* FreeStreamCallbacksFunc)(PUINT64)
Frees stream callbacks.
Definition: Include.h:129
STATUS(* FreePlatformCallbacksFunc)(PUINT64)
Frees platform callbacks.
Definition: Include.h:111
STATUS(* FreeProducerCallbacksFunc)(PUINT64)
Frees producer callbacks.
Definition: Include.h:120
STATUS(* FreeApiCallbacksFunc)(PUINT64)
Frees API callbacks.
Definition: Include.h:147
API_CALL_CACHE_TYPE
Definition: Include.h:269
@ API_CALL_CACHE_TYPE_ENDPOINT_ONLY
Definition: Include.h:278
@ API_CALL_CACHE_TYPE_NONE
No caching. The callbacks provider will make backend API calls every time PIC requests.
Definition: Include.h:271
@ API_CALL_CACHE_TYPE_ALL
Definition: Include.h:292
PUBLIC_API STATUS createRealtimeAudioVideoStreamInfoProviderWithCodecs(PCHAR, UINT64, UINT64, VIDEO_CODEC_ID, AUDIO_CODEC_ID, PStreamInfo *)
Definition: StreamInfoProvider.c:44
PUBLIC_API STATUS freeFileAuthCallbacks(PAuthCallbacks *)
Definition: FileAuthCallbacks.c:64
PUBLIC_API STATUS setDeviceInfoStorageSize(PDeviceInfo, UINT64)
Definition: DeviceInfoProvider.c:79
PUBLIC_API STATUS createCredentialProviderAuthCallbacks(PClientCallbacks, PAwsCredentialProvider, PAuthCallbacks *)
Definition: CredentialProviderAuthCallbacks.c:10
STATUS addFileLoggerWithFilteringPlatformCallbacksProvider(PClientCallbacks, UINT64, UINT64, PCHAR, BOOL, BOOL, UINT32)
Definition: FileLoggerPlatformCallbackProvider.c:52
PUBLIC_API STATUS createIotAuthCallbacksWithTimeouts(PClientCallbacks, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, UINT64, UINT64, PAuthCallbacks *)
Definition: IotAuthCallback.c:64
PUBLIC_API STATUS createDefaultCallbacksProviderWithAuthCallbacks(PAuthCallbacks, PCHAR, PCHAR, PCHAR, PCHAR, PClientCallbacks *)
Definition: CallbacksProvider.c:252
PUBLIC_API STATUS createFileAuthCallbacks(PClientCallbacks, PCHAR, PAuthCallbacks *)
Definition: FileAuthCallbacks.c:10
PUBLIC_API STATUS freeStaticAuthCallbacks(PAuthCallbacks *)
Definition: StaticAuthCallbacks.c:67
PUBLIC_API STATUS createStaticAuthCallbacks(PClientCallbacks, PCHAR, PCHAR, PCHAR, UINT64, PAuthCallbacks *)
Definition: StaticAuthCallbacks.c:10
PUBLIC_API STATUS addAuthCallbacks(PClientCallbacks, PAuthCallbacks)
Definition: CallbacksProvider.c:640
PUBLIC_API STATUS createAbstractDefaultCallbacksProvider(UINT32, API_CALL_CACHE_TYPE, UINT64, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PClientCallbacks *)
Definition: CallbacksProvider.c:289
PUBLIC_API STATUS addFileLoggerPlatformCallbacksProvider(PClientCallbacks, UINT64, UINT64, PCHAR, BOOL)
Definition: FileLoggerPlatformCallbackProvider.c:19
PUBLIC_API STATUS createOfflineVideoStreamInfoProviderWithCodecs(PCHAR, UINT64, UINT64, VIDEO_CODEC_ID, PStreamInfo *)
Definition: StreamInfoProvider.c:38
PUBLIC_API STATUS createRealtimeVideoStreamInfoProvider(PCHAR, UINT64, UINT64, PStreamInfo *)
Definition: StreamInfoProvider.c:8
PUBLIC_API STATUS createRealtimeAudioVideoStreamInfoProvider(PCHAR, UINT64, UINT64, PStreamInfo *)
Definition: StreamInfoProvider.c:18
PUBLIC_API STATUS createOfflineAudioVideoStreamInfoProviderWithCodecs(PCHAR, UINT64, UINT64, VIDEO_CODEC_ID, AUDIO_CODEC_ID, PStreamInfo *)
Definition: StreamInfoProvider.c:51
PUBLIC_API STATUS freeDeviceInfo(PDeviceInfo *)
Definition: DeviceInfoProvider.c:116
PUBLIC_API STATUS createRealtimeVideoStreamInfoProviderWithCodecs(PCHAR, UINT64, UINT64, VIDEO_CODEC_ID, PStreamInfo *)
Definition: StreamInfoProvider.c:32
PUBLIC_API STATUS createDefaultCallbacksProviderWithIotCertificate(PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PClientCallbacks *)
Definition: CallbacksProvider.c:112
PUBLIC_API STATUS createContinuousRetryStreamCallbacks(PClientCallbacks, PStreamCallbacks *)
Definition: ContinuousRetryStreamCallbacks.c:7
PUBLIC_API STATUS addStreamCallbacks(PClientCallbacks, PStreamCallbacks)
Definition: CallbacksProvider.c:560
PUBLIC_API STATUS createOfflineAudioStreamInfoProviderWithCodecs(PCHAR, UINT64, UINT64, AUDIO_CODEC_ID, PStreamInfo *)
Definition: StreamInfoProvider.c:65
PUBLIC_API STATUS createRealtimeAudioStreamInfoProviderWithCodecs(PCHAR, UINT64, UINT64, AUDIO_CODEC_ID, PStreamInfo *)
Definition: StreamInfoProvider.c:58
PUBLIC_API STATUS createIotAuthCallbacks(PClientCallbacks, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PAuthCallbacks *)
Definition: IotAuthCallback.c:10
PUBLIC_API STATUS createOfflineAudioVideoStreamInfoProvider(PCHAR, UINT64, UINT64, PStreamInfo *)
Definition: StreamInfoProvider.c:25
PUBLIC_API STATUS freeCallbacksProvider(PClientCallbacks *)
Definition: CallbacksProvider.c:357
PUBLIC_API STATUS freeContinuousRetryStreamCallbacks(PStreamCallbacks *)
Definition: ContinuousRetryStreamCallbacks.c:62
PUBLIC_API STATUS setStreamInfoBasedOnStorageSize(UINT32, UINT64, UINT32, PStreamInfo)
Definition: StreamInfoProvider.c:330
PUBLIC_API STATUS createDefaultCallbacksProviderWithAwsCredentials(PCHAR, PCHAR, PCHAR, UINT64, PCHAR, PCHAR, PCHAR, PCHAR, PClientCallbacks *)
Definition: CallbacksProvider.c:66
PUBLIC_API STATUS addProducerCallbacks(PClientCallbacks, PProducerCallbacks)
Definition: CallbacksProvider.c:515
PUBLIC_API STATUS createOfflineVideoStreamInfoProvider(PCHAR, UINT64, UINT64, PStreamInfo *)
Definition: StreamInfoProvider.c:13
PUBLIC_API STATUS freeStreamInfoProvider(PStreamInfo *)
Definition: StreamInfoProvider.c:72
PUBLIC_API STATUS createDefaultCallbacksProviderWithIotCertificateAndTimeouts(PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, UINT64, UINT64, PClientCallbacks *)
Definition: CallbacksProvider.c:159
PUBLIC_API STATUS freeCredentialProviderAuthCallbacks(PAuthCallbacks *)
Definition: CredentialProviderAuthCallbacks.c:66
PUBLIC_API STATUS createStreamCallbacks(PStreamCallbacks *)
Definition: StreamCallbacksProvider.c:126
PUBLIC_API STATUS createDefaultDeviceInfo(PDeviceInfo *)
Definition: DeviceInfoProvider.c:7
PUBLIC_API STATUS setDeviceInfoStorageSizeBasedOnBitrateAndBufferDuration(PDeviceInfo, UINT64, UINT64)
Definition: DeviceInfoProvider.c:95
PUBLIC_API STATUS freeIotAuthCallbacks(PAuthCallbacks *)
Definition: IotAuthCallback.c:121
PUBLIC_API STATUS setPlatformCallbacks(PClientCallbacks, PPlatformCallbacks)
Definition: CallbacksProvider.c:441
PUBLIC_API STATUS addApiCallbacks(PClientCallbacks, PApiCallbacks)
Definition: CallbacksProvider.c:692
PUBLIC_API STATUS freeStreamCallbacks(PStreamCallbacks *)
Definition: StreamCallbacksProvider.c:169
PUBLIC_API STATUS createDefaultCallbacksProviderWithFileAuth(PCHAR, PCHAR, PCHAR, PCHAR, PCHAR, PClientCallbacks *)
Definition: CallbacksProvider.c:207
struct __AuthCallbacks * PAuthCallbacks
Definition: Include.h:238
struct __ProducerCallbacks * PProducerCallbacks
Definition: Include.h:195
struct __PlatformCallbacks * PPlatformCallbacks
Definition: Include.h:181
struct __ApiCallbacks * PApiCallbacks
Definition: Include.h:255
struct __StreamCallbacks * PStreamCallbacks
Definition: Include.h:220
Definition: Include.h:244
FreeApiCallbacksFunc freeApiCallbacksFn
Specialized cleanup callback.
Definition: Include.h:253
PutStreamFunc putStreamFn
The PutStreamFunc callback function.
Definition: Include.h:250
UINT32 version
Version.
Definition: Include.h:245
GetStreamingEndpointFunc getStreamingEndpointFn
The GetStreamingEndpointFunc callback function.
Definition: Include.h:249
UINT64 customData
Custom data to be passed back to the caller.
Definition: Include.h:246
DescribeStreamFunc describeStreamFn
The DescribeStreamFunc callback function.
Definition: Include.h:248
CreateDeviceFunc createDeviceFn
The CreateDeviceFunc callback function.
Definition: Include.h:252
CreateStreamFunc createStreamFn
The CreateStreamFunc callback function.
Definition: Include.h:247
TagResourceFunc tagResourceFn
The TagResourceFunc callback function.
Definition: Include.h:251
Definition: Include.h:226
GetDeviceCertificateFunc getDeviceCertificateFn
The GetDeviceCertificateFunc callback function.
Definition: Include.h:230
GetStreamingTokenFunc getStreamingTokenFn
The GetStreamingTokenFunc callback function.
Definition: Include.h:233
GetSecurityTokenFunc getSecurityTokenFn
The GetSecurityTokenFunc callback function.
Definition: Include.h:229
DeviceCertToTokenFunc deviceCertToTokenFn
The DeviceCertToTokenFunc callback function.
Definition: Include.h:231
UINT64 customData
Custom data to be passed back to the caller.
Definition: Include.h:228
UINT32 version
Version.
Definition: Include.h:227
GetDeviceFingerprintFunc getDeviceFingerprintFn
The GetDeviceFingerprintFunc callback function.
Definition: Include.h:232
FreeAuthCallbacksFunc freeAuthCallbacksFn
Definition: Include.h:236
Definition: Include.h:551
Definition: Include.h:187
StorageOverflowPressureFunc storageOverflowPressureFn
The StorageOverflowPressureFunc callback function.
Definition: Include.h:190
FreeProducerCallbacksFunc freeProducerCallbacksFn
Specialized cleanup callback.
Definition: Include.h:193
UINT32 version
Version.
Definition: Include.h:188
UINT64 customData
Custom data to be passed back to the caller.
Definition: Include.h:189
ClientReadyFunc clientReadyFn
The ClientReadyFunc callback function.
Definition: Include.h:191
ClientShutdownFunc clientShutdownFn
The ClientShutdownFunc callback function.
Definition: Include.h:192
Definition: Include.h:201
FragmentAckReceivedFunc fragmentAckReceivedFn
The FragmentAckReceivedFunc callback function.
Definition: Include.h:211
DroppedFrameReportFunc droppedFrameReportFn
The DroppedFrameReportFunc callback function.
Definition: Include.h:208
FreeStreamCallbacksFunc freeStreamCallbacksFn
Definition: Include.h:218
UINT64 customData
Custom data to be passed back to the caller.
Definition: Include.h:203
StreamLatencyPressureFunc streamLatencyPressureFn
The StreamLatencyPressureFunc callback function.
Definition: Include.h:206
StreamConnectionStaleFunc streamConnectionStaleFn
The StreamConnectionStaleFunc callback function.
Definition: Include.h:207
StreamReadyFunc streamReadyFn
The StreamReadyFunc callback function.
Definition: Include.h:213
StreamDataAvailableFunc streamDataAvailableFn
The StreamDataAvailableFunc callback function.
Definition: Include.h:212
StreamShutdownFunc streamShutdownFn
The StreamShutdownFunc callback function.
Definition: Include.h:215
StreamClosedFunc streamClosedFn
The StreamClosedFunc callback function.
Definition: Include.h:214
DroppedFragmentReportFunc droppedFragmentReportFn
The DroppedFragmentReportFunc callback function.
Definition: Include.h:209
StreamUnderflowReportFunc streamUnderflowReportFn
The StreamUnderflowReportFunc callback function.
Definition: Include.h:204
StreamErrorReportFunc streamErrorReportFn
The StreamErrorReportFunc callback function.
Definition: Include.h:210
UINT32 version
Version.
Definition: Include.h:202
BufferDurationOverflowPressureFunc bufferDurationOverflowPressureFn
The BufferDurationOverflowPressureFunc callback function.
Definition: Include.h:205