15 #ifndef ALEXA_CLIENT_SDK_MEDIAPLAYER_ANDROIDSLESMEDIAPLAYER_INCLUDE_ANDROIDSLESMEDIAPLAYER_ANDROIDSLESMEDIAPLAYER_H_ 16 #define ALEXA_CLIENT_SDK_MEDIAPLAYER_ANDROIDSLESMEDIAPLAYER_INCLUDE_ANDROIDSLESMEDIAPLAYER_ANDROIDSLESMEDIAPLAYER_H_ 18 #include <unordered_set> 21 #include <SLES/OpenSLES.h> 42 namespace mediaPlayer {
64 static std::unique_ptr<AndroidSLESMediaPlayer>
create(
65 std::shared_ptr<avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface> contentFetcherFactory,
66 std::shared_ptr<applicationUtilities::androidUtilities::AndroidSLESEngine> engine,
83 std::shared_ptr<avsCommon::avs::attachment::AttachmentReader> attachmentReader,
88 std::shared_ptr<avsCommon::avs::attachment::AttachmentReader> attachmentReader,
89 std::chrono::milliseconds offsetAdjustment,
95 std::chrono::milliseconds offset,
102 std::shared_ptr<std::istream> stream,
115 std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface> playerObserver)
override;
117 std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface> playerObserver)
override;
137 std::shared_ptr<avsCommon::sdkInterfaces::SpeakerInterface>
getSpeaker();
161 std::shared_ptr<avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface> contentFetcherFactory,
162 std::shared_ptr<avsCommon::sdkInterfaces::SpeakerInterface> speaker,
163 std::shared_ptr<applicationUtilities::androidUtilities::AndroidSLESEngine> engine,
164 std::shared_ptr<applicationUtilities::androidUtilities::AndroidSLESObject> outputMixObject,
165 std::shared_ptr<applicationUtilities::androidUtilities::AndroidSLESObject> playerObject,
166 SLEqualizerItf equalizer,
167 SLPlayItf playerInterface,
188 bool registerPrefetchStatusCallback();
200 std::unique_ptr<FFmpegInputControllerInterface> inputController,
202 std::shared_ptr<avsCommon::utils::playlistParser::IterativePlaylistParserInterface> playlistParser =
nullptr,
203 std::chrono::milliseconds offset = std::chrono::milliseconds(0));
217 bool initializeEqualizer();
225 std::chrono::milliseconds getOffsetLocked(
SourceId id);
240 static std::chrono::milliseconds computeDuration(
size_t sizeBytes);
251 std::mutex m_requestMutex;
254 std::mutex m_operationMutex;
257 std::shared_ptr<avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface> m_contentFetcherFactory;
263 std::chrono::milliseconds m_initialOffset;
266 std::shared_ptr<avsCommon::sdkInterfaces::SpeakerInterface> m_speaker;
270 std::shared_ptr<applicationUtilities::androidUtilities::AndroidSLESEngine> m_engine;
273 std::shared_ptr<applicationUtilities::androidUtilities::AndroidSLESObject> m_outputMixObject;
276 std::shared_ptr<applicationUtilities::androidUtilities::AndroidSLESObject> m_playerObject;
279 std::unordered_set<std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface>> m_observers;
282 SLEqualizerItf m_equalizer;
285 std::vector<int> m_growingFrequenceBandMap;
288 std::shared_ptr<acsdkEqualizer::EqualizerBandMapperInterface> m_bandMapper;
291 int m_numberOfEqualizerBands;
307 SLPrefetchStatusItf m_prefetchStatus;
310 std::shared_ptr<AndroidSLESMediaQueue> m_mediaQueue;
314 std::shared_ptr<avsCommon::utils::playlistParser::IterativePlaylistParserInterface> m_playlistParser;
329 #endif // ALEXA_CLIENT_SDK_MEDIAPLAYER_ANDROIDSLESMEDIAPLAYER_INCLUDE_ANDROIDSLESMEDIAPLAYER_ANDROIDSLESMEDIAPLAYER_H_ const std::string & name() const
std::unordered_map< EqualizerBand, int, avsCommon::utils::functional::EnumClassHash > EqualizerBandLevelMap
A collection of bands with their level values. This is an alias for EqualizerBand to band level (int)...
Definition: EqualizerTypes.h:77
Definition: PlaybackContext.h:35
::std::string string
Definition: gtest-port.h:1097
Definition: RequiresShutdown.h:32
MediaType
Definition: MediaType.h:29
Definition: Optional.h:32
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Audio data type not known.
Definition: EqualizerInterface.h:27