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