AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <CaptionParserInterface.h>
Public Member Functions | |
virtual | ~CaptionParserInterface ()=default |
virtual void | parse (CaptionFrame::MediaPlayerSourceId captionId, const CaptionData &captionData)=0 |
virtual void | releaseResourcesFor (CaptionFrame::MediaPlayerSourceId captionId)=0 |
virtual void | addListener (std::shared_ptr< CaptionFrameParseListenerInterface > parseListener)=0 |
Provides a standardized interface for caption parsing implementations. Implementers of this interface handle requests to parse raw captions content.
|
virtualdefault |
Destructor.
|
pure virtual |
Gives the caption parsing implementation a handle to a listener so that it can be notified when CaptionData
objects have been parsed.
parseListener | the CaptionFrameParseListenerInterface instance which can receive the parsed objects. |
Implemented in alexaClientSDK::captions::LibwebvttParserAdapter.
|
pure virtual |
Start parsing the provided raw caption data. The captionId
that is received here should be retained and passed along with the parsed result to the CaptionFrameParseListenerInterface
. This is to keep track of which incoming CaptionData
go with the outgoing parsed CaptionFrames
.
captionId | The identifier for the incoming caption data. |
captionData | the raw, un-processed caption to parse. |
Implemented in alexaClientSDK::captions::LibwebvttParserAdapter.
|
pure virtual |
Notify the parser that resources related to this caption ID are no longer needed and can be safely released. This function might be a no-op, depending on the caption parser implementation, but is provided in case static resources are maintained between parse requests, such as if callback functions are used to communicate with the parser.
captionId | the ID corresponding with the resources that should be freed, should a value that was previously received with the parse() function. |
Implemented in alexaClientSDK::captions::LibwebvttParserAdapter.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0