16 #ifndef ALEXA_CLIENT_SDK_CAPTIONS_IMPLEMENTATION_INCLUDE_CAPTIONS_CAPTIONMANAGER_H_ 17 #define ALEXA_CLIENT_SDK_CAPTIONS_IMPLEMENTATION_INCLUDE_CAPTIONS_CAPTIONMANAGER_H_ 21 #include <unordered_map> 60 ,
public std::enable_shared_from_this<CaptionManager> {
70 static std::shared_ptr<CaptionManager>
create(
71 std::shared_ptr<CaptionParserInterface>
parser,
72 std::shared_ptr<TimingAdapterFactory> timingAdapterFactory =
nullptr);
82 void setCaptionPresenter(
const std::shared_ptr<CaptionPresenterInterface>& presenter)
override;
84 const std::vector<std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface>>& mediaPlayers)
override;
86 const std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface>& mediaPlayer)
override;
88 const std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface>& mediaPlayer)
override;
132 std::shared_ptr<CaptionParserInterface> parser,
133 std::shared_ptr<TimingAdapterFactory> timingAdapterFactory);
141 void logMediaStateNotHandled(
152 std::unordered_map<CaptionFrame::MediaPlayerSourceId, std::shared_ptr<CaptionTimingAdapterInterface>>
153 m_timingAdaptersBySourceIds;
156 std::shared_ptr<CaptionPresenterInterface> m_presenter;
159 std::shared_ptr<CaptionParserInterface> m_parser;
162 std::shared_ptr<TimingAdapterFactory> m_timingFactory;
165 std::vector<std::shared_ptr<avsCommon::utils::mediaPlayer::MediaPlayerInterface>> m_mediaPlayers;
174 #endif // ALEXA_CLIENT_SDK_CAPTIONS_IMPLEMENTATION_INCLUDE_CAPTIONS_CAPTIONMANAGER_H_ void setCaptionPresenter(const std::shared_ptr< CaptionPresenterInterface > &presenter) override
void onPlaybackPaused(CaptionFrame::MediaPlayerSourceId id, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
void onPlaybackResumed(CaptionFrame::MediaPlayerSourceId id, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
::std::string string
Definition: gtest-port.h:1097
void removeMediaPlayer(const std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > &mediaPlayer) override
Definition: CaptionManagerInterface.h:32
Definition: RequiresShutdown.h:32
static std::shared_ptr< CaptionManager > create(std::shared_ptr< CaptionParserInterface > parser, std::shared_ptr< TimingAdapterFactory > timingAdapterFactory=nullptr)
void addMediaPlayer(const std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > &mediaPlayer) override
Definition: CaptionFrame.h:33
Definition: CaptionData.h:30
void onCaption(CaptionFrame::MediaPlayerSourceId sourceId, const CaptionData &captionData) override
void onPlaybackStopped(CaptionFrame::MediaPlayerSourceId id, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
void onPlaybackStarted(CaptionFrame::MediaPlayerSourceId id, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
void onPlaybackError(CaptionFrame::MediaPlayerSourceId id, const avsCommon::utils::mediaPlayer::ErrorType &type, std::string error, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
void onPlaybackFinished(CaptionFrame::MediaPlayerSourceId id, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
void onFirstByteRead(CaptionFrame::MediaPlayerSourceId id, const avsCommon::utils::mediaPlayer::MediaPlayerState &state) override
Definition: CaptionManager.h:119
avsCommon::utils::mediaPlayer::MediaPlayerInterface::SourceId MediaPlayerSourceId
Type alias to the media player source ID.
Definition: CaptionFrame.h:36
void setMediaPlayers(const std::vector< std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface >> &mediaPlayers) override
type
Definition: upload.py:443
Definition: CaptionFrameParseListenerInterface.h:27
Definition: CaptionManager.h:55
parser
Definition: upload.py:392
void doShutdown() override
bool isEnabled() const override
void onParsed(const CaptionFrame &captionFrame) override