blib/lib/Paws/KinesisVideoArchivedMedia/GetDASHStreamingSessionURL.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 20 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::KinesisVideoArchivedMedia::GetDASHStreamingSessionURL;
3 use Moose;
4 has DASHFragmentSelector => (is => 'ro', isa => 'Paws::KinesisVideoArchivedMedia::DASHFragmentSelector');
5 has DisplayFragmentNumber => (is => 'ro', isa => 'Str');
6 has DisplayFragmentTimestamp => (is => 'ro', isa => 'Str');
7 has Expires => (is => 'ro', isa => 'Int');
8 has MaxManifestFragmentResults => (is => 'ro', isa => 'Int');
9 has PlaybackMode => (is => 'ro', isa => 'Str');
10 has StreamARN => (is => 'ro', isa => 'Str');
11 has StreamName => (is => 'ro', isa => 'Str');
12  
13 use MooseX::ClassAttribute;
14  
15 class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetDASHStreamingSessionURL');
16 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/getDASHStreamingSessionURL');
17 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
18 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::KinesisVideoArchivedMedia::GetDASHStreamingSessionURLOutput');
19 1;
20  
21 ### main pod documentation begin ###
22  
23 =head1 NAME
24  
25 Paws::KinesisVideoArchivedMedia::GetDASHStreamingSessionURL - Arguments for method GetDASHStreamingSessionURL on L<Paws::KinesisVideoArchivedMedia>
26  
27 =head1 DESCRIPTION
28  
29 This class represents the parameters used for calling the method GetDASHStreamingSessionURL on the
30 L<Amazon Kinesis Video Streams Archived Media|Paws::KinesisVideoArchivedMedia> service. Use the attributes of this class
31 as arguments to method GetDASHStreamingSessionURL.
32  
33 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetDASHStreamingSessionURL.
34  
35 =head1 SYNOPSIS
36  
37 my $kinesisvideo = Paws->service('KinesisVideoArchivedMedia');
38 my $GetDASHStreamingSessionURLOutput =
39 $kinesisvideo->GetDASHStreamingSessionURL(
40 DASHFragmentSelector => {
41 FragmentSelectorType => 'PRODUCER_TIMESTAMP'
42 , # values: PRODUCER_TIMESTAMP, SERVER_TIMESTAMP; OPTIONAL
43 TimestampRange => {
44 EndTimestamp => '1970-01-01T01:00:00', # OPTIONAL
45 StartTimestamp => '1970-01-01T01:00:00', # OPTIONAL
46 }, # OPTIONAL
47 }, # OPTIONAL
48 DisplayFragmentNumber => 'ALWAYS', # OPTIONAL
49 DisplayFragmentTimestamp => 'ALWAYS', # OPTIONAL
50 Expires => 1, # OPTIONAL
51 MaxManifestFragmentResults => 1, # OPTIONAL
52 PlaybackMode => 'LIVE', # OPTIONAL
53 StreamARN => 'MyResourceARN', # OPTIONAL
54 StreamName => 'MyStreamName', # OPTIONAL
55 );
56  
57 # Results:
58 my $DASHStreamingSessionURL =
59 $GetDASHStreamingSessionURLOutput->DASHStreamingSessionURL;
60  
61 # Returns a L<Paws::KinesisVideoArchivedMedia::GetDASHStreamingSessionURLOutput> object.
62  
63 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
64 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/kinesisvideo/GetDASHStreamingSessionURL>
65  
66 =head1 ATTRIBUTES
67  
68  
69 =head2 DASHFragmentSelector => L<Paws::KinesisVideoArchivedMedia::DASHFragmentSelector>
70  
71 The time range of the requested fragment and the source of the
72 timestamps.
73  
74 This parameter is required if C<PlaybackMode> is C<ON_DEMAND> or
75 C<LIVE_REPLAY>. This parameter is optional if PlaybackMode isC<
76 C<LIVE>. If C<PlaybackMode> is C<LIVE>, the C<FragmentSelectorType> can
77 be set, but the C<TimestampRange> should not be set. If C<PlaybackMode>
78 is C<ON_DEMAND> or C<LIVE_REPLAY>, both C<FragmentSelectorType> and
79 C<TimestampRange> must be set.>
80  
81  
82  
83 =head2 DisplayFragmentNumber => Str
84  
85 Fragments are identified in the manifest file based on their sequence
86 number in the session. If DisplayFragmentNumber is set to C<ALWAYS>,
87 the Kinesis Video Streams fragment number is added to each S element in
88 the manifest file with the attribute name E<ldquo>kvs:fnE<rdquo>. These
89 fragment numbers can be used for logging or for use with other APIs
90 (e.g. C<GetMedia> and C<GetMediaForFragmentList>). A custom MPEG-DASH
91 media player is necessary to leverage these this custom attribute.
92  
93 The default value is C<NEVER>.
94  
95 Valid values are: C<"ALWAYS">, C<"NEVER">
96  
97 =head2 DisplayFragmentTimestamp => Str
98  
99 Per the MPEG-DASH specification, the wall-clock time of fragments in
100 the manifest file can be derived using attributes in the manifest
101 itself. However, typically, MPEG-DASH compatible media players do not
102 properly handle gaps in the media timeline. Kinesis Video Streams
103 adjusts the media timeline in the manifest file to enable playback of
104 media with discontinuities. Therefore, the wall-clock time derived from
105 the manifest file may be inaccurate. If DisplayFragmentTimestamp is set
106 to C<ALWAYS>, the accurate fragment timestamp is added to each S
107 element in the manifest file with the attribute name
108 E<ldquo>kvs:tsE<rdquo>. A custom MPEG-DASH media player is necessary to
109 leverage this custom attribute.
110  
111 The default value is C<NEVER>. When DASHFragmentSelector is
112 C<SERVER_TIMESTAMP>, the timestamps will be the server start
113 timestamps. Similarly, when DASHFragmentSelector is
114 C<PRODUCER_TIMESTAMP>, the timestamps will be the producer start
115 timestamps.
116  
117 Valid values are: C<"ALWAYS">, C<"NEVER">
118  
119 =head2 Expires => Int
120  
121 The time in seconds until the requested session expires. This value can
122 be between 300 (5 minutes) and 43200 (12 hours).
123  
124 When a session expires, no new calls to C<GetDashManifest>,
125 C<GetMP4InitFragment>, or C<GetMP4MediaFragment> can be made for that
126 session.
127  
128 The default is 300 (5 minutes).
129  
130  
131  
132 =head2 MaxManifestFragmentResults => Int
133  
134 The maximum number of fragments that are returned in the MPEG-DASH
135 manifest.
136  
137 When the C<PlaybackMode> is C<LIVE>, the most recent fragments are
138 returned up to this value. When the C<PlaybackMode> is C<ON_DEMAND>,
139 the oldest fragments are returned, up to this maximum number.
140  
141 When there are a higher number of fragments available in a live
142 MPEG-DASH manifest, video players often buffer content before starting
143 playback. Increasing the buffer size increases the playback latency,
144 but it decreases the likelihood that rebuffering will occur during
145 playback. We recommend that a live MPEG-DASH manifest have a minimum of
146 3 fragments and a maximum of 10 fragments.
147  
148 The default is 5 fragments if C<PlaybackMode> is C<LIVE> or
149 C<LIVE_REPLAY>, and 1,000 if C<PlaybackMode> is C<ON_DEMAND>.
150  
151 The maximum value of 1,000 fragments corresponds to more than 16
152 minutes of video on streams with 1-second fragments, and more than 2
153 1/2 hours of video on streams with 10-second fragments.
154  
155  
156  
157 =head2 PlaybackMode => Str
158  
159 Whether to retrieve live, live replay, or archived, on-demand data.
160  
161 Features of the three types of sessions include the following:
162  
163 =over
164  
165 =item *
166  
167 B<C<LIVE> >: For sessions of this type, the MPEG-DASH manifest is
168 continually updated with the latest fragments as they become available.
169 We recommend that the media player retrieve a new manifest on a
170 one-second interval. When this type of session is played in a media
171 player, the user interface typically displays a "live" notification,
172 with no scrubber control for choosing the position in the playback
173 window to display.
174  
175 In C<LIVE> mode, the newest available fragments are included in an
176 MPEG-DASH manifest, even if there is a gap between fragments (that is,
177 if a fragment is missing). A gap like this might cause a media player
178 to halt or cause a jump in playback. In this mode, fragments are not
179 added to the MPEG-DASH manifest if they are older than the newest
180 fragment in the playlist. If the missing fragment becomes available
181 after a subsequent fragment is added to the manifest, the older
182 fragment is not added, and the gap is not filled.
183  
184 =item *
185  
186 B<C<LIVE_REPLAY> >: For sessions of this type, the MPEG-DASH manifest
187 is updated similarly to how it is updated for C<LIVE> mode except that
188 it starts by including fragments from a given start time. Instead of
189 fragments being added as they are ingested, fragments are added as the
190 duration of the next fragment elapses. For example, if the fragments in
191 the session are two seconds long, then a new fragment is added to the
192 manifest every two seconds. This mode is useful to be able to start
193 playback from when an event is detected and continue live streaming
194 media that has not yet been ingested as of the time of the session
195 creation. This mode is also useful to stream previously archived media
196 without being limited by the 1,000 fragment limit in the C<ON_DEMAND>
197 mode.
198  
199 =item *
200  
201 B<C<ON_DEMAND> >: For sessions of this type, the MPEG-DASH manifest
202 contains all the fragments for the session, up to the number that is
203 specified in C<MaxManifestFragmentResults>. The manifest must be
204 retrieved only once for each session. When this type of session is
205 played in a media player, the user interface typically displays a
206 scrubber control for choosing the position in the playback window to
207 display.
208  
209 =back
210  
211 In all playback modes, if C<FragmentSelectorType> is
212 C<PRODUCER_TIMESTAMP>, and if there are multiple fragments with the
213 same start timestamp, the fragment that has the larger fragment number
214 (that is, the newer fragment) is included in the MPEG-DASH manifest.
215 The other fragments are not included. Fragments that have different
216 timestamps but have overlapping durations are still included in the
217 MPEG-DASH manifest. This can lead to unexpected behavior in the media
218 player.
219  
220 The default is C<LIVE>.
221  
222 Valid values are: C<"LIVE">, C<"LIVE_REPLAY">, C<"ON_DEMAND">
223  
224 =head2 StreamARN => Str
225  
226 The Amazon Resource Name (ARN) of the stream for which to retrieve the
227 MPEG-DASH manifest URL.
228  
229 You must specify either the C<StreamName> or the C<StreamARN>.
230  
231  
232  
233 =head2 StreamName => Str
234  
235 The name of the stream for which to retrieve the MPEG-DASH manifest
236 URL.
237  
238 You must specify either the C<StreamName> or the C<StreamARN>.
239  
240  
241  
242  
243 =head1 SEE ALSO
244  
245 This class forms part of L<Paws>, documenting arguments for method GetDASHStreamingSessionURL in L<Paws::KinesisVideoArchivedMedia>
246  
247 =head1 BUGS and CONTRIBUTIONS
248  
249 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
250  
251 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
252  
253 =cut
254