aws-sdk-kinesisvideoarchivedmedia 1.16.0 → 1.21.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,8 +14,13 @@ module Aws::KinesisVideoArchivedMedia
14
14
  ClientLimitExceededException = Shapes::StructureShape.new(name: 'ClientLimitExceededException')
15
15
  ContainerFormat = Shapes::StringShape.new(name: 'ContainerFormat')
16
16
  ContentType = Shapes::StringShape.new(name: 'ContentType')
17
- DiscontinuityMode = Shapes::StringShape.new(name: 'DiscontinuityMode')
18
- DisplayFragmentTimestamp = Shapes::StringShape.new(name: 'DisplayFragmentTimestamp')
17
+ DASHDisplayFragmentNumber = Shapes::StringShape.new(name: 'DASHDisplayFragmentNumber')
18
+ DASHDisplayFragmentTimestamp = Shapes::StringShape.new(name: 'DASHDisplayFragmentTimestamp')
19
+ DASHFragmentSelector = Shapes::StructureShape.new(name: 'DASHFragmentSelector')
20
+ DASHFragmentSelectorType = Shapes::StringShape.new(name: 'DASHFragmentSelectorType')
21
+ DASHPlaybackMode = Shapes::StringShape.new(name: 'DASHPlaybackMode')
22
+ DASHStreamingSessionURL = Shapes::StringShape.new(name: 'DASHStreamingSessionURL')
23
+ DASHTimestampRange = Shapes::StructureShape.new(name: 'DASHTimestampRange')
19
24
  ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
20
25
  Expires = Shapes::IntegerShape.new(name: 'Expires')
21
26
  Fragment = Shapes::StructureShape.new(name: 'Fragment')
@@ -24,12 +29,17 @@ module Aws::KinesisVideoArchivedMedia
24
29
  FragmentNumberString = Shapes::StringShape.new(name: 'FragmentNumberString')
25
30
  FragmentSelector = Shapes::StructureShape.new(name: 'FragmentSelector')
26
31
  FragmentSelectorType = Shapes::StringShape.new(name: 'FragmentSelectorType')
32
+ GetDASHStreamingSessionURLInput = Shapes::StructureShape.new(name: 'GetDASHStreamingSessionURLInput')
33
+ GetDASHStreamingSessionURLOutput = Shapes::StructureShape.new(name: 'GetDASHStreamingSessionURLOutput')
27
34
  GetHLSStreamingSessionURLInput = Shapes::StructureShape.new(name: 'GetHLSStreamingSessionURLInput')
28
35
  GetHLSStreamingSessionURLOutput = Shapes::StructureShape.new(name: 'GetHLSStreamingSessionURLOutput')
29
36
  GetMediaForFragmentListInput = Shapes::StructureShape.new(name: 'GetMediaForFragmentListInput')
30
37
  GetMediaForFragmentListOutput = Shapes::StructureShape.new(name: 'GetMediaForFragmentListOutput')
38
+ HLSDiscontinuityMode = Shapes::StringShape.new(name: 'HLSDiscontinuityMode')
39
+ HLSDisplayFragmentTimestamp = Shapes::StringShape.new(name: 'HLSDisplayFragmentTimestamp')
31
40
  HLSFragmentSelector = Shapes::StructureShape.new(name: 'HLSFragmentSelector')
32
41
  HLSFragmentSelectorType = Shapes::StringShape.new(name: 'HLSFragmentSelectorType')
42
+ HLSPlaybackMode = Shapes::StringShape.new(name: 'HLSPlaybackMode')
33
43
  HLSStreamingSessionURL = Shapes::StringShape.new(name: 'HLSStreamingSessionURL')
34
44
  HLSTimestampRange = Shapes::StructureShape.new(name: 'HLSTimestampRange')
35
45
  InvalidArgumentException = Shapes::StructureShape.new(name: 'InvalidArgumentException')
@@ -42,7 +52,6 @@ module Aws::KinesisVideoArchivedMedia
42
52
  NotAuthorizedException = Shapes::StructureShape.new(name: 'NotAuthorizedException')
43
53
  PageLimit = Shapes::IntegerShape.new(name: 'PageLimit')
44
54
  Payload = Shapes::BlobShape.new(name: 'Payload', streaming: true)
45
- PlaybackMode = Shapes::StringShape.new(name: 'PlaybackMode')
46
55
  ResourceARN = Shapes::StringShape.new(name: 'ResourceARN')
47
56
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
48
57
  StreamName = Shapes::StringShape.new(name: 'StreamName')
@@ -54,6 +63,14 @@ module Aws::KinesisVideoArchivedMedia
54
63
  ClientLimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
55
64
  ClientLimitExceededException.struct_class = Types::ClientLimitExceededException
56
65
 
66
+ DASHFragmentSelector.add_member(:fragment_selector_type, Shapes::ShapeRef.new(shape: DASHFragmentSelectorType, location_name: "FragmentSelectorType"))
67
+ DASHFragmentSelector.add_member(:timestamp_range, Shapes::ShapeRef.new(shape: DASHTimestampRange, location_name: "TimestampRange"))
68
+ DASHFragmentSelector.struct_class = Types::DASHFragmentSelector
69
+
70
+ DASHTimestampRange.add_member(:start_timestamp, Shapes::ShapeRef.new(shape: Timestamp, location_name: "StartTimestamp"))
71
+ DASHTimestampRange.add_member(:end_timestamp, Shapes::ShapeRef.new(shape: Timestamp, location_name: "EndTimestamp"))
72
+ DASHTimestampRange.struct_class = Types::DASHTimestampRange
73
+
57
74
  Fragment.add_member(:fragment_number, Shapes::ShapeRef.new(shape: String, location_name: "FragmentNumber"))
58
75
  Fragment.add_member(:fragment_size_in_bytes, Shapes::ShapeRef.new(shape: Long, location_name: "FragmentSizeInBytes"))
59
76
  Fragment.add_member(:producer_timestamp, Shapes::ShapeRef.new(shape: Timestamp, location_name: "ProducerTimestamp"))
@@ -69,13 +86,26 @@ module Aws::KinesisVideoArchivedMedia
69
86
  FragmentSelector.add_member(:timestamp_range, Shapes::ShapeRef.new(shape: TimestampRange, required: true, location_name: "TimestampRange"))
70
87
  FragmentSelector.struct_class = Types::FragmentSelector
71
88
 
89
+ GetDASHStreamingSessionURLInput.add_member(:stream_name, Shapes::ShapeRef.new(shape: StreamName, location_name: "StreamName"))
90
+ GetDASHStreamingSessionURLInput.add_member(:stream_arn, Shapes::ShapeRef.new(shape: ResourceARN, location_name: "StreamARN"))
91
+ GetDASHStreamingSessionURLInput.add_member(:playback_mode, Shapes::ShapeRef.new(shape: DASHPlaybackMode, location_name: "PlaybackMode"))
92
+ GetDASHStreamingSessionURLInput.add_member(:display_fragment_timestamp, Shapes::ShapeRef.new(shape: DASHDisplayFragmentTimestamp, location_name: "DisplayFragmentTimestamp"))
93
+ GetDASHStreamingSessionURLInput.add_member(:display_fragment_number, Shapes::ShapeRef.new(shape: DASHDisplayFragmentNumber, location_name: "DisplayFragmentNumber"))
94
+ GetDASHStreamingSessionURLInput.add_member(:dash_fragment_selector, Shapes::ShapeRef.new(shape: DASHFragmentSelector, location_name: "DASHFragmentSelector"))
95
+ GetDASHStreamingSessionURLInput.add_member(:expires, Shapes::ShapeRef.new(shape: Expires, location_name: "Expires"))
96
+ GetDASHStreamingSessionURLInput.add_member(:max_manifest_fragment_results, Shapes::ShapeRef.new(shape: PageLimit, location_name: "MaxManifestFragmentResults"))
97
+ GetDASHStreamingSessionURLInput.struct_class = Types::GetDASHStreamingSessionURLInput
98
+
99
+ GetDASHStreamingSessionURLOutput.add_member(:dash_streaming_session_url, Shapes::ShapeRef.new(shape: DASHStreamingSessionURL, location_name: "DASHStreamingSessionURL"))
100
+ GetDASHStreamingSessionURLOutput.struct_class = Types::GetDASHStreamingSessionURLOutput
101
+
72
102
  GetHLSStreamingSessionURLInput.add_member(:stream_name, Shapes::ShapeRef.new(shape: StreamName, location_name: "StreamName"))
73
103
  GetHLSStreamingSessionURLInput.add_member(:stream_arn, Shapes::ShapeRef.new(shape: ResourceARN, location_name: "StreamARN"))
74
- GetHLSStreamingSessionURLInput.add_member(:playback_mode, Shapes::ShapeRef.new(shape: PlaybackMode, location_name: "PlaybackMode"))
104
+ GetHLSStreamingSessionURLInput.add_member(:playback_mode, Shapes::ShapeRef.new(shape: HLSPlaybackMode, location_name: "PlaybackMode"))
75
105
  GetHLSStreamingSessionURLInput.add_member(:hls_fragment_selector, Shapes::ShapeRef.new(shape: HLSFragmentSelector, location_name: "HLSFragmentSelector"))
76
106
  GetHLSStreamingSessionURLInput.add_member(:container_format, Shapes::ShapeRef.new(shape: ContainerFormat, location_name: "ContainerFormat"))
77
- GetHLSStreamingSessionURLInput.add_member(:discontinuity_mode, Shapes::ShapeRef.new(shape: DiscontinuityMode, location_name: "DiscontinuityMode"))
78
- GetHLSStreamingSessionURLInput.add_member(:display_fragment_timestamp, Shapes::ShapeRef.new(shape: DisplayFragmentTimestamp, location_name: "DisplayFragmentTimestamp"))
107
+ GetHLSStreamingSessionURLInput.add_member(:discontinuity_mode, Shapes::ShapeRef.new(shape: HLSDiscontinuityMode, location_name: "DiscontinuityMode"))
108
+ GetHLSStreamingSessionURLInput.add_member(:display_fragment_timestamp, Shapes::ShapeRef.new(shape: HLSDisplayFragmentTimestamp, location_name: "DisplayFragmentTimestamp"))
79
109
  GetHLSStreamingSessionURLInput.add_member(:expires, Shapes::ShapeRef.new(shape: Expires, location_name: "Expires"))
80
110
  GetHLSStreamingSessionURLInput.add_member(:max_media_playlist_fragment_results, Shapes::ShapeRef.new(shape: PageLimit, location_name: "MaxMediaPlaylistFragmentResults"))
81
111
  GetHLSStreamingSessionURLInput.struct_class = Types::GetHLSStreamingSessionURLInput
@@ -153,6 +183,22 @@ module Aws::KinesisVideoArchivedMedia
153
183
  "uid" => "kinesis-video-archived-media-2017-09-30",
154
184
  }
155
185
 
186
+ api.add_operation(:get_dash_streaming_session_url, Seahorse::Model::Operation.new.tap do |o|
187
+ o.name = "GetDASHStreamingSessionURL"
188
+ o.http_method = "POST"
189
+ o.http_request_uri = "/getDASHStreamingSessionURL"
190
+ o.input = Shapes::ShapeRef.new(shape: GetDASHStreamingSessionURLInput)
191
+ o.output = Shapes::ShapeRef.new(shape: GetDASHStreamingSessionURLOutput)
192
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
193
+ o.errors << Shapes::ShapeRef.new(shape: InvalidArgumentException)
194
+ o.errors << Shapes::ShapeRef.new(shape: ClientLimitExceededException)
195
+ o.errors << Shapes::ShapeRef.new(shape: NotAuthorizedException)
196
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedStreamMediaTypeException)
197
+ o.errors << Shapes::ShapeRef.new(shape: NoDataRetentionException)
198
+ o.errors << Shapes::ShapeRef.new(shape: MissingCodecPrivateDataException)
199
+ o.errors << Shapes::ShapeRef.new(shape: InvalidCodecPrivateDataException)
200
+ end)
201
+
156
202
  api.add_operation(:get_hls_streaming_session_url, Seahorse::Model::Operation.new.tap do |o|
157
203
  o.name = "GetHLSStreamingSessionURL"
158
204
  o.http_method = "POST"
@@ -191,6 +237,12 @@ module Aws::KinesisVideoArchivedMedia
191
237
  o.errors << Shapes::ShapeRef.new(shape: InvalidArgumentException)
192
238
  o.errors << Shapes::ShapeRef.new(shape: ClientLimitExceededException)
193
239
  o.errors << Shapes::ShapeRef.new(shape: NotAuthorizedException)
240
+ o[:pager] = Aws::Pager.new(
241
+ limit_key: "max_results",
242
+ tokens: {
243
+ "next_token" => "next_token"
244
+ }
245
+ )
194
246
  end)
195
247
  end
196
248
 
@@ -6,6 +6,36 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::KinesisVideoArchivedMedia
9
+
10
+ # When KinesisVideoArchivedMedia returns an error response, the Ruby SDK constructs and raises an error.
11
+ # These errors all extend Aws::KinesisVideoArchivedMedia::Errors::ServiceError < {Aws::Errors::ServiceError}
12
+ #
13
+ # You can rescue all KinesisVideoArchivedMedia errors using ServiceError:
14
+ #
15
+ # begin
16
+ # # do stuff
17
+ # rescue Aws::KinesisVideoArchivedMedia::Errors::ServiceError
18
+ # # rescues all KinesisVideoArchivedMedia API errors
19
+ # end
20
+ #
21
+ #
22
+ # ## Request Context
23
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
24
+ # information about the request that generated the error.
25
+ # See {Seahorse::Client::RequestContext} for more information.
26
+ #
27
+ # ## Error Classes
28
+ # * {ClientLimitExceededException}
29
+ # * {InvalidArgumentException}
30
+ # * {InvalidCodecPrivateDataException}
31
+ # * {MissingCodecPrivateDataException}
32
+ # * {NoDataRetentionException}
33
+ # * {NotAuthorizedException}
34
+ # * {ResourceNotFoundException}
35
+ # * {UnsupportedStreamMediaTypeException}
36
+ #
37
+ # Additionally, error classes are dynamically generated for service errors based on the error code
38
+ # if they are not defined above.
9
39
  module Errors
10
40
 
11
41
  extend Aws::Errors::DynamicErrors
@@ -23,7 +53,6 @@ module Aws::KinesisVideoArchivedMedia
23
53
  def message
24
54
  @message || @data[:message]
25
55
  end
26
-
27
56
  end
28
57
 
29
58
  class InvalidArgumentException < ServiceError
@@ -39,7 +68,6 @@ module Aws::KinesisVideoArchivedMedia
39
68
  def message
40
69
  @message || @data[:message]
41
70
  end
42
-
43
71
  end
44
72
 
45
73
  class InvalidCodecPrivateDataException < ServiceError
@@ -55,7 +83,6 @@ module Aws::KinesisVideoArchivedMedia
55
83
  def message
56
84
  @message || @data[:message]
57
85
  end
58
-
59
86
  end
60
87
 
61
88
  class MissingCodecPrivateDataException < ServiceError
@@ -71,7 +98,6 @@ module Aws::KinesisVideoArchivedMedia
71
98
  def message
72
99
  @message || @data[:message]
73
100
  end
74
-
75
101
  end
76
102
 
77
103
  class NoDataRetentionException < ServiceError
@@ -87,7 +113,6 @@ module Aws::KinesisVideoArchivedMedia
87
113
  def message
88
114
  @message || @data[:message]
89
115
  end
90
-
91
116
  end
92
117
 
93
118
  class NotAuthorizedException < ServiceError
@@ -103,7 +128,6 @@ module Aws::KinesisVideoArchivedMedia
103
128
  def message
104
129
  @message || @data[:message]
105
130
  end
106
-
107
131
  end
108
132
 
109
133
  class ResourceNotFoundException < ServiceError
@@ -119,7 +143,6 @@ module Aws::KinesisVideoArchivedMedia
119
143
  def message
120
144
  @message || @data[:message]
121
145
  end
122
-
123
146
  end
124
147
 
125
148
  class UnsupportedStreamMediaTypeException < ServiceError
@@ -135,7 +158,6 @@ module Aws::KinesisVideoArchivedMedia
135
158
  def message
136
159
  @message || @data[:message]
137
160
  end
138
-
139
161
  end
140
162
 
141
163
  end
@@ -6,6 +6,13 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::KinesisVideoArchivedMedia
9
+ # This class provides a resource oriented interface for KinesisVideoArchivedMedia.
10
+ # To create a resource object:
11
+ # resource = Aws::KinesisVideoArchivedMedia::Resource.new(region: 'us-west-2')
12
+ # You can supply a client object with custom configuration that will be used for all resource operations.
13
+ # If you do not pass +:client+, a default client will be constructed.
14
+ # client = Aws::KinesisVideoArchivedMedia::Client.new(region: 'us-west-2')
15
+ # resource = Aws::KinesisVideoArchivedMedia::Resource.new(client: client)
9
16
  class Resource
10
17
 
11
18
  # @param options ({})
@@ -21,10 +21,133 @@ module Aws::KinesisVideoArchivedMedia
21
21
  include Aws::Structure
22
22
  end
23
23
 
24
+ # Contains the range of timestamps for the requested media, and the
25
+ # source of the timestamps.
26
+ #
27
+ # @note When making an API call, you may pass DASHFragmentSelector
28
+ # data as a hash:
29
+ #
30
+ # {
31
+ # fragment_selector_type: "PRODUCER_TIMESTAMP", # accepts PRODUCER_TIMESTAMP, SERVER_TIMESTAMP
32
+ # timestamp_range: {
33
+ # start_timestamp: Time.now,
34
+ # end_timestamp: Time.now,
35
+ # },
36
+ # }
37
+ #
38
+ # @!attribute [rw] fragment_selector_type
39
+ # The source of the timestamps for the requested media.
40
+ #
41
+ # When `FragmentSelectorType` is set to `PRODUCER_TIMESTAMP` and
42
+ # GetDASHStreamingSessionURLInput$PlaybackMode is `ON_DEMAND` or
43
+ # `LIVE_REPLAY`, the first fragment ingested with a producer timestamp
44
+ # within the specified FragmentSelector$TimestampRange is included in
45
+ # the media playlist. In addition, the fragments with producer
46
+ # timestamps within the `TimestampRange` ingested immediately
47
+ # following the first fragment (up to the
48
+ # GetDASHStreamingSessionURLInput$MaxManifestFragmentResults value)
49
+ # are included.
50
+ #
51
+ # Fragments that have duplicate producer timestamps are deduplicated.
52
+ # This means that if producers are producing a stream of fragments
53
+ # with producer timestamps that are approximately equal to the true
54
+ # clock time, the MPEG-DASH manifest will contain all of the fragments
55
+ # within the requested timestamp range. If some fragments are ingested
56
+ # within the same time range and very different points in time, only
57
+ # the oldest ingested collection of fragments are returned.
58
+ #
59
+ # When `FragmentSelectorType` is set to `PRODUCER_TIMESTAMP` and
60
+ # GetDASHStreamingSessionURLInput$PlaybackMode is `LIVE`, the producer
61
+ # timestamps are used in the MP4 fragments and for deduplication. But
62
+ # the most recently ingested fragments based on server timestamps are
63
+ # included in the MPEG-DASH manifest. This means that even if
64
+ # fragments ingested in the past have producer timestamps with values
65
+ # now, they are not included in the HLS media playlist.
66
+ #
67
+ # The default is `SERVER_TIMESTAMP`.
68
+ # @return [String]
69
+ #
70
+ # @!attribute [rw] timestamp_range
71
+ # The start and end of the timestamp range for the requested media.
72
+ #
73
+ # This value should not be present if `PlaybackType` is `LIVE`.
74
+ # @return [Types::DASHTimestampRange]
75
+ #
76
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/DASHFragmentSelector AWS API Documentation
77
+ #
78
+ class DASHFragmentSelector < Struct.new(
79
+ :fragment_selector_type,
80
+ :timestamp_range)
81
+ include Aws::Structure
82
+ end
83
+
84
+ # The start and end of the timestamp range for the requested media.
85
+ #
86
+ # This value should not be present if `PlaybackType` is `LIVE`.
87
+ #
88
+ # <note markdown="1"> The values in the `DASHimestampRange` are inclusive. Fragments that
89
+ # begin before the start time but continue past it, or fragments that
90
+ # begin before the end time but continue past it, are included in the
91
+ # session.
92
+ #
93
+ # </note>
94
+ #
95
+ # @note When making an API call, you may pass DASHTimestampRange
96
+ # data as a hash:
97
+ #
98
+ # {
99
+ # start_timestamp: Time.now,
100
+ # end_timestamp: Time.now,
101
+ # }
102
+ #
103
+ # @!attribute [rw] start_timestamp
104
+ # The start of the timestamp range for the requested media.
105
+ #
106
+ # If the `DASHTimestampRange` value is specified, the `StartTimestamp`
107
+ # value is required.
108
+ #
109
+ # <note markdown="1"> This value is inclusive. Fragments that start before the
110
+ # `StartTimestamp` and continue past it are included in the session.
111
+ # If `FragmentSelectorType` is `SERVER_TIMESTAMP`, the
112
+ # `StartTimestamp` must be later than the stream head.
113
+ #
114
+ # </note>
115
+ # @return [Time]
116
+ #
117
+ # @!attribute [rw] end_timestamp
118
+ # The end of the timestamp range for the requested media. This value
119
+ # must be within 3 hours of the specified `StartTimestamp`, and it
120
+ # must be later than the `StartTimestamp` value.
121
+ #
122
+ # If `FragmentSelectorType` for the request is `SERVER_TIMESTAMP`,
123
+ # this value must be in the past.
124
+ #
125
+ # The `EndTimestamp` value is required for `ON_DEMAND` mode, but
126
+ # optional for `LIVE_REPLAY` mode. If the `EndTimestamp` is not set
127
+ # for `LIVE_REPLAY` mode then the session will continue to include
128
+ # newly ingested fragments until the session expires.
129
+ #
130
+ # <note markdown="1"> This value is inclusive. The `EndTimestamp` is compared to the
131
+ # (starting) timestamp of the fragment. Fragments that start before
132
+ # the `EndTimestamp` value and continue past it are included in the
133
+ # session.
134
+ #
135
+ # </note>
136
+ # @return [Time]
137
+ #
138
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/DASHTimestampRange AWS API Documentation
139
+ #
140
+ class DASHTimestampRange < Struct.new(
141
+ :start_timestamp,
142
+ :end_timestamp)
143
+ include Aws::Structure
144
+ end
145
+
24
146
  # Represents a segment of video or other time-delimited data.
25
147
  #
26
148
  # @!attribute [rw] fragment_number
27
- # The index value of the fragment.
149
+ # The unique identifier of the fragment. This value monotonically
150
+ # increases based on the ingestion order.
28
151
  # @return [String]
29
152
  #
30
153
  # @!attribute [rw] fragment_size_in_bytes
@@ -103,13 +226,214 @@ module Aws::KinesisVideoArchivedMedia
103
226
  include Aws::Structure
104
227
  end
105
228
 
229
+ # @note When making an API call, you may pass GetDASHStreamingSessionURLInput
230
+ # data as a hash:
231
+ #
232
+ # {
233
+ # stream_name: "StreamName",
234
+ # stream_arn: "ResourceARN",
235
+ # playback_mode: "LIVE", # accepts LIVE, LIVE_REPLAY, ON_DEMAND
236
+ # display_fragment_timestamp: "ALWAYS", # accepts ALWAYS, NEVER
237
+ # display_fragment_number: "ALWAYS", # accepts ALWAYS, NEVER
238
+ # dash_fragment_selector: {
239
+ # fragment_selector_type: "PRODUCER_TIMESTAMP", # accepts PRODUCER_TIMESTAMP, SERVER_TIMESTAMP
240
+ # timestamp_range: {
241
+ # start_timestamp: Time.now,
242
+ # end_timestamp: Time.now,
243
+ # },
244
+ # },
245
+ # expires: 1,
246
+ # max_manifest_fragment_results: 1,
247
+ # }
248
+ #
249
+ # @!attribute [rw] stream_name
250
+ # The name of the stream for which to retrieve the MPEG-DASH manifest
251
+ # URL.
252
+ #
253
+ # You must specify either the `StreamName` or the `StreamARN`.
254
+ # @return [String]
255
+ #
256
+ # @!attribute [rw] stream_arn
257
+ # The Amazon Resource Name (ARN) of the stream for which to retrieve
258
+ # the MPEG-DASH manifest URL.
259
+ #
260
+ # You must specify either the `StreamName` or the `StreamARN`.
261
+ # @return [String]
262
+ #
263
+ # @!attribute [rw] playback_mode
264
+ # Whether to retrieve live, live replay, or archived, on-demand data.
265
+ #
266
+ # Features of the three types of sessions include the following:
267
+ #
268
+ # * <b> <code>LIVE</code> </b>\: For sessions of this type, the
269
+ # MPEG-DASH manifest is continually updated with the latest
270
+ # fragments as they become available. We recommend that the media
271
+ # player retrieve a new manifest on a one-second interval. When this
272
+ # type of session is played in a media player, the user interface
273
+ # typically displays a "live" notification, with no scrubber
274
+ # control for choosing the position in the playback window to
275
+ # display.
276
+ #
277
+ # <note markdown="1"> In `LIVE` mode, the newest available fragments are included in an
278
+ # MPEG-DASH manifest, even if there is a gap between fragments (that
279
+ # is, if a fragment is missing). A gap like this might cause a media
280
+ # player to halt or cause a jump in playback. In this mode,
281
+ # fragments are not added to the MPEG-DASH manifest if they are
282
+ # older than the newest fragment in the playlist. If the missing
283
+ # fragment becomes available after a subsequent fragment is added to
284
+ # the manifest, the older fragment is not added, and the gap is not
285
+ # filled.
286
+ #
287
+ # </note>
288
+ #
289
+ # * <b> <code>LIVE_REPLAY</code> </b>\: For sessions of this type, the
290
+ # MPEG-DASH manifest is updated similarly to how it is updated for
291
+ # `LIVE` mode except that it starts by including fragments from a
292
+ # given start time. Instead of fragments being added as they are
293
+ # ingested, fragments are added as the duration of the next fragment
294
+ # elapses. For example, if the fragments in the session are two
295
+ # seconds long, then a new fragment is added to the manifest every
296
+ # two seconds. This mode is useful to be able to start playback from
297
+ # when an event is detected and continue live streaming media that
298
+ # has not yet been ingested as of the time of the session creation.
299
+ # This mode is also useful to stream previously archived media
300
+ # without being limited by the 1,000 fragment limit in the
301
+ # `ON_DEMAND` mode.
302
+ #
303
+ # * <b> <code>ON_DEMAND</code> </b>\: For sessions of this type, the
304
+ # MPEG-DASH manifest contains all the fragments for the session, up
305
+ # to the number that is specified in
306
+ # `MaxMediaPlaylistFragmentResults`. The manifest must be retrieved
307
+ # only once for each session. When this type of session is played in
308
+ # a media player, the user interface typically displays a scrubber
309
+ # control for choosing the position in the playback window to
310
+ # display.
311
+ #
312
+ # In all playback modes, if `FragmentSelectorType` is
313
+ # `PRODUCER_TIMESTAMP`, and if there are multiple fragments with the
314
+ # same start timestamp, the fragment that has the larger fragment
315
+ # number (that is, the newer fragment) is included in the MPEG-DASH
316
+ # manifest. The other fragments are not included. Fragments that have
317
+ # different timestamps but have overlapping durations are still
318
+ # included in the MPEG-DASH manifest. This can lead to unexpected
319
+ # behavior in the media player.
320
+ #
321
+ # The default is `LIVE`.
322
+ # @return [String]
323
+ #
324
+ # @!attribute [rw] display_fragment_timestamp
325
+ # Per the MPEG-DASH specification, the wall-clock time of fragments in
326
+ # the manifest file can be derived using attributes in the manifest
327
+ # itself. However, typically, MPEG-DASH compatible media players do
328
+ # not properly handle gaps in the media timeline. Kinesis Video
329
+ # Streams adjusts the media timeline in the manifest file to enable
330
+ # playback of media with discontinuities. Therefore, the wall-clock
331
+ # time derived from the manifest file may be inaccurate. If
332
+ # DisplayFragmentTimestamp is set to `ALWAYS`, the accurate fragment
333
+ # timestamp is added to each S element in the manifest file with the
334
+ # attribute name “kvs:ts”. A custom MPEG-DASH media player is
335
+ # necessary to leverage this custom attribute.
336
+ #
337
+ # The default value is `NEVER`. When DASHFragmentSelector is
338
+ # `SERVER_TIMESTAMP`, the timestamps will be the server start
339
+ # timestamps. Similarly, when DASHFragmentSelector is
340
+ # `PRODUCER_TIMESTAMP`, the timestamps will be the producer start
341
+ # timestamps.
342
+ # @return [String]
343
+ #
344
+ # @!attribute [rw] display_fragment_number
345
+ # Fragments are identified in the manifest file based on their
346
+ # sequence number in the session. If DisplayFragmentNumber is set to
347
+ # `ALWAYS`, the Kinesis Video Streams fragment number is added to each
348
+ # S element in the manifest file with the attribute name “kvs:fn”.
349
+ # These fragment numbers can be used for logging or for use with other
350
+ # APIs (e.g. `GetMedia` and `GetMediaForFragmentList`). A custom
351
+ # MPEG-DASH media player is necessary to leverage these this custom
352
+ # attribute.
353
+ #
354
+ # The default value is `NEVER`.
355
+ # @return [String]
356
+ #
357
+ # @!attribute [rw] dash_fragment_selector
358
+ # The time range of the requested fragment and the source of the
359
+ # timestamps.
360
+ #
361
+ # This parameter is required if `PlaybackMode` is `ON_DEMAND` or
362
+ # `LIVE_REPLAY`. This parameter is optional if PlaybackMode is` LIVE.
363
+ # If PlaybackMode is LIVE, the FragmentSelectorType can be set, but
364
+ # the TimestampRange should not be set. If PlaybackMode is ON_DEMAND
365
+ # or LIVE_REPLAY, both FragmentSelectorType and TimestampRange must be
366
+ # set.</p>
367
+ # `
368
+ # @return [Types::DASHFragmentSelector]
369
+ #
370
+ # @!attribute [rw] expires
371
+ # The time in seconds until the requested session expires. This value
372
+ # can be between 300 (5 minutes) and 43200 (12 hours).
373
+ #
374
+ # When a session expires, no new calls to `GetDashManifest`,
375
+ # `GetMP4InitFragment`, or `GetMP4MediaFragment` can be made for that
376
+ # session.
377
+ #
378
+ # The default is 300 (5 minutes).
379
+ # @return [Integer]
380
+ #
381
+ # @!attribute [rw] max_manifest_fragment_results
382
+ # The maximum number of fragments that are returned in the MPEG-DASH
383
+ # manifest.
384
+ #
385
+ # When the `PlaybackMode` is `LIVE`, the most recent fragments are
386
+ # returned up to this value. When the `PlaybackMode` is `ON_DEMAND`,
387
+ # the oldest fragments are returned, up to this maximum number.
388
+ #
389
+ # When there are a higher number of fragments available in a live
390
+ # MPEG-DASH manifest, video players often buffer content before
391
+ # starting playback. Increasing the buffer size increases the playback
392
+ # latency, but it decreases the likelihood that rebuffering will occur
393
+ # during playback. We recommend that a live MPEG-DASH manifest have a
394
+ # minimum of 3 fragments and a maximum of 10 fragments.
395
+ #
396
+ # The default is 5 fragments if `PlaybackMode` is `LIVE` or
397
+ # `LIVE_REPLAY`, and 1,000 if `PlaybackMode` is `ON_DEMAND`.
398
+ #
399
+ # The maximum value of 1,000 fragments corresponds to more than 16
400
+ # minutes of video on streams with 1-second fragments, and more than 2
401
+ # 1/2 hours of video on streams with 10-second fragments.
402
+ # @return [Integer]
403
+ #
404
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetDASHStreamingSessionURLInput AWS API Documentation
405
+ #
406
+ class GetDASHStreamingSessionURLInput < Struct.new(
407
+ :stream_name,
408
+ :stream_arn,
409
+ :playback_mode,
410
+ :display_fragment_timestamp,
411
+ :display_fragment_number,
412
+ :dash_fragment_selector,
413
+ :expires,
414
+ :max_manifest_fragment_results)
415
+ include Aws::Structure
416
+ end
417
+
418
+ # @!attribute [rw] dash_streaming_session_url
419
+ # The URL (containing the session token) that a media player can use
420
+ # to retrieve the MPEG-DASH manifest.
421
+ # @return [String]
422
+ #
423
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetDASHStreamingSessionURLOutput AWS API Documentation
424
+ #
425
+ class GetDASHStreamingSessionURLOutput < Struct.new(
426
+ :dash_streaming_session_url)
427
+ include Aws::Structure
428
+ end
429
+
106
430
  # @note When making an API call, you may pass GetHLSStreamingSessionURLInput
107
431
  # data as a hash:
108
432
  #
109
433
  # {
110
434
  # stream_name: "StreamName",
111
435
  # stream_arn: "ResourceARN",
112
- # playback_mode: "LIVE", # accepts LIVE, ON_DEMAND
436
+ # playback_mode: "LIVE", # accepts LIVE, LIVE_REPLAY, ON_DEMAND
113
437
  # hls_fragment_selector: {
114
438
  # fragment_selector_type: "PRODUCER_TIMESTAMP", # accepts PRODUCER_TIMESTAMP, SERVER_TIMESTAMP
115
439
  # timestamp_range: {
@@ -118,7 +442,7 @@ module Aws::KinesisVideoArchivedMedia
118
442
  # },
119
443
  # },
120
444
  # container_format: "FRAGMENTED_MP4", # accepts FRAGMENTED_MP4, MPEG_TS
121
- # discontinuity_mode: "ALWAYS", # accepts ALWAYS, NEVER
445
+ # discontinuity_mode: "ALWAYS", # accepts ALWAYS, NEVER, ON_DISCONTINUITY
122
446
  # display_fragment_timestamp: "ALWAYS", # accepts ALWAYS, NEVER
123
447
  # expires: 1,
124
448
  # max_media_playlist_fragment_results: 1,
@@ -139,9 +463,9 @@ module Aws::KinesisVideoArchivedMedia
139
463
  # @return [String]
140
464
  #
141
465
  # @!attribute [rw] playback_mode
142
- # Whether to retrieve live or archived, on-demand data.
466
+ # Whether to retrieve live, live replay, or archived, on-demand data.
143
467
  #
144
- # Features of the two types of session include the following:
468
+ # Features of the three types of sessions include the following:
145
469
  #
146
470
  # * <b> <code>LIVE</code> </b>\: For sessions of this type, the HLS
147
471
  # media playlist is continually updated with the latest fragments as
@@ -163,6 +487,20 @@ module Aws::KinesisVideoArchivedMedia
163
487
  #
164
488
  # </note>
165
489
  #
490
+ # * <b> <code>LIVE_REPLAY</code> </b>\: For sessions of this type, the
491
+ # HLS media playlist is updated similarly to how it is updated for
492
+ # `LIVE` mode except that it starts by including fragments from a
493
+ # given start time. Instead of fragments being added as they are
494
+ # ingested, fragments are added as the duration of the next fragment
495
+ # elapses. For example, if the fragments in the session are two
496
+ # seconds long, then a new fragment is added to the media playlist
497
+ # every two seconds. This mode is useful to be able to start
498
+ # playback from when an event is detected and continue live
499
+ # streaming media that has not yet been ingested as of the time of
500
+ # the session creation. This mode is also useful to stream
501
+ # previously archived media without being limited by the 1,000
502
+ # fragment limit in the `ON_DEMAND` mode.
503
+ #
166
504
  # * <b> <code>ON_DEMAND</code> </b>\: For sessions of this type, the
167
505
  # HLS media playlist contains all the fragments for the session, up
168
506
  # to the number that is specified in
@@ -172,7 +510,7 @@ module Aws::KinesisVideoArchivedMedia
172
510
  # control for choosing the position in the playback window to
173
511
  # display.
174
512
  #
175
- # In both playback modes, if `FragmentSelectorType` is
513
+ # In all playback modes, if `FragmentSelectorType` is
176
514
  # `PRODUCER_TIMESTAMP`, and if there are multiple fragments with the
177
515
  # same start timestamp, the fragment that has the larger fragment
178
516
  # number (that is, the newer fragment) is included in the HLS media
@@ -185,15 +523,16 @@ module Aws::KinesisVideoArchivedMedia
185
523
  # @return [String]
186
524
  #
187
525
  # @!attribute [rw] hls_fragment_selector
188
- # The time range of the requested fragment, and the source of the
526
+ # The time range of the requested fragment and the source of the
189
527
  # timestamps.
190
528
  #
191
- # This parameter is required if `PlaybackMode` is `ON_DEMAND`. This
192
- # parameter is optional if `PlaybackMode` is `LIVE`. If `PlaybackMode`
193
- # is `LIVE`, the `FragmentSelectorType` can be set, but the
194
- # `TimestampRange` should not be set. If `PlaybackMode` is
195
- # `ON_DEMAND`, both `FragmentSelectorType` and `TimestampRange` must
196
- # be set.
529
+ # This parameter is required if `PlaybackMode` is `ON_DEMAND` or
530
+ # `LIVE_REPLAY`. This parameter is optional if PlaybackMode is` LIVE.
531
+ # If PlaybackMode is LIVE, the FragmentSelectorType can be set, but
532
+ # the TimestampRange should not be set. If PlaybackMode is ON_DEMAND
533
+ # or LIVE_REPLAY, both FragmentSelectorType and TimestampRange must be
534
+ # set.</p>
535
+ # `
197
536
  # @return [Types::HLSFragmentSelector]
198
537
  #
199
538
  # @!attribute [rw] container_format
@@ -211,24 +550,40 @@ module Aws::KinesisVideoArchivedMedia
211
550
  # @return [String]
212
551
  #
213
552
  # @!attribute [rw] discontinuity_mode
214
- # Specifies when flags marking discontinuities between fragments will
215
- # be added to the media playlists. The default is `ALWAYS` when
216
- # HLSFragmentSelector is `SERVER_TIMESTAMP`, and `NEVER` when it is
217
- # `PRODUCER_TIMESTAMP`.
553
+ # Specifies when flags marking discontinuities between fragments are
554
+ # added to the media playlists.
218
555
  #
219
556
  # Media players typically build a timeline of media content to play,
220
557
  # based on the timestamps of each fragment. This means that if there
221
- # is any overlap between fragments (as is typical if
222
- # HLSFragmentSelector is `SERVER_TIMESTAMP`), the media player
223
- # timeline has small gaps between fragments in some places, and
224
- # overwrites frames in other places. When there are discontinuity
225
- # flags between fragments, the media player is expected to reset the
226
- # timeline, resulting in the fragment being played immediately after
227
- # the previous fragment. We recommend that you always have
228
- # discontinuity flags between fragments if the fragment timestamps are
229
- # not accurate or if fragments might be missing. You should not place
230
- # discontinuity flags between fragments for the player timeline to
231
- # accurately map to the producer timestamps.
558
+ # is any overlap or gap between fragments (as is typical if
559
+ # HLSFragmentSelector is set to `SERVER_TIMESTAMP`), the media player
560
+ # timeline will also have small gaps between fragments in some places,
561
+ # and will overwrite frames in other places. Gaps in the media player
562
+ # timeline can cause playback to stall and overlaps can cause playback
563
+ # to be jittery. When there are discontinuity flags between fragments,
564
+ # the media player is expected to reset the timeline, resulting in the
565
+ # next fragment being played immediately after the previous fragment.
566
+ #
567
+ # The following modes are supported:
568
+ #
569
+ # * `ALWAYS`\: a discontinuity marker is placed between every fragment
570
+ # in the HLS media playlist. It is recommended to use a value of
571
+ # `ALWAYS` if the fragment timestamps are not accurate.
572
+ #
573
+ # * `NEVER`\: no discontinuity markers are placed anywhere. It is
574
+ # recommended to use a value of `NEVER` to ensure the media player
575
+ # timeline most accurately maps to the producer timestamps.
576
+ #
577
+ # * `ON_DISCONTIUNITY`\: a discontinuity marker is placed between
578
+ # fragments that have a gap or overlap of more than 50 milliseconds.
579
+ # For most playback scenarios, it is recommended to use a value of
580
+ # `ON_DISCONTINUITY` so that the media player timeline is only reset
581
+ # when there is a significant issue with the media timeline (e.g. a
582
+ # missing fragment).
583
+ #
584
+ # The default is `ALWAYS` when HLSFragmentSelector is set to
585
+ # `SERVER_TIMESTAMP`, and `NEVER` when it is set to
586
+ # `PRODUCER_TIMESTAMP`.
232
587
  # @return [String]
233
588
  #
234
589
  # @!attribute [rw] display_fragment_timestamp
@@ -253,8 +608,8 @@ module Aws::KinesisVideoArchivedMedia
253
608
  # can be between 300 (5 minutes) and 43200 (12 hours).
254
609
  #
255
610
  # When a session expires, no new calls to `GetHLSMasterPlaylist`,
256
- # `GetHLSMediaPlaylist`, `GetMP4InitFragment`, or
257
- # `GetMP4MediaFragment` can be made for that session.
611
+ # `GetHLSMediaPlaylist`, `GetMP4InitFragment`, `GetMP4MediaFragment`,
612
+ # or `GetTSFragment` can be made for that session.
258
613
  #
259
614
  # The default is 300 (5 minutes).
260
615
  # @return [Integer]
@@ -274,8 +629,8 @@ module Aws::KinesisVideoArchivedMedia
274
629
  # playback. We recommend that a live HLS media playlist have a minimum
275
630
  # of 3 fragments and a maximum of 10 fragments.
276
631
  #
277
- # The default is 5 fragments if `PlaybackMode` is `LIVE`, and 1,000 if
278
- # `PlaybackMode` is `ON_DEMAND`.
632
+ # The default is 5 fragments if `PlaybackMode` is `LIVE` or
633
+ # `LIVE_REPLAY`, and 1,000 if `PlaybackMode` is `ON_DEMAND`.
279
634
  #
280
635
  # The maximum value of 1,000 fragments corresponds to more than 16
281
636
  # minutes of video on streams with 1-second fragments, and more than 2
@@ -396,12 +751,12 @@ module Aws::KinesisVideoArchivedMedia
396
751
  # The source of the timestamps for the requested media.
397
752
  #
398
753
  # When `FragmentSelectorType` is set to `PRODUCER_TIMESTAMP` and
399
- # GetHLSStreamingSessionURLInput$PlaybackMode is `ON_DEMAND`, the
400
- # first fragment ingested with a producer timestamp within the
401
- # specified FragmentSelector$TimestampRange is included in the media
402
- # playlist. In addition, the fragments with producer timestamps within
403
- # the `TimestampRange` ingested immediately following the first
404
- # fragment (up to the
754
+ # GetHLSStreamingSessionURLInput$PlaybackMode is `ON_DEMAND` or
755
+ # `LIVE_REPLAY`, the first fragment ingested with a producer timestamp
756
+ # within the specified FragmentSelector$TimestampRange is included in
757
+ # the media playlist. In addition, the fragments with producer
758
+ # timestamps within the `TimestampRange` ingested immediately
759
+ # following the first fragment (up to the
405
760
  # GetHLSStreamingSessionURLInput$MaxMediaPlaylistFragmentResults
406
761
  # value) are included.
407
762
  #
@@ -479,8 +834,10 @@ module Aws::KinesisVideoArchivedMedia
479
834
  # If `FragmentSelectorType` for the request is `SERVER_TIMESTAMP`,
480
835
  # this value must be in the past.
481
836
  #
482
- # If the `HLSTimestampRange` value is specified, the `EndTimestamp`
483
- # value is required.
837
+ # The `EndTimestamp` value is required for `ON_DEMAND` mode, but
838
+ # optional for `LIVE_REPLAY` mode. If the `EndTimestamp` is not set
839
+ # for `LIVE_REPLAY` mode then the session will continue to include
840
+ # newly ingested fragments until the session expires.
484
841
  #
485
842
  # <note markdown="1"> This value is inclusive. The `EndTimestamp` is compared to the
486
843
  # (starting) timestamp of the fragment. Fragments that start before
@@ -604,8 +961,8 @@ module Aws::KinesisVideoArchivedMedia
604
961
  include Aws::Structure
605
962
  end
606
963
 
607
- # A `PlaybackMode` of `ON_DEMAND` was requested for a stream that does
608
- # not retain data (that is, has a `DataRetentionInHours` of 0).
964
+ # A streaming session was requested for a stream that does not retain
965
+ # data (that is, has a `DataRetentionInHours` of 0).
609
966
  #
610
967
  # @!attribute [rw] message
611
968
  # @return [String]
@@ -633,11 +990,12 @@ module Aws::KinesisVideoArchivedMedia
633
990
  # `GetMedia` throws this error when Kinesis Video Streams can't find
634
991
  # the stream that you specified.
635
992
  #
636
- # `GetHLSStreamingSessionURL` throws this error if a session with a
637
- # `PlaybackMode` of `ON_DEMAND` is requested for a stream that has no
638
- # fragments within the requested time range, or if a session with a
639
- # `PlaybackMode` of `LIVE` is requested for a stream that has no
640
- # fragments within the last 30 seconds.
993
+ # `GetHLSStreamingSessionURL` and `GetDASHStreamingSessionURL` throw
994
+ # this error if a session with a `PlaybackMode` of `ON_DEMAND` or
995
+ # `LIVE_REPLAY`is requested for a stream that has no fragments within
996
+ # the requested time range, or if a session with a `PlaybackMode` of
997
+ # `LIVE` is requested for a stream that has no fragments within the last
998
+ # 30 seconds.
641
999
  #
642
1000
  # @!attribute [rw] message
643
1001
  # @return [String]
@@ -677,11 +1035,11 @@ module Aws::KinesisVideoArchivedMedia
677
1035
  include Aws::Structure
678
1036
  end
679
1037
 
680
- # The type of the media (for example, h.264 video or ACC audio) could
681
- # not be determined from the codec IDs of the tracks in the first
682
- # fragment for a playback session. The codec ID for track 1 should be
683
- # `V_MPEG/ISO/AVC` and, optionally, the codec ID for track 2 should be
684
- # `A_AAC`.
1038
+ # The type of the media (for example, h.264 or h.265 video or ACC or
1039
+ # G.711 audio) could not be determined from the codec IDs of the tracks
1040
+ # in the first fragment for a playback session. The codec ID for track 1
1041
+ # should be `V_MPEG/ISO/AVC` and, optionally, the codec ID for track 2
1042
+ # should be `A_AAC`.
685
1043
  #
686
1044
  # @!attribute [rw] message
687
1045
  # @return [String]