15 #include <aws/core/utils/logging/LogMacros.h> 28 UINT64 DefaultClientCallbackProvider::getCallbackCustomData()
30 return reinterpret_cast<UINT64
>(
this);
32 StorageOverflowPressureFunc DefaultClientCallbackProvider::getStorageOverflowPressureCallback()
34 return storageOverflowPressure;
36 STATUS DefaultClientCallbackProvider::storageOverflowPressure(UINT64 custom_handle,
37 UINT64 remaining_bytes)
39 UNUSED_PARAM(custom_handle);
40 return STATUS_SUCCESS;
48 char const *access_key, *secret_key, *session_token;
50 return unique_ptr<CredentialProvider>{};
53 return unique_ptr<CredentialProvider>{};
59 auto now_time = std::chrono::duration_cast<std::chrono::seconds>(
60 std::chrono::system_clock::now().time_since_epoch());
61 unique_ptr<Credentials> credentials_ = make_unique<Credentials>(
62 string(access_key), string(secret_key), string(session_token),
64 return make_unique<StaticCredentialProvider>(*credentials_.get());
70 UINT64 DefaultStreamCallbackProvider::getCallbackCustomData()
72 return reinterpret_cast<UINT64
>(
this);
75 StreamConnectionStaleFunc DefaultStreamCallbackProvider::getStreamConnectionStaleCallback()
77 return streamConnectionStaleHandler;
80 StreamErrorReportFunc DefaultStreamCallbackProvider::getStreamErrorReportCallback()
82 return streamErrorReportHandler;
85 DroppedFrameReportFunc DefaultStreamCallbackProvider::getDroppedFrameReportCallback()
87 return droppedFrameReportHandler;
90 STATUS DefaultStreamCallbackProvider::streamConnectionStaleHandler(UINT64 custom_data,
91 STREAM_HANDLE stream_handle,
92 UINT64 last_buffering_ack)
94 AWS_LOGSTREAM_WARN(__func__,
"Reporting stream stale. Last ACK received " << last_buffering_ack);
95 return STATUS_SUCCESS;
99 DefaultStreamCallbackProvider::streamErrorReportHandler(UINT64 custom_data,
100 STREAM_HANDLE stream_handle,
101 UPLOAD_HANDLE upload_handle,
102 UINT64 errored_timecode,
105 AWS_LOGSTREAM_ERROR(__func__,
"Reporting stream error. Errored timecode: " 106 << errored_timecode <<
" Status: " << status_code);
107 return STATUS_SUCCESS;
111 DefaultStreamCallbackProvider::droppedFrameReportHandler(UINT64 custom_data,
112 STREAM_HANDLE stream_handle,
113 UINT64 dropped_frame_timecode)
115 AWS_LOGSTREAM_WARN(__func__,
116 "Reporting dropped frame. Frame timecode " << dropped_frame_timecode);
117 return STATUS_SUCCESS;
#define AWS_SECRET_KEY_ENV_VAR
#define AWS_DEFAULT_CREDENTIAL_ROTATION_PERIOD_IN_SECONDS
#define AWS_SESSION_TOKEN_ENV_VAR
std::unique_ptr< com::amazonaws::kinesis::video::CredentialProvider > CreateDefaultCredentialProvider()
#define AWS_ACCESS_KEY_ENV_VAR
This module provides default callbacks for use with the Kinesis Producer Library. You can implement y...