AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <LibwebvttParserAdapter.h>
Public Member Functions | |
CaptionParserInterface methods | |
void | parse (CaptionFrame::MediaPlayerSourceId captionId, const CaptionData &captionData) override |
void | addListener (std::shared_ptr< CaptionFrameParseListenerInterface > parseListener) override |
void | releaseResourcesFor (CaptionFrame::MediaPlayerSourceId captionId) override |
Public Member Functions inherited from alexaClientSDK::captions::CaptionParserInterface | |
virtual | ~CaptionParserInterface ()=default |
Static Public Member Functions | |
static std::shared_ptr< LibwebvttParserAdapter > | getInstance () |
A singleton implementation of the CaptionParserInterface
, specified to work with the libwebvtt parsing library found at: https://github.com/alexa/webvtt
|
overridevirtual |
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. |
Implements alexaClientSDK::captions::CaptionParserInterface.
|
static |
Return the singleton instance of LibwebvttParserAdapter
.
LibwebvttParserAdapter
.
|
overridevirtual |
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. |
Implements alexaClientSDK::captions::CaptionParserInterface.
|
overridevirtual |
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. |
Implements alexaClientSDK::captions::CaptionParserInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0