![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <IterativePlaylistParser.h>
Public Member Functions | |
IterativePlaylistParserInterface methods. | |
bool | initializeParsing (std::string url) override |
avsCommon::utils::playlistParser::PlaylistEntry | next () override |
void | abort () override |
![]() | |
virtual | ~IterativePlaylistParserInterface ()=default |
Static Public Member Functions | |
static std::unique_ptr< IterativePlaylistParser > | create (std::shared_ptr< avsCommon::sdkInterfaces::HTTPContentFetcherInterfaceFactoryInterface > contentFetcherFactory) |
This playlist parser implements an iterative depth first search algorithm to find audio urls inside a playlist url. Each call to next will perform the search until it hits a leaf (a valid media). When the playlist is empty, it will set the parse result to SUCCESS.
This class is not thread safe except for method abort()
. This method can be called while another thread is running and it will cause ongoing and future calls to next
to fail. Calls to initializeParsing
will reset abort state.
|
overridevirtual |
Abort the current playlist parsing by causing ongoing and future calls to next
to fail. Calls to initializeParsing
will reset abort
.
Implements alexaClientSDK::avsCommon::utils::playlistParser::IterativePlaylistParserInterface.
|
static |
Creates a new IterativePlaylistParser
instance.
contentFetcherFactory | A factory that can create HTTPContentFetcherInterfaces . |
std::unique_ptr
to a new IterativePlaylistParser
if successful or nullptr
otherwise.
|
overridevirtual |
Initialize the playlist parsing. Once succesfully initialized, the method next
can be used to retrieve playlist entries.
url | The root url that can either point to one media file or a playlist to be parsed. |
true
if it succeeds; false otherwise. Implements alexaClientSDK::avsCommon::utils::playlistParser::IterativePlaylistParserInterface.
|
overridevirtual |
Get the next element in the playlist.
url
field will be valid if parseResult
is different than ERROR. Implements alexaClientSDK::avsCommon::utils::playlistParser::IterativePlaylistParserInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0