#include <kinesis_stream_manager.h>
Classes | |
struct | RekognitionStreamInfo |
Public Member Functions | |
KinesisManagerStatus | FetchRekognitionResults (const std::string &stream_name, Aws::Vector< Model::Record > *records) override |
void | FreeStream (std::string stream_name) override |
KinesisVideoProducerInterface * | get_video_producer () |
KinesisManagerStatus | InitializeVideoProducer (std::string region, std::unique_ptr< com::amazonaws::kinesis::video::DeviceInfoProvider > device_info_provider, std::unique_ptr< com::amazonaws::kinesis::video::ClientCallbackProvider > client_callback_provider, std::unique_ptr< com::amazonaws::kinesis::video::StreamCallbackProvider > stream_callback_provider, std::unique_ptr< com::amazonaws::kinesis::video::CredentialProvider > credential_provider, KinesisStreamManagerInterface::VideoProducerFactory video_producer_factory=KinesisStreamManagerInterface::CreateDefaultVideoProducer) override |
KinesisManagerStatus | InitializeVideoProducer (std::string region, KinesisStreamManagerInterface::VideoProducerFactory video_producer_factory=KinesisStreamManagerInterface::CreateDefaultVideoProducer) override |
KinesisManagerStatus | InitializeVideoStream (std::unique_ptr< com::amazonaws::kinesis::video::StreamDefinition > stream_definition) override |
KinesisStreamManager (Aws::Client::ParameterReaderInterface *parameter_reader, StreamDefinitionProvider *stream_definition_provider, StreamSubscriptionInstaller *subscription_installer, std::unique_ptr< KinesisClient > kinesis_client) | |
KinesisStreamManager ()=default | |
KinesisManagerStatus | KinesisVideoStreamerSetup () override |
KinesisManagerStatus | KinesisVideoStreamSetup (const uint16_t stream_idx, const PBYTE codec_private_data, const uint32_t codec_private_data_size, std::string *stream_name) override |
KinesisManagerStatus | ProcessCodecPrivateDataForStream (const std::string &stream_name, std::vector< uint8_t > codec_private_data) override |
KinesisManagerStatus | PutFrame (std::string stream_name, Frame &frame) const override |
KinesisManagerStatus | PutMetadata (std::string stream_name, const std::string &name, const std::string &value) const override |
~KinesisStreamManager ()=default | |
Public Member Functions inherited from Aws::Kinesis::KinesisStreamManagerInterface | |
KinesisStreamManagerInterface (const Aws::Client::ParameterReaderInterface *parameter_reader, const StreamDefinitionProvider *stream_definition_provider, StreamSubscriptionInstaller *subscription_installer) | |
KinesisStreamManagerInterface ()=default | |
virtual | ~KinesisStreamManagerInterface ()=default |
Protected Member Functions | |
KinesisManagerStatus | InitializeStreamSubscription (const StreamSubscriptionDescriptor &descriptor) override |
Protected Member Functions inherited from Aws::Kinesis::KinesisStreamManagerInterface | |
virtual KinesisManagerStatus | GenerateStreamSubscriptionDescriptor (int stream_idx, StreamSubscriptionDescriptor &descriptor) |
Private Member Functions | |
KinesisManagerStatus | UpdateShardIterator (const std::string &stream_name) |
Private Attributes | |
std::unique_ptr< KinesisClient > | kinesis_client_ |
std::map< std::string, RekognitionStreamInfo > | rekognition_config_ |
std::unique_ptr< KinesisVideoProducerInterface > | video_producer_ |
std::map< std::string, std::shared_ptr< KinesisVideoStreamInterface > > | video_streams_ |
std::map< std::string, std::vector< uint8_t > > | video_streams_codec_data_ |
Additional Inherited Members | |
Public Types inherited from Aws::Kinesis::KinesisStreamManagerInterface | |
using | VideoProducerFactory = std::function< std::unique_ptr< KinesisVideoProducerInterface >(std::string, std::unique_ptr< com::amazonaws::kinesis::video::DeviceInfoProvider >, std::unique_ptr< com::amazonaws::kinesis::video::ClientCallbackProvider >, std::unique_ptr< com::amazonaws::kinesis::video::StreamCallbackProvider >, std::unique_ptr< com::amazonaws::kinesis::video::CredentialProvider >)> |
Static Public Member Functions inherited from Aws::Kinesis::KinesisStreamManagerInterface | |
static std::unique_ptr< KinesisVideoProducerInterface > | CreateDefaultVideoProducer (std::string region, std::unique_ptr< com::amazonaws::kinesis::video::DeviceInfoProvider > device_info_provider, std::unique_ptr< com::amazonaws::kinesis::video::ClientCallbackProvider > client_callback_provider, std::unique_ptr< com::amazonaws::kinesis::video::StreamCallbackProvider > stream_callback_provider, std::unique_ptr< com::amazonaws::kinesis::video::CredentialProvider > credential_provider) |
Protected Attributes inherited from Aws::Kinesis::KinesisStreamManagerInterface | |
const Aws::Client::ParameterReaderInterface * | parameter_reader_ = nullptr |
const StreamDefinitionProvider * | stream_definition_provider_ = nullptr |
StreamSubscriptionInstaller * | subscription_installer_ = nullptr |
Use this class to manage AWS Kinesis streams. In order to use Video Streams, make sure to call InitializeVideoProducer before creating any streams.
Definition at line 240 of file kinesis_stream_manager.h.
|
inline |
Definition at line 243 of file kinesis_stream_manager.h.
|
default |
|
default |
|
overridevirtual |
This function returns the analysis results from Rekognition for the video stream, by reading the associated Kinesis data stream.
stream_name | the name of the Kinesis video stream. |
records | will store the fetched records. |
Implements Aws::Kinesis::KinesisStreamManagerInterface.
Definition at line 409 of file kinesis_stream_manager.cpp.
|
overridevirtual |
Stops and frees the resources used by a given stream. This does not delete the stream in AWS Kinesis.
stream_name |
Implements Aws::Kinesis::KinesisStreamManagerInterface.
Definition at line 313 of file kinesis_stream_manager.cpp.
|
inline |
Definition at line 292 of file kinesis_stream_manager.h.
|
overrideprotectedvirtual |
Initializes the subscription for the stream's input.
descriptor | a subscription descriptor previously generated by GenerateStreamSubscriptionDescriptor. |
Implements Aws::Kinesis::KinesisStreamManagerInterface.
Definition at line 181 of file kinesis_stream_manager.cpp.
|
overridevirtual |
Initializes the video producer with the given callbacks.
region | |
device_info_provider | |
client_callback_provider | |
stream_callback_provider | |
credential_provider | |
video_producer_factory |
Implements Aws::Kinesis::KinesisStreamManagerInterface.
|
overridevirtual |
Initializes the video producer using the default callbacks provided as part of the Kinesis Manager package.
region | |
video_producer_factory |
Implements Aws::Kinesis::KinesisStreamManagerInterface.
Definition at line 216 of file kinesis_stream_manager.cpp.
|
overridevirtual |
Initializes a video stream using the given stream definition.
stream_definition |
Implements Aws::Kinesis::KinesisStreamManagerInterface.
Definition at line 238 of file kinesis_stream_manager.cpp.
|
inlineoverridevirtual |
This function orchestrates the universal setup of a video streaming application.
parameter_reader | |
subscription_installer | responsible for subscribing to a media source and setting up callbacks that would convert/transmit the data to AWS Kinesis. |
stream_definition_provider |
Reimplemented from Aws::Kinesis::KinesisStreamManagerInterface.
Definition at line 272 of file kinesis_stream_manager.h.
|
inlineoverridevirtual |
This function orchestrates the setup of a single video stream and is called by KinesisVideoStreamerSetup.
stream_idx | |
codec_private_data | |
codec_private_data_size | |
stream_name | If not null, the stream name will be stored in this location. |
Reimplemented from Aws::Kinesis::KinesisStreamManagerInterface.
Definition at line 277 of file kinesis_stream_manager.h.
|
overridevirtual |
This function should be called whenever the codec data (sequence and picture parameter sets) have changed for the stream. Typically this would happen if encoder settings (such as fps or resolution) were changed.
stream_name | |
codec_private_data |
Implements Aws::Kinesis::KinesisStreamManagerInterface.
Definition at line 324 of file kinesis_stream_manager.cpp.
|
overridevirtual |
Transmits a single video frame into AWS Kinesis.
stream_name | |
frame |
Implements Aws::Kinesis::KinesisStreamManagerInterface.
Definition at line 279 of file kinesis_stream_manager.cpp.
|
overridevirtual |
Sends metadata to AWS Kinesis to be prepended to the next video fragment of the stream.
stream_name | |
name | the metadata name |
value | the metadata value |
Implements Aws::Kinesis::KinesisStreamManagerInterface.
Definition at line 295 of file kinesis_stream_manager.cpp.
|
private |
Updates RekognitionStreamInfo::shard_iterator by calling Kinesis' ListShards and GetShardIterator APIs.
stream_name |
Definition at line 368 of file kinesis_stream_manager.cpp.
|
private |
Definition at line 313 of file kinesis_stream_manager.h.
|
private |
Definition at line 321 of file kinesis_stream_manager.h.
|
private |
Definition at line 312 of file kinesis_stream_manager.h.
|
private |
Definition at line 310 of file kinesis_stream_manager.h.
|
private |
Definition at line 311 of file kinesis_stream_manager.h.