line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Paws::ElasticTranscoder::PresetWatermark; |
2
|
1
|
|
|
1
|
|
568
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
3
|
|
|
|
|
|
|
has HorizontalAlign => (is => 'ro', isa => 'Str'); |
4
|
|
|
|
|
|
|
has HorizontalOffset => (is => 'ro', isa => 'Str'); |
5
|
|
|
|
|
|
|
has Id => (is => 'ro', isa => 'Str'); |
6
|
|
|
|
|
|
|
has MaxHeight => (is => 'ro', isa => 'Str'); |
7
|
|
|
|
|
|
|
has MaxWidth => (is => 'ro', isa => 'Str'); |
8
|
|
|
|
|
|
|
has Opacity => (is => 'ro', isa => 'Str'); |
9
|
|
|
|
|
|
|
has SizingPolicy => (is => 'ro', isa => 'Str'); |
10
|
|
|
|
|
|
|
has Target => (is => 'ro', isa => 'Str'); |
11
|
|
|
|
|
|
|
has VerticalAlign => (is => 'ro', isa => 'Str'); |
12
|
|
|
|
|
|
|
has VerticalOffset => (is => 'ro', isa => 'Str'); |
13
|
|
|
|
|
|
|
1; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
### main pod documentation begin ### |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Paws::ElasticTranscoder::PresetWatermark |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 USAGE |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
This class represents one of two things: |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head3 Arguments in a call to a service |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. |
28
|
|
|
|
|
|
|
Each attribute should be used as a named argument in the calls that expect this type of object. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
As an example, if Att1 is expected to be a Paws::ElasticTranscoder::PresetWatermark object: |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
$service_obj->Method(Att1 => { HorizontalAlign => $value, ..., VerticalOffset => $value }); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head3 Results returned from an API call |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Use accessors for each attribute. If Att1 is expected to be an Paws::ElasticTranscoder::PresetWatermark object: |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
$result = $service_obj->Method(...); |
39
|
|
|
|
|
|
|
$result->Att1->HorizontalAlign |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 DESCRIPTION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Settings for the size, location, and opacity of graphics that you want |
44
|
|
|
|
|
|
|
Elastic Transcoder to overlay over videos that are transcoded using |
45
|
|
|
|
|
|
|
this preset. You can specify settings for up to four watermarks. |
46
|
|
|
|
|
|
|
Watermarks appear in the specified size and location, and with the |
47
|
|
|
|
|
|
|
specified opacity for the duration of the transcoded video. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Watermarks can be in .png or .jpg format. If you want to display a |
50
|
|
|
|
|
|
|
watermark that is not rectangular, use the .png format, which supports |
51
|
|
|
|
|
|
|
transparency. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
When you create a job that uses this preset, you specify the .png or |
54
|
|
|
|
|
|
|
.jpg graphics that you want Elastic Transcoder to include in the |
55
|
|
|
|
|
|
|
transcoded videos. You can specify fewer graphics in the job than you |
56
|
|
|
|
|
|
|
specify watermark settings in the preset, which allows you to use the |
57
|
|
|
|
|
|
|
same preset for up to four watermarks that have different dimensions. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 HorizontalAlign => Str |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
The horizontal position of the watermark unless you specify a non-zero |
65
|
|
|
|
|
|
|
value for C<HorizontalOffset>: |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=over |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item * |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
B<Left>: The left edge of the watermark is aligned with the left border |
72
|
|
|
|
|
|
|
of the video. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item * |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
B<Right>: The right edge of the watermark is aligned with the right |
77
|
|
|
|
|
|
|
border of the video. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=item * |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
B<Center>: The watermark is centered between the left and right |
82
|
|
|
|
|
|
|
borders. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=back |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head2 HorizontalOffset => Str |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
The amount by which you want the horizontal position of the watermark |
91
|
|
|
|
|
|
|
to be offset from the position specified by HorizontalAlign: |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=over |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=item * |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
number of pixels (px): The minimum value is 0 pixels, and the maximum |
98
|
|
|
|
|
|
|
value is the value of MaxWidth. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item * |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
integer percentage (%): The range of valid values is 0 to 100. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=back |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
For example, if you specify Left for C<HorizontalAlign> and 5px for |
107
|
|
|
|
|
|
|
C<HorizontalOffset>, the left side of the watermark appears 5 pixels |
108
|
|
|
|
|
|
|
from the left border of the output video. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
C<HorizontalOffset> is only valid when the value of C<HorizontalAlign> |
111
|
|
|
|
|
|
|
is C<Left> or C<Right>. If you specify an offset that causes the |
112
|
|
|
|
|
|
|
watermark to extend beyond the left or right border and Elastic |
113
|
|
|
|
|
|
|
Transcoder has not added black bars, the watermark is cropped. If |
114
|
|
|
|
|
|
|
Elastic Transcoder has added black bars, the watermark extends into the |
115
|
|
|
|
|
|
|
black bars. If the watermark extends beyond the black bars, it is |
116
|
|
|
|
|
|
|
cropped. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Use the value of C<Target> to specify whether you want to include the |
119
|
|
|
|
|
|
|
black bars that are added by Elastic Transcoder, if any, in the offset |
120
|
|
|
|
|
|
|
calculation. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head2 Id => Str |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
A unique identifier for the settings for one watermark. The value of |
126
|
|
|
|
|
|
|
C<Id> can be up to 40 characters long. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head2 MaxHeight => Str |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
The maximum height of the watermark in one of the following formats: |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=over |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=item * |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
number of pixels (px): The minimum value is 16 pixels, and the maximum |
138
|
|
|
|
|
|
|
value is the value of C<MaxHeight>. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=item * |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
integer percentage (%): The range of valid values is 0 to 100. Use the |
143
|
|
|
|
|
|
|
value of C<Target> to specify whether you want Elastic Transcoder to |
144
|
|
|
|
|
|
|
include the black bars that are added by Elastic Transcoder, if any, in |
145
|
|
|
|
|
|
|
the calculation. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=back |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
If you specify the value in pixels, it must be less than or equal to |
150
|
|
|
|
|
|
|
the value of C<MaxHeight>. |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=head2 MaxWidth => Str |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
The maximum width of the watermark in one of the following formats: |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=over |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=item * |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
number of pixels (px): The minimum value is 16 pixels, and the maximum |
162
|
|
|
|
|
|
|
value is the value of C<MaxWidth>. |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=item * |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
integer percentage (%): The range of valid values is 0 to 100. Use the |
167
|
|
|
|
|
|
|
value of C<Target> to specify whether you want Elastic Transcoder to |
168
|
|
|
|
|
|
|
include the black bars that are added by Elastic Transcoder, if any, in |
169
|
|
|
|
|
|
|
the calculation. |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
If you specify the value in pixels, it must be less than or equal to |
172
|
|
|
|
|
|
|
the value of C<MaxWidth>. |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=back |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=head2 Opacity => Str |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
A percentage that indicates how much you want a watermark to obscure |
181
|
|
|
|
|
|
|
the video in the location where it appears. Valid values are 0 (the |
182
|
|
|
|
|
|
|
watermark is invisible) to 100 (the watermark completely obscures the |
183
|
|
|
|
|
|
|
video in the specified location). The datatype of C<Opacity> is float. |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
Elastic Transcoder supports transparent .png graphics. If you use a |
186
|
|
|
|
|
|
|
transparent .png, the transparent portion of the video appears as if |
187
|
|
|
|
|
|
|
you had specified a value of 0 for C<Opacity>. The .jpg file format |
188
|
|
|
|
|
|
|
doesn't support transparency. |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=head2 SizingPolicy => Str |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
A value that controls scaling of the watermark: |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=over |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=item * |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
B<Fit>: Elastic Transcoder scales the watermark so it matches the value |
200
|
|
|
|
|
|
|
that you specified in either C<MaxWidth> or C<MaxHeight> without |
201
|
|
|
|
|
|
|
exceeding the other value. |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
=item * |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
B<Stretch>: Elastic Transcoder stretches the watermark to match the |
206
|
|
|
|
|
|
|
values that you specified for C<MaxWidth> and C<MaxHeight>. If the |
207
|
|
|
|
|
|
|
relative proportions of the watermark and the values of C<MaxWidth> and |
208
|
|
|
|
|
|
|
C<MaxHeight> are different, the watermark will be distorted. |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=item * |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
B<ShrinkToFit>: Elastic Transcoder scales the watermark down so that |
213
|
|
|
|
|
|
|
its dimensions match the values that you specified for at least one of |
214
|
|
|
|
|
|
|
C<MaxWidth> and C<MaxHeight> without exceeding either value. If you |
215
|
|
|
|
|
|
|
specify this option, Elastic Transcoder does not scale the watermark |
216
|
|
|
|
|
|
|
up. |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
=back |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
=head2 Target => Str |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
A value that determines how Elastic Transcoder interprets values that |
225
|
|
|
|
|
|
|
you specified for C<HorizontalOffset>, C<VerticalOffset>, C<MaxWidth>, |
226
|
|
|
|
|
|
|
and C<MaxHeight>: |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
=over |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=item * |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
B<Content>: C<HorizontalOffset> and C<VerticalOffset> values are |
233
|
|
|
|
|
|
|
calculated based on the borders of the video excluding black bars added |
234
|
|
|
|
|
|
|
by Elastic Transcoder, if any. In addition, C<MaxWidth> and |
235
|
|
|
|
|
|
|
C<MaxHeight>, if specified as a percentage, are calculated based on the |
236
|
|
|
|
|
|
|
borders of the video excluding black bars added by Elastic Transcoder, |
237
|
|
|
|
|
|
|
if any. |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
=item * |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
B<Frame>: C<HorizontalOffset> and C<VerticalOffset> values are |
242
|
|
|
|
|
|
|
calculated based on the borders of the video including black bars added |
243
|
|
|
|
|
|
|
by Elastic Transcoder, if any. In addition, C<MaxWidth> and |
244
|
|
|
|
|
|
|
C<MaxHeight>, if specified as a percentage, are calculated based on the |
245
|
|
|
|
|
|
|
borders of the video including black bars added by Elastic Transcoder, |
246
|
|
|
|
|
|
|
if any. |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=back |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
=head2 VerticalAlign => Str |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
The vertical position of the watermark unless you specify a non-zero |
255
|
|
|
|
|
|
|
value for C<VerticalOffset>: |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
=over |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
=item * |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
B<Top>: The top edge of the watermark is aligned with the top border of |
262
|
|
|
|
|
|
|
the video. |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
=item * |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
B<Bottom>: The bottom edge of the watermark is aligned with the bottom |
267
|
|
|
|
|
|
|
border of the video. |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
=item * |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
B<Center>: The watermark is centered between the top and bottom |
272
|
|
|
|
|
|
|
borders. |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
=back |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
=head2 VerticalOffset => Str |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
C<VerticalOffset> |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
The amount by which you want the vertical position of the watermark to |
283
|
|
|
|
|
|
|
be offset from the position specified by VerticalAlign: |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
=over |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
=item * |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
number of pixels (px): The minimum value is 0 pixels, and the maximum |
290
|
|
|
|
|
|
|
value is the value of C<MaxHeight>. |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
=item * |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
integer percentage (%): The range of valid values is 0 to 100. |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
=back |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
For example, if you specify C<Top> for C<VerticalAlign> and C<5px> for |
299
|
|
|
|
|
|
|
C<VerticalOffset>, the top of the watermark appears 5 pixels from the |
300
|
|
|
|
|
|
|
top border of the output video. |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
C<VerticalOffset> is only valid when the value of VerticalAlign is Top |
303
|
|
|
|
|
|
|
or Bottom. |
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
If you specify an offset that causes the watermark to extend beyond the |
306
|
|
|
|
|
|
|
top or bottom border and Elastic Transcoder has not added black bars, |
307
|
|
|
|
|
|
|
the watermark is cropped. If Elastic Transcoder has added black bars, |
308
|
|
|
|
|
|
|
the watermark extends into the black bars. If the watermark extends |
309
|
|
|
|
|
|
|
beyond the black bars, it is cropped. |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
Use the value of C<Target> to specify whether you want Elastic |
312
|
|
|
|
|
|
|
Transcoder to include the black bars that are added by Elastic |
313
|
|
|
|
|
|
|
Transcoder, if any, in the offset calculation. |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
=head1 SEE ALSO |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
This class forms part of L<Paws>, describing an object used in L<Paws::ElasticTranscoder> |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
=head1 BUGS and CONTRIBUTIONS |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
The source code is located here: https://github.com/pplu/aws-sdk-perl |
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues |
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
=cut |
328
|
|
|
|
|
|
|
|