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

#include <CaptionParserInterface.h>

Inheritance diagram for alexaClientSDK::captions::CaptionParserInterface:
Inheritance graph

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

Detailed Description

Provides a standardized interface for caption parsing implementations. Implementers of this interface handle requests to parse raw captions content.

Constructor & Destructor Documentation

◆ ~CaptionParserInterface()

virtual alexaClientSDK::captions::CaptionParserInterface::~CaptionParserInterface ( )


Member Function Documentation

◆ addListener()

virtual void alexaClientSDK::captions::CaptionParserInterface::addListener ( std::shared_ptr< CaptionFrameParseListenerInterface parseListener)
pure virtual

Gives the caption parsing implementation a handle to a listener so that it can be notified when CaptionData objects have been parsed.

parseListenerthe CaptionFrameParseListenerInterface instance which can receive the parsed objects.

Implemented in alexaClientSDK::captions::LibwebvttParserAdapter.

◆ parse()

virtual void alexaClientSDK::captions::CaptionParserInterface::parse ( CaptionFrame::MediaPlayerSourceId  captionId,
const CaptionData captionData 
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.

captionIdThe identifier for the incoming caption data.
captionDatathe raw, un-processed caption to parse.

Implemented in alexaClientSDK::captions::LibwebvttParserAdapter.

◆ releaseResourcesFor()

virtual void alexaClientSDK::captions::CaptionParserInterface::releaseResourcesFor ( CaptionFrame::MediaPlayerSourceId  captionId)
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.

captionIdthe 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.

The documentation for this class was generated from the following file:

AlexaClientSDK 1.25.0 - Copyright 2016-2021, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0