AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <StubApplicationAudioPipelineFactory.h>
Public Member Functions | |
void | addSpeakerManager (std::shared_ptr< avsCommon::sdkInterfaces::SpeakerManagerInterface > &speakerManager) |
void | addCaptionManager (std::shared_ptr< captions::CaptionManagerInterface > &captionManager) |
bool | addApplicationMediaInterfaces (const std::string &name, const std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > &mediaPlayer, const std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface > &speaker) |
bool | addApplicationMediaInterfaces (const std::string &name, std::vector< std::pair< std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface >, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface >>> mediaInterfaces) |
ApplicationAudioPipelineFactoryInterface | |
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 |
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 |
Public Member Functions inherited from alexaClientSDK::acsdkApplicationAudioPipelineFactoryInterfaces::ApplicationAudioPipelineFactoryInterface | |
virtual | ~ApplicationAudioPipelineFactoryInterface ()=default |
Static Public Member Functions | |
static std::shared_ptr< StubApplicationAudioPipelineFactory > | create (const std::shared_ptr< avsCommon::sdkInterfaces::ChannelVolumeFactoryInterface > &channelVolumeFactory) |
This is a factory class that can be used during the transition to using the manufactory for creating media players and related interfaces. Pre-built media players and speakers can be added to this factory, and the factory will return the pre-built ApplicationMediaInterfaces
with the specified name when createApplicationMediaInterfaces(...) is called.
Other factories such as acsdkGstreamerAudioPipelineFactory should be preferred.
This factory will register the pre-built speakers with SpeakerManager, but unlike the real factory implementations, it will not register equalizers with EqualizerRuntimeSetup nor media players with the CaptionManager. Applications that use this stub factory are responsible for doing so outside of this factory.
bool alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory::addApplicationMediaInterfaces | ( | const std::string & | name, |
const std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > & | mediaPlayer, | ||
const std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface > & | speaker | ||
) |
Adds application media interfaces to the factory for later retrieval when createApplicationMediaInterfaces is called.
name | The name of the media player. This name is used as the key to retrieve the correct application media interfaces when createApplicationMediaInterfaces is called. |
mediaPlayer | The MediaPlayerInterface to add. |
speaker | The SpeakerInterface to add. |
bool alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory::addApplicationMediaInterfaces | ( | const std::string & | name, |
std::vector< std::pair< std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface >, std::shared_ptr< avsCommon::sdkInterfaces::SpeakerInterface >>> | mediaInterfaces | ||
) |
Adds a vector of application media interfaces to the factory for later retrieval when createApplicationMediaInterfaces is called.
name | The name of the media players. This name is used as the key to retrieve the correct application media interfaces when createApplicationMediaInterfaces is called. |
mediaInterfaces | A vector of media player/speaker pairs to add. |
void alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory::addCaptionManager | ( | std::shared_ptr< captions::CaptionManagerInterface > & | captionManager | ) |
Adds the CaptionManagerInterface
for adding captionable media players.
captionManager | The CaptionManagerInterface with which to register speakers. |
void alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory::addSpeakerManager | ( | std::shared_ptr< avsCommon::sdkInterfaces::SpeakerManagerInterface > & | speakerManager | ) |
Adds the SpeakerManagerInterface
for registering speakers.
speakerManager | The SpeakerManagerInterface with which to register speakers. |
|
static |
Creates a new StubApplicationAudioPipelineFactory
.
channelVolumeFactory | The ChannelVolumeFactoryInterface to use for creating channel volume interfaces. |
StubApplicationAudioPipelineFactory
.
|
overridevirtual |
Creates a new ApplicationMediaInterfaces
struct of related application media interfaces.
name | The name of this media player. |
equalizerAvailable | Whether an equalizer is available for this media player. If equalizers are enabled in SDK configuration, the equalizer will be added to the EqualizerRuntimeSetup. |
enableLiveMode | Whether live mode is enabled for this media player. |
isCaptionable | Whether this media player is a source for captions. |
channelVolumeType | Optional ChannelVolumeType of the speaker. Default is AVS_SPEAKER_VOLUME. |
volumeCurve | Optional channel volume curve to be used for channel volume attenuation. |
ApplicationMediaInterfaces
struct, including media player and other interfaces. Implements alexaClientSDK::acsdkApplicationAudioPipelineFactoryInterfaces::ApplicationAudioPipelineFactoryInterface.
|
overridevirtual |
Creates a new PooledApplicationMediaInterfaces
struct of multiple media players and related interfaces.
name | The name of these media players for logging purposes. |
numMediaPlayers | The number of media players to create. |
equalizerAvailable | Whether an equalizer is available. If equalizers are enabled in SDK configuration, the equalizers will be added to the EqualizerRuntimeSetup. |
enableLiveMode | Whether live mode is enabled for these players. |
isCaptionable | Whether these players are a source for captions. |
channelVolumeType | Optional ChannelVolumeType of the speakers. Default is AVS_SPEAKER_VOLUME. |
volumeCurve | Optional channel volume curve to be used for channel volume attenuation. |
PooledApplicationMediaInterfaces
struct, including media players and other interfaces. Implements alexaClientSDK::acsdkApplicationAudioPipelineFactoryInterfaces::ApplicationAudioPipelineFactoryInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0