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

A struct used to encapsulate information retrieved from an M3U playlist. More...

#include <M3UParser.h>

Public Member Functions

 M3UContent (const std::vector< std::string > &variantURLs)
 
 M3UContent (const std::vector< avsCommon::utils::playlistParser::PlaylistEntry > &entries, bool isLive, long mediaSequence=INVALID_MEDIA_SEQUENCE)
 
bool isMasterPlaylist () const
 
bool hasMediaSequence () const
 
bool empty () const
 

Public Attributes

const std::vector< std::string > variantURLs
 If this is a master playlist, variantURLs has list of media playlists. More...
 
const std::vector< avsCommon::utils::playlistParser::PlaylistEntryentries
 If this is a media playlist, entries has list of parsed entries. More...
 
const bool isLive
 If EXT-X-ENDLIST tag exists, isLive is set to false. More...
 
const long mediaSequence
 

Detailed Description

A struct used to encapsulate information retrieved from an M3U playlist.

Constructor & Destructor Documentation

◆ M3UContent() [1/2]

alexaClientSDK::playlistParser::M3UContent::M3UContent ( const std::vector< std::string > &  variantURLs)

Constructor for parsed content of master playlist.

Parameters
variantURLsThe variant URLs pointing to media playlists.

◆ M3UContent() [2/2]

alexaClientSDK::playlistParser::M3UContent::M3UContent ( const std::vector< avsCommon::utils::playlistParser::PlaylistEntry > &  entries,
bool  isLive,
long  mediaSequence = INVALID_MEDIA_SEQUENCE 
)

Constructor for parsed content of media playlist.

Parameters
entriesList of PlaylistEntry from parsed content.
isLivetrue for live HLS playlists.
mediaSequenceThe value of the EXT-X-MEDIA-SEQUENCE tag

Member Function Documentation

◆ empty()

bool alexaClientSDK::playlistParser::M3UContent::empty ( ) const

Helper method to check if no URLs are parsed.

◆ hasMediaSequence()

bool alexaClientSDK::playlistParser::M3UContent::hasMediaSequence ( ) const

Helper method to tell if the media sequence field is present in the M3U8 document.

Returns
true if this represents a playlist that has the media sequence field.

◆ isMasterPlaylist()

bool alexaClientSDK::playlistParser::M3UContent::isMasterPlaylist ( ) const

Helper method to check if content is a master playlist.

Returns
true if this represents a master playlist

Member Data Documentation

◆ entries

const std::vector<avsCommon::utils::playlistParser::PlaylistEntry> alexaClientSDK::playlistParser::M3UContent::entries

If this is a media playlist, entries has list of parsed entries.

◆ isLive

const bool alexaClientSDK::playlistParser::M3UContent::isLive

If EXT-X-ENDLIST tag exists, isLive is set to false.

◆ mediaSequence

const long alexaClientSDK::playlistParser::M3UContent::mediaSequence

The value of the EXT-X-MEDIA-SEQUENCE tag. The client code is responsible for calling the hasMediaSequence() method to check if the content of this field should be read.

◆ variantURLs

const std::vector<std::string> alexaClientSDK::playlistParser::M3UContent::variantURLs

If this is a master playlist, variantURLs has list of media playlists.


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