1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package types
4
5import (
6	"time"
7)
8
9// Describes the timestamp range and timestamp origin of a range of fragments.
10// Fragments that have duplicate producer timestamps are deduplicated. This means
11// that if producers are producing a stream of fragments with producer timestamps
12// that are approximately equal to the true clock time, the clip will contain all
13// of the fragments within the requested timestamp range. If some fragments are
14// ingested within the same time range and very different points in time, only the
15// oldest ingested collection of fragments are returned.
16type ClipFragmentSelector struct {
17
18	// The origin of the timestamps to use (Server or Producer).
19	//
20	// This member is required.
21	FragmentSelectorType ClipFragmentSelectorType
22
23	// The range of timestamps to return.
24	//
25	// This member is required.
26	TimestampRange *ClipTimestampRange
27}
28
29// The range of timestamps for which to return fragments. The values in the
30// ClipTimestampRange are inclusive. Fragments that begin before the start time but
31// continue past it, or fragments that begin before the end time but continue past
32// it, are included in the session.
33type ClipTimestampRange struct {
34
35	// The end of the timestamp range for the requested media. This value must be
36	// within 3 hours of the specified StartTimestamp, and it must be later than the
37	// StartTimestamp value. If FragmentSelectorType for the request is
38	// SERVER_TIMESTAMP, this value must be in the past. This value is inclusive. The
39	// EndTimestamp is compared to the (starting) timestamp of the fragment. Fragments
40	// that start before the EndTimestamp value and continue past it are included in
41	// the session.
42	//
43	// This member is required.
44	EndTimestamp *time.Time
45
46	// The starting timestamp in the range of timestamps for which to return fragments.
47	// This value is inclusive. Fragments that start before the StartTimestamp and
48	// continue past it are included in the session. If FragmentSelectorType is
49	// SERVER_TIMESTAMP, the StartTimestamp must be later than the stream head.
50	//
51	// This member is required.
52	StartTimestamp *time.Time
53}
54
55// Contains the range of timestamps for the requested media, and the source of the
56// timestamps.
57type DASHFragmentSelector struct {
58
59	// The source of the timestamps for the requested media. When FragmentSelectorType
60	// is set to PRODUCER_TIMESTAMP and GetDASHStreamingSessionURLInput$PlaybackMode is
61	// ON_DEMAND or LIVE_REPLAY, the first fragment ingested with a producer timestamp
62	// within the specified FragmentSelector$TimestampRange is included in the media
63	// playlist. In addition, the fragments with producer timestamps within the
64	// TimestampRange ingested immediately following the first fragment (up to the
65	// GetDASHStreamingSessionURLInput$MaxManifestFragmentResults value) are included.
66	// Fragments that have duplicate producer timestamps are deduplicated. This means
67	// that if producers are producing a stream of fragments with producer timestamps
68	// that are approximately equal to the true clock time, the MPEG-DASH manifest will
69	// contain all of the fragments within the requested timestamp range. If some
70	// fragments are ingested within the same time range and very different points in
71	// time, only the oldest ingested collection of fragments are returned. When
72	// FragmentSelectorType is set to PRODUCER_TIMESTAMP and
73	// GetDASHStreamingSessionURLInput$PlaybackMode is LIVE, the producer timestamps
74	// are used in the MP4 fragments and for deduplication. But the most recently
75	// ingested fragments based on server timestamps are included in the MPEG-DASH
76	// manifest. This means that even if fragments ingested in the past have producer
77	// timestamps with values now, they are not included in the HLS media playlist. The
78	// default is SERVER_TIMESTAMP.
79	FragmentSelectorType DASHFragmentSelectorType
80
81	// The start and end of the timestamp range for the requested media. This value
82	// should not be present if PlaybackType is LIVE.
83	TimestampRange *DASHTimestampRange
84}
85
86// The start and end of the timestamp range for the requested media. This value
87// should not be present if PlaybackType is LIVE. The values in the
88// DASHimestampRange are inclusive. Fragments that begin before the start time but
89// continue past it, or fragments that begin before the end time but continue past
90// it, are included in the session.
91type DASHTimestampRange struct {
92
93	// The end of the timestamp range for the requested media. This value must be
94	// within 3 hours of the specified StartTimestamp, and it must be later than the
95	// StartTimestamp value. If FragmentSelectorType for the request is
96	// SERVER_TIMESTAMP, this value must be in the past. The EndTimestamp value is
97	// required for ON_DEMAND mode, but optional for LIVE_REPLAY mode. If the
98	// EndTimestamp is not set for LIVE_REPLAY mode then the session will continue to
99	// include newly ingested fragments until the session expires. This value is
100	// inclusive. The EndTimestamp is compared to the (starting) timestamp of the
101	// fragment. Fragments that start before the EndTimestamp value and continue past
102	// it are included in the session.
103	EndTimestamp *time.Time
104
105	// The start of the timestamp range for the requested media. If the
106	// DASHTimestampRange value is specified, the StartTimestamp value is required.
107	// This value is inclusive. Fragments that start before the StartTimestamp and
108	// continue past it are included in the session. If FragmentSelectorType is
109	// SERVER_TIMESTAMP, the StartTimestamp must be later than the stream head.
110	StartTimestamp *time.Time
111}
112
113// Represents a segment of video or other time-delimited data.
114type Fragment struct {
115
116	// The playback duration or other time value associated with the fragment.
117	FragmentLengthInMilliseconds int64
118
119	// The unique identifier of the fragment. This value monotonically increases based
120	// on the ingestion order.
121	FragmentNumber *string
122
123	// The total fragment size, including information about the fragment and contained
124	// media data.
125	FragmentSizeInBytes int64
126
127	// The timestamp from the producer corresponding to the fragment.
128	ProducerTimestamp *time.Time
129
130	// The timestamp from the AWS server corresponding to the fragment.
131	ServerTimestamp *time.Time
132}
133
134// Describes the timestamp range and timestamp origin of a range of fragments. Only
135// fragments with a start timestamp greater than or equal to the given start time
136// and less than or equal to the end time are returned. For example, if a stream
137// contains fragments with the following start timestamps:
138//
139// * 00:00:00
140//
141// *
142// 00:00:02
143//
144// * 00:00:04
145//
146// * 00:00:06
147//
148// A fragment selector range with a start time of
149// 00:00:01 and end time of 00:00:04 would return the fragments with start times of
150// 00:00:02 and 00:00:04.
151type FragmentSelector struct {
152
153	// The origin of the timestamps to use (Server or Producer).
154	//
155	// This member is required.
156	FragmentSelectorType FragmentSelectorType
157
158	// The range of timestamps to return.
159	//
160	// This member is required.
161	TimestampRange *TimestampRange
162}
163
164// Contains the range of timestamps for the requested media, and the source of the
165// timestamps.
166type HLSFragmentSelector struct {
167
168	// The source of the timestamps for the requested media. When FragmentSelectorType
169	// is set to PRODUCER_TIMESTAMP and GetHLSStreamingSessionURLInput$PlaybackMode is
170	// ON_DEMAND or LIVE_REPLAY, the first fragment ingested with a producer timestamp
171	// within the specified FragmentSelector$TimestampRange is included in the media
172	// playlist. In addition, the fragments with producer timestamps within the
173	// TimestampRange ingested immediately following the first fragment (up to the
174	// GetHLSStreamingSessionURLInput$MaxMediaPlaylistFragmentResults value) are
175	// included. Fragments that have duplicate producer timestamps are deduplicated.
176	// This means that if producers are producing a stream of fragments with producer
177	// timestamps that are approximately equal to the true clock time, the HLS media
178	// playlists will contain all of the fragments within the requested timestamp
179	// range. If some fragments are ingested within the same time range and very
180	// different points in time, only the oldest ingested collection of fragments are
181	// returned. When FragmentSelectorType is set to PRODUCER_TIMESTAMP and
182	// GetHLSStreamingSessionURLInput$PlaybackMode is LIVE, the producer timestamps are
183	// used in the MP4 fragments and for deduplication. But the most recently ingested
184	// fragments based on server timestamps are included in the HLS media playlist.
185	// This means that even if fragments ingested in the past have producer timestamps
186	// with values now, they are not included in the HLS media playlist. The default is
187	// SERVER_TIMESTAMP.
188	FragmentSelectorType HLSFragmentSelectorType
189
190	// The start and end of the timestamp range for the requested media. This value
191	// should not be present if PlaybackType is LIVE.
192	TimestampRange *HLSTimestampRange
193}
194
195// The start and end of the timestamp range for the requested media. This value
196// should not be present if PlaybackType is LIVE. The values in the
197// HLSTimestampRange are inclusive. Fragments that begin before the start time but
198// continue past it, or fragments that begin before the end time but continue past
199// it, are included in the session.
200type HLSTimestampRange struct {
201
202	// The end of the timestamp range for the requested media. This value must be
203	// within 3 hours of the specified StartTimestamp, and it must be later than the
204	// StartTimestamp value. If FragmentSelectorType for the request is
205	// SERVER_TIMESTAMP, this value must be in the past. The EndTimestamp value is
206	// required for ON_DEMAND mode, but optional for LIVE_REPLAY mode. If the
207	// EndTimestamp is not set for LIVE_REPLAY mode then the session will continue to
208	// include newly ingested fragments until the session expires. This value is
209	// inclusive. The EndTimestamp is compared to the (starting) timestamp of the
210	// fragment. Fragments that start before the EndTimestamp value and continue past
211	// it are included in the session.
212	EndTimestamp *time.Time
213
214	// The start of the timestamp range for the requested media. If the
215	// HLSTimestampRange value is specified, the StartTimestamp value is required. This
216	// value is inclusive. Fragments that start before the StartTimestamp and continue
217	// past it are included in the session. If FragmentSelectorType is
218	// SERVER_TIMESTAMP, the StartTimestamp must be later than the stream head.
219	StartTimestamp *time.Time
220}
221
222// The range of timestamps for which to return fragments.
223type TimestampRange struct {
224
225	// The ending timestamp in the range of timestamps for which to return fragments.
226	//
227	// This member is required.
228	EndTimestamp *time.Time
229
230	// The starting timestamp in the range of timestamps for which to return fragments.
231	//
232	// This member is required.
233	StartTimestamp *time.Time
234}
235