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

#include <CaptionTimingAdapter.h>

Inheritance diagram for alexaClientSDK::captions::CaptionTimingAdapter:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::captions::CaptionTimingAdapter:
Collaboration graph
[legend]

Public Member Functions

 CaptionTimingAdapter (std::shared_ptr< CaptionPresenterInterface > presenter, std::shared_ptr< DelayInterface > delayInterface)
 
virtual ~CaptionTimingAdapter () override
 
CaptionTimingAdapterInterface methods
virtual void queueForDisplay (const CaptionFrame &captionFrame, bool autostart) override
 
virtual void reset () override
 
virtual void start () override
 
virtual void stop () override
 
virtual void pause () override
 
- Public Member Functions inherited from alexaClientSDK::captions::CaptionTimingAdapterInterface
virtual ~CaptionTimingAdapterInterface ()=default
 

Detailed Description

A helper class to handle the timing of when to display CaptionFrame objects for the appropriate media sources.

Constructor & Destructor Documentation

◆ CaptionTimingAdapter()

alexaClientSDK::captions::CaptionTimingAdapter::CaptionTimingAdapter ( std::shared_ptr< CaptionPresenterInterface presenter,
std::shared_ptr< DelayInterface delayInterface 
)

Constructor.

Parameters
presenterThe CaptionPresenterInterface which should receive caption frames that are ready to display.
delayInterfaceThe DelayInterface to use while waiting to display the next caption frame.

◆ ~CaptionTimingAdapter()

virtual alexaClientSDK::captions::CaptionTimingAdapter::~CaptionTimingAdapter ( )
overridevirtual

Destructor.

Member Function Documentation

◆ pause()

virtual void alexaClientSDK::captions::CaptionTimingAdapter::pause ( )
overridevirtual

Pauses the playback of captions, keeping track of the last caption frame shown.

Implements alexaClientSDK::captions::CaptionTimingAdapterInterface.

◆ queueForDisplay()

virtual void alexaClientSDK::captions::CaptionTimingAdapter::queueForDisplay ( const CaptionFrame captionFrame,
bool  autostart 
)
overridevirtual

Enqueues a CaptionFrame object for display. This method must begin the serial presentation of the enqueued caption frames if such presentation is not already taking place and autostart is true. The order of the caption frames must be maintained as first-in-first-out.

Parameters
captionFrameThe CaptionFrame object to be enqueued for display.
autostartDetermines if presentation should begin immediately if it has not already; defaults to true.

Implements alexaClientSDK::captions::CaptionTimingAdapterInterface.

◆ reset()

virtual void alexaClientSDK::captions::CaptionTimingAdapter::reset ( )
overridevirtual

Resets the state of this adapter, in preparation for new captions content.

Implements alexaClientSDK::captions::CaptionTimingAdapterInterface.

◆ start()

virtual void alexaClientSDK::captions::CaptionTimingAdapter::start ( )
overridevirtual

Resumes the playback of captions content, starting from the caption frame following the last one shown.

Implements alexaClientSDK::captions::CaptionTimingAdapterInterface.

◆ stop()

virtual void alexaClientSDK::captions::CaptionTimingAdapter::stop ( )
overridevirtual

Stops the playback of captions, forgetting which caption frame was last shown.

Implements alexaClientSDK::captions::CaptionTimingAdapterInterface.


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