1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/mediaconvert/MediaConvert_EXPORTS.h>
8 #include <aws/mediaconvert/model/FileSourceConvert608To708.h>
9 #include <aws/mediaconvert/model/CaptionSourceFramerate.h>
10 #include <aws/core/utils/memory/stl/AWSString.h>
11 #include <aws/mediaconvert/model/FileSourceTimeDeltaUnits.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20   class JsonValue;
21   class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace MediaConvert
25 {
26 namespace Model
27 {
28 
29   /**
30    * If your input captions are SCC, SMI, SRT, STL, TTML, WebVTT, or IMSC 1.1 in an
31    * xml file, specify the URI of the input caption source file. If your caption
32    * source is IMSC in an IMF package, use TrackSourceSettings instead of
33    * FileSoureSettings.<p><h3>See Also:</h3>   <a
34    * href="http://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/FileSourceSettings">AWS
35    * API Reference</a></p>
36    */
37   class AWS_MEDIACONVERT_API FileSourceSettings
38   {
39   public:
40     FileSourceSettings();
41     FileSourceSettings(Aws::Utils::Json::JsonView jsonValue);
42     FileSourceSettings& operator=(Aws::Utils::Json::JsonView jsonValue);
43     Aws::Utils::Json::JsonValue Jsonize() const;
44 
45 
46     /**
47      * Specify whether this set of input captions appears in your outputs in both 608
48      * and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the
49      * captions data in two ways: it passes the 608 data through using the 608
50      * compatibility bytes fields of the 708 wrapper, and it also translates the 608
51      * data into 708.
52      */
GetConvert608To708()53     inline const FileSourceConvert608To708& GetConvert608To708() const{ return m_convert608To708; }
54 
55     /**
56      * Specify whether this set of input captions appears in your outputs in both 608
57      * and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the
58      * captions data in two ways: it passes the 608 data through using the 608
59      * compatibility bytes fields of the 708 wrapper, and it also translates the 608
60      * data into 708.
61      */
Convert608To708HasBeenSet()62     inline bool Convert608To708HasBeenSet() const { return m_convert608To708HasBeenSet; }
63 
64     /**
65      * Specify whether this set of input captions appears in your outputs in both 608
66      * and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the
67      * captions data in two ways: it passes the 608 data through using the 608
68      * compatibility bytes fields of the 708 wrapper, and it also translates the 608
69      * data into 708.
70      */
SetConvert608To708(const FileSourceConvert608To708 & value)71     inline void SetConvert608To708(const FileSourceConvert608To708& value) { m_convert608To708HasBeenSet = true; m_convert608To708 = value; }
72 
73     /**
74      * Specify whether this set of input captions appears in your outputs in both 608
75      * and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the
76      * captions data in two ways: it passes the 608 data through using the 608
77      * compatibility bytes fields of the 708 wrapper, and it also translates the 608
78      * data into 708.
79      */
SetConvert608To708(FileSourceConvert608To708 && value)80     inline void SetConvert608To708(FileSourceConvert608To708&& value) { m_convert608To708HasBeenSet = true; m_convert608To708 = std::move(value); }
81 
82     /**
83      * Specify whether this set of input captions appears in your outputs in both 608
84      * and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the
85      * captions data in two ways: it passes the 608 data through using the 608
86      * compatibility bytes fields of the 708 wrapper, and it also translates the 608
87      * data into 708.
88      */
WithConvert608To708(const FileSourceConvert608To708 & value)89     inline FileSourceSettings& WithConvert608To708(const FileSourceConvert608To708& value) { SetConvert608To708(value); return *this;}
90 
91     /**
92      * Specify whether this set of input captions appears in your outputs in both 608
93      * and 708 format. If you choose Upconvert (UPCONVERT), MediaConvert includes the
94      * captions data in two ways: it passes the 608 data through using the 608
95      * compatibility bytes fields of the 708 wrapper, and it also translates the 608
96      * data into 708.
97      */
WithConvert608To708(FileSourceConvert608To708 && value)98     inline FileSourceSettings& WithConvert608To708(FileSourceConvert608To708&& value) { SetConvert608To708(std::move(value)); return *this;}
99 
100 
101     /**
102      * Ignore this setting unless your input captions format is SCC. To have the
103      * service compensate for differing frame rates between your input captions and
104      * input video, specify the frame rate of the captions file. Specify this value as
105      * a fraction. When you work directly in your JSON job specification, use the
106      * settings framerateNumerator and framerateDenominator. For example, you might
107      * specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, or
108      * 30000 / 1001 for 29.97 fps.
109      */
GetFramerate()110     inline const CaptionSourceFramerate& GetFramerate() const{ return m_framerate; }
111 
112     /**
113      * Ignore this setting unless your input captions format is SCC. To have the
114      * service compensate for differing frame rates between your input captions and
115      * input video, specify the frame rate of the captions file. Specify this value as
116      * a fraction. When you work directly in your JSON job specification, use the
117      * settings framerateNumerator and framerateDenominator. For example, you might
118      * specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, or
119      * 30000 / 1001 for 29.97 fps.
120      */
FramerateHasBeenSet()121     inline bool FramerateHasBeenSet() const { return m_framerateHasBeenSet; }
122 
123     /**
124      * Ignore this setting unless your input captions format is SCC. To have the
125      * service compensate for differing frame rates between your input captions and
126      * input video, specify the frame rate of the captions file. Specify this value as
127      * a fraction. When you work directly in your JSON job specification, use the
128      * settings framerateNumerator and framerateDenominator. For example, you might
129      * specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, or
130      * 30000 / 1001 for 29.97 fps.
131      */
SetFramerate(const CaptionSourceFramerate & value)132     inline void SetFramerate(const CaptionSourceFramerate& value) { m_framerateHasBeenSet = true; m_framerate = value; }
133 
134     /**
135      * Ignore this setting unless your input captions format is SCC. To have the
136      * service compensate for differing frame rates between your input captions and
137      * input video, specify the frame rate of the captions file. Specify this value as
138      * a fraction. When you work directly in your JSON job specification, use the
139      * settings framerateNumerator and framerateDenominator. For example, you might
140      * specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, or
141      * 30000 / 1001 for 29.97 fps.
142      */
SetFramerate(CaptionSourceFramerate && value)143     inline void SetFramerate(CaptionSourceFramerate&& value) { m_framerateHasBeenSet = true; m_framerate = std::move(value); }
144 
145     /**
146      * Ignore this setting unless your input captions format is SCC. To have the
147      * service compensate for differing frame rates between your input captions and
148      * input video, specify the frame rate of the captions file. Specify this value as
149      * a fraction. When you work directly in your JSON job specification, use the
150      * settings framerateNumerator and framerateDenominator. For example, you might
151      * specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, or
152      * 30000 / 1001 for 29.97 fps.
153      */
WithFramerate(const CaptionSourceFramerate & value)154     inline FileSourceSettings& WithFramerate(const CaptionSourceFramerate& value) { SetFramerate(value); return *this;}
155 
156     /**
157      * Ignore this setting unless your input captions format is SCC. To have the
158      * service compensate for differing frame rates between your input captions and
159      * input video, specify the frame rate of the captions file. Specify this value as
160      * a fraction. When you work directly in your JSON job specification, use the
161      * settings framerateNumerator and framerateDenominator. For example, you might
162      * specify 24 / 1 for 24 fps, 25 / 1 for 25 fps, 24000 / 1001 for 23.976 fps, or
163      * 30000 / 1001 for 29.97 fps.
164      */
WithFramerate(CaptionSourceFramerate && value)165     inline FileSourceSettings& WithFramerate(CaptionSourceFramerate&& value) { SetFramerate(std::move(value)); return *this;}
166 
167 
168     /**
169      * External caption file used for loading captions. Accepted file extensions are
170      * 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
171      */
GetSourceFile()172     inline const Aws::String& GetSourceFile() const{ return m_sourceFile; }
173 
174     /**
175      * External caption file used for loading captions. Accepted file extensions are
176      * 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
177      */
SourceFileHasBeenSet()178     inline bool SourceFileHasBeenSet() const { return m_sourceFileHasBeenSet; }
179 
180     /**
181      * External caption file used for loading captions. Accepted file extensions are
182      * 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
183      */
SetSourceFile(const Aws::String & value)184     inline void SetSourceFile(const Aws::String& value) { m_sourceFileHasBeenSet = true; m_sourceFile = value; }
185 
186     /**
187      * External caption file used for loading captions. Accepted file extensions are
188      * 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
189      */
SetSourceFile(Aws::String && value)190     inline void SetSourceFile(Aws::String&& value) { m_sourceFileHasBeenSet = true; m_sourceFile = std::move(value); }
191 
192     /**
193      * External caption file used for loading captions. Accepted file extensions are
194      * 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
195      */
SetSourceFile(const char * value)196     inline void SetSourceFile(const char* value) { m_sourceFileHasBeenSet = true; m_sourceFile.assign(value); }
197 
198     /**
199      * External caption file used for loading captions. Accepted file extensions are
200      * 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
201      */
WithSourceFile(const Aws::String & value)202     inline FileSourceSettings& WithSourceFile(const Aws::String& value) { SetSourceFile(value); return *this;}
203 
204     /**
205      * External caption file used for loading captions. Accepted file extensions are
206      * 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
207      */
WithSourceFile(Aws::String && value)208     inline FileSourceSettings& WithSourceFile(Aws::String&& value) { SetSourceFile(std::move(value)); return *this;}
209 
210     /**
211      * External caption file used for loading captions. Accepted file extensions are
212      * 'scc', 'ttml', 'dfxp', 'stl', 'srt', 'xml', 'smi', 'webvtt', and 'vtt'.
213      */
WithSourceFile(const char * value)214     inline FileSourceSettings& WithSourceFile(const char* value) { SetSourceFile(value); return *this;}
215 
216 
217     /**
218      * Optional. Use this setting when you need to adjust the sync between your sidecar
219      * captions and your video. For more information, see
220      * https://docs.aws.amazon.com/mediaconvert/latest/ug/time-delta-use-cases.html.
221      * Enter a positive or negative number to modify the times in the captions file.
222      * For example, type 15 to add 15 seconds to all the times in the captions file.
223      * Type -5 to subtract 5 seconds from the times in the captions file. You can
224      * optionally specify your time delta in milliseconds instead of seconds. When you
225      * do so, set the related setting, Time delta units (TimeDeltaUnits) to
226      * Milliseconds (MILLISECONDS). Note that, when you specify a time delta for
227      * timecode-based caption sources, such as SCC and STL, and your time delta isn't a
228      * multiple of the input frame rate, MediaConvert snaps the captions to the nearest
229      * frame. For example, when your input video frame rate is 25 fps and you specify
230      * 1010ms for time delta, MediaConvert delays your captions by 1000 ms.
231      */
GetTimeDelta()232     inline int GetTimeDelta() const{ return m_timeDelta; }
233 
234     /**
235      * Optional. Use this setting when you need to adjust the sync between your sidecar
236      * captions and your video. For more information, see
237      * https://docs.aws.amazon.com/mediaconvert/latest/ug/time-delta-use-cases.html.
238      * Enter a positive or negative number to modify the times in the captions file.
239      * For example, type 15 to add 15 seconds to all the times in the captions file.
240      * Type -5 to subtract 5 seconds from the times in the captions file. You can
241      * optionally specify your time delta in milliseconds instead of seconds. When you
242      * do so, set the related setting, Time delta units (TimeDeltaUnits) to
243      * Milliseconds (MILLISECONDS). Note that, when you specify a time delta for
244      * timecode-based caption sources, such as SCC and STL, and your time delta isn't a
245      * multiple of the input frame rate, MediaConvert snaps the captions to the nearest
246      * frame. For example, when your input video frame rate is 25 fps and you specify
247      * 1010ms for time delta, MediaConvert delays your captions by 1000 ms.
248      */
TimeDeltaHasBeenSet()249     inline bool TimeDeltaHasBeenSet() const { return m_timeDeltaHasBeenSet; }
250 
251     /**
252      * Optional. Use this setting when you need to adjust the sync between your sidecar
253      * captions and your video. For more information, see
254      * https://docs.aws.amazon.com/mediaconvert/latest/ug/time-delta-use-cases.html.
255      * Enter a positive or negative number to modify the times in the captions file.
256      * For example, type 15 to add 15 seconds to all the times in the captions file.
257      * Type -5 to subtract 5 seconds from the times in the captions file. You can
258      * optionally specify your time delta in milliseconds instead of seconds. When you
259      * do so, set the related setting, Time delta units (TimeDeltaUnits) to
260      * Milliseconds (MILLISECONDS). Note that, when you specify a time delta for
261      * timecode-based caption sources, such as SCC and STL, and your time delta isn't a
262      * multiple of the input frame rate, MediaConvert snaps the captions to the nearest
263      * frame. For example, when your input video frame rate is 25 fps and you specify
264      * 1010ms for time delta, MediaConvert delays your captions by 1000 ms.
265      */
SetTimeDelta(int value)266     inline void SetTimeDelta(int value) { m_timeDeltaHasBeenSet = true; m_timeDelta = value; }
267 
268     /**
269      * Optional. Use this setting when you need to adjust the sync between your sidecar
270      * captions and your video. For more information, see
271      * https://docs.aws.amazon.com/mediaconvert/latest/ug/time-delta-use-cases.html.
272      * Enter a positive or negative number to modify the times in the captions file.
273      * For example, type 15 to add 15 seconds to all the times in the captions file.
274      * Type -5 to subtract 5 seconds from the times in the captions file. You can
275      * optionally specify your time delta in milliseconds instead of seconds. When you
276      * do so, set the related setting, Time delta units (TimeDeltaUnits) to
277      * Milliseconds (MILLISECONDS). Note that, when you specify a time delta for
278      * timecode-based caption sources, such as SCC and STL, and your time delta isn't a
279      * multiple of the input frame rate, MediaConvert snaps the captions to the nearest
280      * frame. For example, when your input video frame rate is 25 fps and you specify
281      * 1010ms for time delta, MediaConvert delays your captions by 1000 ms.
282      */
WithTimeDelta(int value)283     inline FileSourceSettings& WithTimeDelta(int value) { SetTimeDelta(value); return *this;}
284 
285 
286     /**
287      * When you use the setting Time delta (TimeDelta) to adjust the sync between your
288      * sidecar captions and your video, use this setting to specify the units for the
289      * delta that you specify. When you don't specify a value for Time delta units
290      * (TimeDeltaUnits), MediaConvert uses seconds by default.
291      */
GetTimeDeltaUnits()292     inline const FileSourceTimeDeltaUnits& GetTimeDeltaUnits() const{ return m_timeDeltaUnits; }
293 
294     /**
295      * When you use the setting Time delta (TimeDelta) to adjust the sync between your
296      * sidecar captions and your video, use this setting to specify the units for the
297      * delta that you specify. When you don't specify a value for Time delta units
298      * (TimeDeltaUnits), MediaConvert uses seconds by default.
299      */
TimeDeltaUnitsHasBeenSet()300     inline bool TimeDeltaUnitsHasBeenSet() const { return m_timeDeltaUnitsHasBeenSet; }
301 
302     /**
303      * When you use the setting Time delta (TimeDelta) to adjust the sync between your
304      * sidecar captions and your video, use this setting to specify the units for the
305      * delta that you specify. When you don't specify a value for Time delta units
306      * (TimeDeltaUnits), MediaConvert uses seconds by default.
307      */
SetTimeDeltaUnits(const FileSourceTimeDeltaUnits & value)308     inline void SetTimeDeltaUnits(const FileSourceTimeDeltaUnits& value) { m_timeDeltaUnitsHasBeenSet = true; m_timeDeltaUnits = value; }
309 
310     /**
311      * When you use the setting Time delta (TimeDelta) to adjust the sync between your
312      * sidecar captions and your video, use this setting to specify the units for the
313      * delta that you specify. When you don't specify a value for Time delta units
314      * (TimeDeltaUnits), MediaConvert uses seconds by default.
315      */
SetTimeDeltaUnits(FileSourceTimeDeltaUnits && value)316     inline void SetTimeDeltaUnits(FileSourceTimeDeltaUnits&& value) { m_timeDeltaUnitsHasBeenSet = true; m_timeDeltaUnits = std::move(value); }
317 
318     /**
319      * When you use the setting Time delta (TimeDelta) to adjust the sync between your
320      * sidecar captions and your video, use this setting to specify the units for the
321      * delta that you specify. When you don't specify a value for Time delta units
322      * (TimeDeltaUnits), MediaConvert uses seconds by default.
323      */
WithTimeDeltaUnits(const FileSourceTimeDeltaUnits & value)324     inline FileSourceSettings& WithTimeDeltaUnits(const FileSourceTimeDeltaUnits& value) { SetTimeDeltaUnits(value); return *this;}
325 
326     /**
327      * When you use the setting Time delta (TimeDelta) to adjust the sync between your
328      * sidecar captions and your video, use this setting to specify the units for the
329      * delta that you specify. When you don't specify a value for Time delta units
330      * (TimeDeltaUnits), MediaConvert uses seconds by default.
331      */
WithTimeDeltaUnits(FileSourceTimeDeltaUnits && value)332     inline FileSourceSettings& WithTimeDeltaUnits(FileSourceTimeDeltaUnits&& value) { SetTimeDeltaUnits(std::move(value)); return *this;}
333 
334   private:
335 
336     FileSourceConvert608To708 m_convert608To708;
337     bool m_convert608To708HasBeenSet;
338 
339     CaptionSourceFramerate m_framerate;
340     bool m_framerateHasBeenSet;
341 
342     Aws::String m_sourceFile;
343     bool m_sourceFileHasBeenSet;
344 
345     int m_timeDelta;
346     bool m_timeDeltaHasBeenSet;
347 
348     FileSourceTimeDeltaUnits m_timeDeltaUnits;
349     bool m_timeDeltaUnitsHasBeenSet;
350   };
351 
352 } // namespace Model
353 } // namespace MediaConvert
354 } // namespace Aws
355