AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Member Functions | List of all members
alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory Class Reference

#include <StubApplicationAudioPipelineFactory.h>

Inheritance diagram for alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory:
Collaboration graph
[legend]

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::ApplicationMediaInterfacescreateApplicationMediaInterfaces (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::PooledApplicationMediaInterfacescreatePooledApplicationMediaInterfaces (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< StubApplicationAudioPipelineFactorycreate (const std::shared_ptr< avsCommon::sdkInterfaces::ChannelVolumeFactoryInterface > &channelVolumeFactory)
 

Detailed Description

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.

Member Function Documentation

◆ addApplicationMediaInterfaces() [1/2]

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.

Parameters
nameThe name of the media player. This name is used as the key to retrieve the correct application media interfaces when createApplicationMediaInterfaces is called.
mediaPlayerThe MediaPlayerInterface to add.
speakerThe SpeakerInterface to add.

◆ addApplicationMediaInterfaces() [2/2]

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.

Parameters
nameThe name of the media players. This name is used as the key to retrieve the correct application media interfaces when createApplicationMediaInterfaces is called.
mediaInterfacesA vector of media player/speaker pairs to add.

◆ addCaptionManager()

void alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory::addCaptionManager ( std::shared_ptr< captions::CaptionManagerInterface > &  captionManager)

Adds the CaptionManagerInterface for adding captionable media players.

Parameters
captionManagerThe CaptionManagerInterface with which to register speakers.

◆ addSpeakerManager()

void alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory::addSpeakerManager ( std::shared_ptr< avsCommon::sdkInterfaces::SpeakerManagerInterface > &  speakerManager)

Adds the SpeakerManagerInterface for registering speakers.

Parameters
speakerManagerThe SpeakerManagerInterface with which to register speakers.

◆ create()

static std::shared_ptr<StubApplicationAudioPipelineFactory> alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory::create ( const std::shared_ptr< avsCommon::sdkInterfaces::ChannelVolumeFactoryInterface > &  channelVolumeFactory)
static

Creates a new StubApplicationAudioPipelineFactory.

Parameters
channelVolumeFactoryThe ChannelVolumeFactoryInterface to use for creating channel volume interfaces.
Returns
A new StubApplicationAudioPipelineFactory.

◆ createApplicationMediaInterfaces()

std::shared_ptr<avsCommon::sdkInterfaces::ApplicationMediaInterfaces> alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory::createApplicationMediaInterfaces ( const std::string &  name,
bool  equalizerAvailable,
bool  enableLiveMode,
bool  isCaptionable,
avsCommon::sdkInterfaces::ChannelVolumeInterface::Type  channelVolumeType,
std::function< int8_t(int8_t)>  volumeCurve 
)
overridevirtual

Creates a new ApplicationMediaInterfaces struct of related application media interfaces.

Parameters
nameThe name of this media player.
equalizerAvailableWhether an equalizer is available for this media player. If equalizers are enabled in SDK configuration, the equalizer will be added to the EqualizerRuntimeSetup.
enableLiveModeWhether live mode is enabled for this media player.
isCaptionableWhether this media player is a source for captions.
channelVolumeTypeOptional ChannelVolumeType of the speaker. Default is AVS_SPEAKER_VOLUME.
volumeCurveOptional channel volume curve to be used for channel volume attenuation.
Returns
A new ApplicationMediaInterfaces struct, including media player and other interfaces.

Implements alexaClientSDK::acsdkApplicationAudioPipelineFactoryInterfaces::ApplicationAudioPipelineFactoryInterface.

◆ createPooledApplicationMediaInterfaces()

std::shared_ptr<acsdkApplicationAudioPipelineFactoryInterfaces::PooledApplicationMediaInterfaces> alexaClientSDK::defaultClient::StubApplicationAudioPipelineFactory::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 
)
overridevirtual

Creates a new PooledApplicationMediaInterfaces struct of multiple media players and related interfaces.

Parameters
nameThe name of these media players for logging purposes.
numMediaPlayersThe number of media players to create.
equalizerAvailableWhether an equalizer is available. If equalizers are enabled in SDK configuration, the equalizers will be added to the EqualizerRuntimeSetup.
enableLiveModeWhether live mode is enabled for these players.
isCaptionableWhether these players are a source for captions.
channelVolumeTypeOptional ChannelVolumeType of the speakers. Default is AVS_SPEAKER_VOLUME.
volumeCurveOptional channel volume curve to be used for channel volume attenuation.
Returns
A new PooledApplicationMediaInterfaces struct, including media players and other interfaces.

Implements alexaClientSDK::acsdkApplicationAudioPipelineFactoryInterfaces::ApplicationAudioPipelineFactoryInterface.


The documentation for this class was generated from the following file:

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