h264_encoder_node_config.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  */
19 
20 #include <aws/core/utils/logging/LogMacros.h>
22 
23 namespace Aws {
24 namespace Kinesis {
25 
26 constexpr char kSubscriptionTopicKey[] = "subscription_topic";
27 constexpr char kMetadataTopicKey[] = "metadata_topic";
28 constexpr char kPublicationTopicKey[] = "publication_topic";
29 constexpr char kQueueSizeKey[] = "queue_size";
30 
31 constexpr char kDefaultSubscriptionTopic[] = "/raspicam_node/image";
32 constexpr char kDefaultMetadataTopic[] = "/image_metadata";
33 constexpr char kDefaultPublicationTopic[] = "/video/encoded";
34 constexpr int kDefaultQueueSize = 100;
35 
37  H264EncoderNodeParams & params)
38 {
40  param_reader.ReadParam(Aws::Client::ParameterPath(kSubscriptionTopicKey), params.subscription_topic);
41 
43  param_reader.ReadParam(Aws::Client::ParameterPath(kMetadataTopicKey), params.metadata_topic);
44 
46  param_reader.ReadParam(Aws::Client::ParameterPath(kPublicationTopicKey), params.publication_topic);
47 
49  param_reader.ReadParam(Aws::Client::ParameterPath(kQueueSizeKey), params.queue_size);
50  if (params.queue_size < 0) {
51  AWS_LOGSTREAM_ERROR(__func__, "Invalid queue size " << params.queue_size << "!");
52  return AWS_ERR_PARAM;
53  } else if (params.queue_size == 0) {
54  AWS_LOGSTREAM_WARN(__func__, "Queue size is set to " << params.queue_size << " (infinity)!");
55  }
56 
57  return AWS_ERR_OK;
58 }
59 
60 } // namespace Kinesis
61 } // namespace Aws
constexpr char kPublicationTopicKey[]
AWS_ERR_PARAM
constexpr char kSubscriptionTopicKey[]
constexpr char kDefaultPublicationTopic[]
virtual AwsError ReadParam(const ParameterPath &param_path, std::vector< std::string > &out) const =0
constexpr int kDefaultQueueSize
constexpr char kDefaultSubscriptionTopic[]
constexpr char kQueueSizeKey[]
Aws::AwsError GetH264EncoderNodeParams(const Aws::Client::ParameterReaderInterface &param_reader, H264EncoderNodeParams &params)
constexpr char kDefaultMetadataTopic[]
AWS_ERR_OK
constexpr char kMetadataTopicKey[]


h264_encoder_core
Author(s): AWS RoboMaker
autogenerated on Fri Mar 5 2021 03:31:35