kinesis_video_producer_interface.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
17 
18 namespace Aws {
19 namespace Kinesis {
20 
21 std::shared_ptr<KinesisVideoStreamInterface> KinesisVideoProducerImpl::CreateStreamSync(
22  std::unique_ptr<com::amazonaws::kinesis::video::StreamDefinition> stream_definition)
23 {
24  auto video_stream = video_producer_->createStreamSync(std::move(stream_definition));
25  return std::make_shared<KinesisVideoStreamImpl>(video_stream);
26 }
27 
29  std::shared_ptr<KinesisVideoStreamInterface> kinesis_video_stream)
30 {
31  auto video_stream = kinesis_video_stream->GetKinesisVideoStream();
32  if (nullptr != video_stream) {
33  video_producer_->freeStream(video_stream);
34  }
35 }
36 
37 } // namespace Kinesis
38 } // namespace Aws
virtual std::shared_ptr< KinesisVideoStreamInterface > CreateStreamSync(std::unique_ptr< com::amazonaws::kinesis::video::StreamDefinition > stream_definition) override
virtual void FreeStream(std::shared_ptr< KinesisVideoStreamInterface > kinesis_video_stream) override
std::unique_ptr< com::amazonaws::kinesis::video::KinesisVideoProducer > video_producer_


kinesis_manager
Author(s): AWS RoboMaker
autogenerated on Thu Mar 4 2021 03:28:41