AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry Struct Reference

#include <PlaylistEntry.h>

Collaboration diagram for alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry:
Collaboration graph
[legend]

Public Types

enum  Type { Type::MEDIA_INFO, Type::MEDIA_INIT_INFO, Type::AUDIO_CONTENT }
 

Public Member Functions

 PlaylistEntry (std::string _url, std::chrono::milliseconds _duration, avsCommon::utils::playlistParser::PlaylistParseResult _parseResult, Type _type=Type::MEDIA_INFO, ByteRange _byteRange=std::make_tuple(0, 0), EncryptionInfo _encryptionInfo=EncryptionInfo(), std::shared_ptr< avsCommon::sdkInterfaces::HTTPContentFetcherInterface > _contentFetcher=nullptr)
 
bool hasValidByteRange () const
 

Static Public Member Functions

static PlaylistEntry createErrorEntry (const std::string &url)
 
static PlaylistEntry createShutdownEntry (const std::string &url)
 
static PlaylistEntry createMediaInitInfo (std::string url, ByteRange byteRange=std::make_tuple(0, 0))
 

Public Attributes

Type type
 Type of playlist entry. More...
 
std::string url
 The URL for the entry. More...
 
std::chrono::milliseconds duration
 The duration of the content if its known; INVALID_DURATION otherwise. More...
 
PlaylistParseResult parseResult
 The latest parsing result. More...
 
ByteRange byteRange
 ByteRange to download. More...
 
EncryptionInfo encryptionInfo
 EncryptionInfo of the media. More...
 
std::shared_ptr< avsCommon::sdkInterfaces::HTTPContentFetcherInterfacecontentFetcher
 

Detailed Description

Struct to hold information about an entry parsed from playlist.

Member Enumeration Documentation

◆ Type

Type of playlist entry.

Enumerator
MEDIA_INFO 

Playlist Entry is about media.

MEDIA_INIT_INFO 

Playlist Entry is about media initialization.

AUDIO_CONTENT 

Playlist Entry is audio content, not a playlist.

Constructor & Destructor Documentation

◆ PlaylistEntry()

alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::PlaylistEntry ( std::string  _url,
std::chrono::milliseconds  _duration,
avsCommon::utils::playlistParser::PlaylistParseResult  _parseResult,
Type  _type = Type::MEDIA_INFO,
ByteRange  _byteRange = std::make_tuple(0, 0),
EncryptionInfo  _encryptionInfo = EncryptionInfo(),
std::shared_ptr< avsCommon::sdkInterfaces::HTTPContentFetcherInterface _contentFetcher = nullptr 
)
inline

Constructor.

Parameters
_urlThe URL of the playlist entry media.
_durationThe duration of media in milliseconds.
_parseResultThe PlaylistParseResult.
_typeThe Type of the entry.
_byteRangeThe byte range of the url to download. Default is (0, 0).
_encryptionInfoThe encryption info of the media. Default value is NONE.
_contentFetcherContent fetcher related to the entry.

Member Function Documentation

◆ createErrorEntry()

PlaylistEntry alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::createErrorEntry ( const std::string &  url)
inlinestatic

Helper method to create ERROR PlaylistEntry

Parameters
urlplaylist URL
Returns
PlaylistEntry with url, INVALID_DURATION and ERROR parseResult.

◆ createMediaInitInfo()

PlaylistEntry alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::createMediaInitInfo ( std::string  url,
ByteRange  byteRange = std::make_tuple(0, 0) 
)
inlinestatic

Helper method to create MEDIA_INIT_INFO PlaylistEntry.

Parameters
urlplaylist URL
byteRangeThe byte range of the MEDIA_INIT_INFO to download.
Returns
PlaylistEntry with url, INVALID_DURATION and STILL_ONGOING parseResult.

◆ createShutdownEntry()

PlaylistEntry alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::createShutdownEntry ( const std::string &  url)
inlinestatic

Helper method to create SHUTDOWN PlaylistEntry

Parameters
urlplaylist URL
Returns
PlaylistEntry with url, INVALID_DURATION and ERROR parseResult.

◆ hasValidByteRange()

bool alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::hasValidByteRange ( ) const
inline

Returns true if byterange is valid.

Member Data Documentation

◆ byteRange

ByteRange alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::byteRange

ByteRange to download.

◆ contentFetcher

std::shared_ptr<avsCommon::sdkInterfaces::HTTPContentFetcherInterface> alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::contentFetcher

The content fetcher associated with this playlist item. If a content fetcher is set, then it should be considered to be safe to use it. Otherwise, a new content fetcher should be created.

◆ duration

std::chrono::milliseconds alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::duration

The duration of the content if its known; INVALID_DURATION otherwise.

◆ encryptionInfo

EncryptionInfo alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::encryptionInfo

EncryptionInfo of the media.

◆ parseResult

PlaylistParseResult alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::parseResult

The latest parsing result.

◆ type

Type alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::type

Type of playlist entry.

◆ url

std::string alexaClientSDK::avsCommon::utils::playlistParser::PlaylistEntry::url

The URL for the entry.


The documentation for this struct 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