AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
StubApplicationAudioPipelineFactory.h
Go to the documentation of this file.
1 /*
2  * Copyright 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 
16 #ifndef ALEXA_CLIENT_SDK_APPLICATIONUTILITIES_DEFAULTCLIENT_INCLUDE_DEFAULTCLIENT_STUBAPPLICATIONAUDIOPIPELINEFACTORY_H_
17 #define ALEXA_CLIENT_SDK_APPLICATIONUTILITIES_DEFAULTCLIENT_INCLUDE_DEFAULTCLIENT_STUBAPPLICATIONAUDIOPIPELINEFACTORY_H_
18 
19 #include <memory>
20 #include <queue>
21 #include <string>
22 
30 
31 namespace alexaClientSDK {
32 namespace defaultClient {
33 
49 public:
56  static std::shared_ptr<StubApplicationAudioPipelineFactory> create(
57  const std::shared_ptr<avsCommon::sdkInterfaces::ChannelVolumeFactoryInterface>& channelVolumeFactory);
58 
64  void addSpeakerManager(std::shared_ptr<avsCommon::sdkInterfaces::SpeakerManagerInterface>& speakerManager);
65 
71  void addCaptionManager(std::shared_ptr<captions::CaptionManagerInterface>& captionManager);
72 
83  const std::string& name,
84  const std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface>& mediaPlayer,
85  const std::shared_ptr<avsCommon::sdkInterfaces::SpeakerInterface>& speaker);
86 
96  const std::string& name,
97  std::vector<std::pair<
98  std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface>,
99  std::shared_ptr<avsCommon::sdkInterfaces::SpeakerInterface>>> mediaInterfaces);
100 
103  std::shared_ptr<avsCommon::sdkInterfaces::ApplicationMediaInterfaces> createApplicationMediaInterfaces(
104  const std::string& name,
105  bool equalizerAvailable,
106  bool enableLiveMode,
107  bool isCaptionable,
109  std::function<int8_t(int8_t)> volumeCurve) override;
110  std::shared_ptr<acsdkApplicationAudioPipelineFactoryInterfaces::PooledApplicationMediaInterfaces>
112  const std::string& name,
113  int numMediaPlayers,
114  bool equalizerAvailable,
115  bool enableLiveMode,
116  bool isCaptionable,
118  std::function<int8_t(int8_t)> volumeCurve) override;
120 
121 private:
126  const std::shared_ptr<avsCommon::sdkInterfaces::ChannelVolumeFactoryInterface>& channelVolumeFactory);
127 
129  std::mutex m_applicationMediaInterfacesMapMutex;
130 
135  std::unordered_map<std::string, std::vector<std::shared_ptr<avsCommon::sdkInterfaces::ApplicationMediaInterfaces>>>
136  m_applicationMediaInterfacesMap;
137 
139  std::shared_ptr<avsCommon::sdkInterfaces::SpeakerManagerInterface> m_speakerManager;
140 
142  std::shared_ptr<captions::CaptionManagerInterface> m_captionManager;
143 
145  std::shared_ptr<avsCommon::sdkInterfaces::ChannelVolumeFactoryInterface> m_channelVolumeFactory;
146 };
147 
148 } // namespace defaultClient
149 } // namespace alexaClientSDK
150 
151 #endif // ALEXA_CLIENT_SDK_APPLICATIONUTILITIES_DEFAULTCLIENT_INCLUDE_DEFAULTCLIENT_STUBAPPLICATIONAUDIOPIPELINEFACTORY_H_
void addSpeakerManager(std::shared_ptr< avsCommon::sdkInterfaces::SpeakerManagerInterface > &speakerManager)
void addCaptionManager(std::shared_ptr< captions::CaptionManagerInterface > &captionManager)
::std::string string
Definition: gtest-port.h:1097
std::shared_ptr< acsdkApplicationAudioPipelineFactoryInterfaces::PooledApplicationMediaInterfaces > createPooledApplicationMediaInterfaces(const std::string &name, int numMediaPlayers, bool equalizerAvailable, bool enableLiveMode, bool isCaptionable, avsCommon::sdkInterfaces::ChannelVolumeInterface::Type channelVolumeType, std::function< int8_t(int8_t)> volumeCurve) override
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Definition: StubApplicationAudioPipelineFactory.h:47
static std::shared_ptr< StubApplicationAudioPipelineFactory > create(const std::shared_ptr< avsCommon::sdkInterfaces::ChannelVolumeFactoryInterface > &channelVolumeFactory)
std::shared_ptr< avsCommon::sdkInterfaces::ApplicationMediaInterfaces > createApplicationMediaInterfaces(const std::string &name, bool equalizerAvailable, bool enableLiveMode, bool isCaptionable, avsCommon::sdkInterfaces::ChannelVolumeInterface::Type channelVolumeType, std::function< int8_t(int8_t)> volumeCurve) override
bool addApplicationMediaInterfaces(const std::string &name, const std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > &mediaPlayer, const std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface > &speaker)

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0