AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
AudioItem.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ACSDKAUDIOPLAYER_AUDIOITEM_H_
17 #define ACSDKAUDIOPLAYER_AUDIOITEM_H_
18 
19 #include <chrono>
20 #include <memory>
21 #include <string>
22 
25 #include <Captions/CaptionData.h>
26 
27 #include "StreamFormat.h"
28 
29 namespace alexaClientSDK {
30 namespace acsdkAudioPlayer {
31 
33 struct AudioItem {
36 
38  struct Stream {
45 
50  std::shared_ptr<avsCommon::avs::attachment::AttachmentReader> reader;
51 
57 
63  std::chrono::milliseconds offset;
64 
70  std::chrono::milliseconds endOffset;
71 
73  std::chrono::steady_clock::time_point expiryTime;
74 
76  struct ProgressReport {
84  std::chrono::milliseconds delay;
85 
93  std::chrono::milliseconds interval;
95 
98 
101 
102  } stream;
103 
106 
109 
111  std::chrono::time_point<std::chrono::steady_clock> lastMetadataEvent;
112 
115 };
116 
117 } // namespace acsdkAudioPlayer
118 } // namespace alexaClientSDK
119 
120 #endif // ACSDKAUDIOPLAYER_AUDIOITEM_H_
std::string url
Definition: AudioItem.h:44
std::string id
Identifies the audioItem.
Definition: AudioItem.h:35
StreamFormat
Specifies the format of a binary audio attachment in a Play directive.
Definition: StreamFormat.h:28
std::chrono::milliseconds delay
Definition: AudioItem.h:84
std::string token
An opaque token that represents the current stream.
Definition: AudioItem.h:97
struct alexaClientSDK::acsdkAudioPlayer::AudioItem::Stream stream
::std::string string
Definition: gtest-port.h:1097
std::chrono::milliseconds interval
Definition: AudioItem.h:93
std::vector< TagKeyValueType > VectorOfTags
Definition: MediaPlayerObserverInterface.h:66
std::string expectedPreviousToken
An opaque token that represents the expected previous stream.
Definition: AudioItem.h:100
Definition: CaptionData.h:30
Contains the parameters of the stream.
Definition: AudioItem.h:38
alexaClientSDK::avsCommon::utils::mediaPlayer::MediaPlayerObserverInterface::VectorOfTags cachedMetadata
Metadata cache for duplicate removal.
Definition: AudioItem.h:108
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::chrono::steady_clock::time_point expiryTime
The date and time in ISO 8601 format for when the stream becomes invalid.
Definition: AudioItem.h:73
alexaClientSDK::avsCommon::utils::mediaPlayer::PlaybackContext playbackContext
Playback Context.
Definition: AudioItem.h:114
std::chrono::milliseconds endOffset
Definition: AudioItem.h:70
std::chrono::time_point< std::chrono::steady_clock > lastMetadataEvent
Time of last Metadata event (used to rate limit metadata events).
Definition: AudioItem.h:111
StreamFormat format
Definition: AudioItem.h:56
std::shared_ptr< avsCommon::avs::attachment::AttachmentReader > reader
Definition: AudioItem.h:50
captions::CaptionData captionData
The caption content that goes with the audio.
Definition: AudioItem.h:105
struct alexaClientSDK::acsdkAudioPlayer::AudioItem::Stream::ProgressReport progressReport
std::chrono::milliseconds offset
Definition: AudioItem.h:63
Struct which contains all the fields which define an audio item for a Play directive.
Definition: AudioItem.h:33
Contains values for progress reports.
Definition: AudioItem.h:76

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0