16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_PLAYLISTPARSER_PLAYLISTENTRY_H_ 17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_PLAYLISTPARSER_PLAYLISTENTRY_H_ 30 namespace playlistParser {
164 std::chrono::milliseconds _duration,
166 Type _type = Type::MEDIA_INFO,
169 std::shared_ptr<avsCommon::sdkInterfaces::HTTPContentFetcherInterface> _contentFetcher =
nullptr);
174 bool hasValidByteRange()
const;
196 std::shared_ptr<avsCommon::sdkInterfaces::HTTPContentFetcherInterface>
contentFetcher;
210 auto duration = std::chrono::milliseconds(-1);
220 initVector(initVector) {
229 std::tie(start, end) = byteRange;
230 return start >= 0 && end > 0;
235 std::chrono::milliseconds _duration,
238 ByteRange _byteRange,
240 std::shared_ptr<avsCommon::sdkInterfaces::HTTPContentFetcherInterface> _contentFetcher) :
244 parseResult(_parseResult),
245 byteRange(_byteRange),
246 encryptionInfo(_encryptionInfo),
247 contentFetcher(_contentFetcher) {
255 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_PLAYLISTPARSER_PLAYLISTENTRY_H_
std::chrono::milliseconds totalDuration
The total duration of the content from the playlist.
Definition: PlaylistEntry.h:105
Definition: PlaylistEntry.h:111
::std::string string
Definition: gtest-port.h:1097
std::shared_ptr< avsCommon::sdkInterfaces::HTTPContentFetcherInterface > contentFetcher
Definition: PlaylistEntry.h:196
EncryptionInfo encryptionInfo
EncryptionInfo of the media.
Definition: PlaylistEntry.h:192
std::tuple< long, long > ByteRange
Alias for holding start and end offsets of byte range of an URL to download.
Definition: PlaylistEntry.h:33
Method method
Encryption method.
Definition: PlaylistEntry.h:96
tuple make_tuple()
Definition: gtest-tuple.h:675
std::string initVector
The initilization vector used for encryption.
Definition: PlaylistEntry.h:102
static PlaylistEntry createErrorEntry(const std::string &url)
Definition: PlaylistEntry.h:199
Type type
Type of playlist entry.
Definition: PlaylistEntry.h:177
PlaylistParseResult parseResult
The latest parsing result.
Definition: PlaylistEntry.h:186
PlaylistParseResult
Definition: PlaylistEntry.h:38
static PlaylistEntry createShutdownEntry(const std::string &url)
Definition: PlaylistEntry.h:204
The playlist has been fully parsed successfully. This indicates that parsing of the playlist has comp...
Definition: PlaylistEntry.h:59
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)
Definition: PlaylistEntry.h:233
The playlist parsing is still ongoing.
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
ByteRange byteRange
ByteRange to download.
Definition: PlaylistEntry.h:189
bool hasValidByteRange() const
Definition: PlaylistEntry.h:227
std::chrono::milliseconds duration
The duration of the content if its known; INVALID_DURATION otherwise.
Definition: PlaylistEntry.h:183
type
Definition: upload.py:443
std::string keyURL
The URL of the encryption key.
Definition: PlaylistEntry.h:99
Type
Definition: PlaylistEntry.h:115
bool isValid() const
Definition: PlaylistEntry.h:223
std::string url
The URL for the entry.
Definition: PlaylistEntry.h:180
EncryptionInfo()
Definition: PlaylistEntry.h:214
static PlaylistEntry createMediaInitInfo(std::string url, ByteRange byteRange=std::make_tuple(0, 0))
Definition: PlaylistEntry.h:209
Method
Definition: PlaylistEntry.h:63