![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <PooledMediaPlayerFactory.h>
Static Public Member Functions | |
static std::unique_ptr< PooledMediaPlayerFactory > | create (const std::vector< std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface >> &pool, const avsCommon::utils::mediaPlayer::Fingerprint &fingerprint={}) |
Protected Member Functions | |
PooledMediaPlayerFactory (const std::vector< std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface >> &mediaPlayerPool, const avsCommon::utils::mediaPlayer::Fingerprint &fingerprint={}) | |
void | notifyObservers () |
Protected Attributes | |
std::vector< std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > > | m_availablePlayerPool |
The collection of available players. More... | |
std::vector< std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > > | m_inUsePlayerPool |
The collection of players in use. More... | |
std::unordered_set< std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerFactoryObserverInterface > > | m_observers |
avsCommon::utils::mediaPlayer::Fingerprint | m_fingerprint |
MediaPlayer version information. More... | |
Implementation of MediaPlayerFactoryInterface
that manages a pool of pre-created instances of MediaPlayerInterface
|
virtual |
|
protected |
Constructor used to create a PooledMediaPlayerFactory from a pre-created set of players and their associated speakers, channel volumes, and equalizers.
mediaPlayerPool | Pre-created collection of MediaPlayers. |
fingerprint | Optional fingerprint argument to send to AVS. |
|
overridevirtual |
Acquire an instance of a MediaPlayerInterface
, if available.
MediaPlayerInterface
, or nullptr if none available. Implements alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerFactoryInterface.
|
override |
|
static |
Create a PooledMediaPlayerFactory
from a pre-created set of Players.
pool | pre-created collection of MediaPlayers. Ownership is not transferred. |
|
overridevirtual |
Get Fingerprint
of MediaPlayer
.
Fingerprint
of MediaPlayer
. Implements alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerFactoryInterface.
|
overridevirtual |
Returns true if a MediaPlayerInterface
instance is available (i.e. if a call to acquireMediaPlayer
would return a valid Player) The return value is valid until the next call to acquireMediaPlayer() or releaseMediaPlayer()
MediaPlayerInterface
instance is available. Implements alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerFactoryInterface.
|
protected |
Synchronously notify all observers that a player is available
|
override |
|
override |
|
protected |
The collection of available players.
|
protected |
MediaPlayer version information.
|
protected |
The collection of players in use.
|
protected |
The collection of ChannelVolumeInterfaces
associated with the media players managed by this factory.. Factory observers
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0