1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Use Audio selectors to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AudioSelector {
/// Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion.
pub audio_duration_correction: ::std::option::Option<crate::types::AudioDurationCorrection>,
/// Selects a specific language code from within an audio source, using the ISO 639-2 or ISO 639-3 three-letter language code
pub custom_language_code: ::std::option::Option<::std::string::String>,
/// Enable this setting on one audio selector to set it as the default for the job. The service uses this default for outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
pub default_selection: ::std::option::Option<crate::types::AudioDefaultSelection>,
/// Specifies audio data from an external file source.
pub external_audio_file_input: ::std::option::Option<::std::string::String>,
/// Settings specific to audio sources in an HLS alternate rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique audio track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the properties provided, the job fails. If no properties in hlsRenditionGroupSettings are specified, the default audio track within the video segment is chosen. If there is no audio within video segment, the alternative audio with DEFAULT=YES is chosen instead.
pub hls_rendition_group_settings: ::std::option::Option<crate::types::HlsRenditionGroupSettings>,
/// Selects a specific language code from within an audio source.
pub language_code: ::std::option::Option<crate::types::LanguageCode>,
/// Specifies a time delta in milliseconds to offset the audio from the input video.
pub offset: ::std::option::Option<i32>,
/// Selects a specific PID from within an audio source (e.g. 257 selects PID 0x101).
pub pids: ::std::option::Option<::std::vec::Vec<i32>>,
/// Use this setting for input streams that contain Dolby E, to have the service extract specific program data from the track. To select multiple programs, create multiple selectors with the same Track and different Program numbers. In the console, this setting is visible when you set Selector type to Track. Choose the program number from the dropdown list. If your input file has incorrect metadata, you can choose All channels instead of a program number to have the service ignore the program IDs and include all the programs in the track.
pub program_selection: ::std::option::Option<i32>,
/// Use these settings to reorder the audio channels of one input to match those of another input. This allows you to combine the two files into a single output, one after the other.
pub remix_settings: ::std::option::Option<crate::types::RemixSettings>,
/// Specifies the type of the audio selector.
pub selector_type: ::std::option::Option<crate::types::AudioSelectorType>,
/// Identify a track from the input audio to include in this selector by entering the track index number. To include several tracks in a single audio selector, specify multiple tracks as follows. Using the console, enter a comma-separated list. For example, type "1,2,3" to include tracks 1 through 3.
pub tracks: ::std::option::Option<::std::vec::Vec<i32>>,
}
impl AudioSelector {
/// Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion.
pub fn audio_duration_correction(&self) -> ::std::option::Option<&crate::types::AudioDurationCorrection> {
self.audio_duration_correction.as_ref()
}
/// Selects a specific language code from within an audio source, using the ISO 639-2 or ISO 639-3 three-letter language code
pub fn custom_language_code(&self) -> ::std::option::Option<&str> {
self.custom_language_code.as_deref()
}
/// Enable this setting on one audio selector to set it as the default for the job. The service uses this default for outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
pub fn default_selection(&self) -> ::std::option::Option<&crate::types::AudioDefaultSelection> {
self.default_selection.as_ref()
}
/// Specifies audio data from an external file source.
pub fn external_audio_file_input(&self) -> ::std::option::Option<&str> {
self.external_audio_file_input.as_deref()
}
/// Settings specific to audio sources in an HLS alternate rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique audio track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the properties provided, the job fails. If no properties in hlsRenditionGroupSettings are specified, the default audio track within the video segment is chosen. If there is no audio within video segment, the alternative audio with DEFAULT=YES is chosen instead.
pub fn hls_rendition_group_settings(&self) -> ::std::option::Option<&crate::types::HlsRenditionGroupSettings> {
self.hls_rendition_group_settings.as_ref()
}
/// Selects a specific language code from within an audio source.
pub fn language_code(&self) -> ::std::option::Option<&crate::types::LanguageCode> {
self.language_code.as_ref()
}
/// Specifies a time delta in milliseconds to offset the audio from the input video.
pub fn offset(&self) -> ::std::option::Option<i32> {
self.offset
}
/// Selects a specific PID from within an audio source (e.g. 257 selects PID 0x101).
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.pids.is_none()`.
pub fn pids(&self) -> &[i32] {
self.pids.as_deref().unwrap_or_default()
}
/// Use this setting for input streams that contain Dolby E, to have the service extract specific program data from the track. To select multiple programs, create multiple selectors with the same Track and different Program numbers. In the console, this setting is visible when you set Selector type to Track. Choose the program number from the dropdown list. If your input file has incorrect metadata, you can choose All channels instead of a program number to have the service ignore the program IDs and include all the programs in the track.
pub fn program_selection(&self) -> ::std::option::Option<i32> {
self.program_selection
}
/// Use these settings to reorder the audio channels of one input to match those of another input. This allows you to combine the two files into a single output, one after the other.
pub fn remix_settings(&self) -> ::std::option::Option<&crate::types::RemixSettings> {
self.remix_settings.as_ref()
}
/// Specifies the type of the audio selector.
pub fn selector_type(&self) -> ::std::option::Option<&crate::types::AudioSelectorType> {
self.selector_type.as_ref()
}
/// Identify a track from the input audio to include in this selector by entering the track index number. To include several tracks in a single audio selector, specify multiple tracks as follows. Using the console, enter a comma-separated list. For example, type "1,2,3" to include tracks 1 through 3.
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tracks.is_none()`.
pub fn tracks(&self) -> &[i32] {
self.tracks.as_deref().unwrap_or_default()
}
}
impl AudioSelector {
/// Creates a new builder-style object to manufacture [`AudioSelector`](crate::types::AudioSelector).
pub fn builder() -> crate::types::builders::AudioSelectorBuilder {
crate::types::builders::AudioSelectorBuilder::default()
}
}
/// A builder for [`AudioSelector`](crate::types::AudioSelector).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AudioSelectorBuilder {
pub(crate) audio_duration_correction: ::std::option::Option<crate::types::AudioDurationCorrection>,
pub(crate) custom_language_code: ::std::option::Option<::std::string::String>,
pub(crate) default_selection: ::std::option::Option<crate::types::AudioDefaultSelection>,
pub(crate) external_audio_file_input: ::std::option::Option<::std::string::String>,
pub(crate) hls_rendition_group_settings: ::std::option::Option<crate::types::HlsRenditionGroupSettings>,
pub(crate) language_code: ::std::option::Option<crate::types::LanguageCode>,
pub(crate) offset: ::std::option::Option<i32>,
pub(crate) pids: ::std::option::Option<::std::vec::Vec<i32>>,
pub(crate) program_selection: ::std::option::Option<i32>,
pub(crate) remix_settings: ::std::option::Option<crate::types::RemixSettings>,
pub(crate) selector_type: ::std::option::Option<crate::types::AudioSelectorType>,
pub(crate) tracks: ::std::option::Option<::std::vec::Vec<i32>>,
}
impl AudioSelectorBuilder {
/// Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion.
pub fn audio_duration_correction(mut self, input: crate::types::AudioDurationCorrection) -> Self {
self.audio_duration_correction = ::std::option::Option::Some(input);
self
}
/// Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion.
pub fn set_audio_duration_correction(mut self, input: ::std::option::Option<crate::types::AudioDurationCorrection>) -> Self {
self.audio_duration_correction = input;
self
}
/// Apply audio timing corrections to help synchronize audio and video in your output. To apply timing corrections, your input must meet the following requirements: * Container: MP4, or MOV, with an accurate time-to-sample (STTS) table. * Audio track: AAC. Choose from the following audio timing correction settings: * Disabled (Default): Apply no correction. * Auto: Recommended for most inputs. MediaConvert analyzes the audio timing in your input and determines which correction setting to use, if needed. * Track: Adjust the duration of each audio frame by a constant amount to align the audio track length with STTS duration. Track-level correction does not affect pitch, and is recommended for tonal audio content such as music. * Frame: Adjust the duration of each audio frame by a variable amount to align audio frames with STTS timestamps. No corrections are made to already-aligned frames. Frame-level correction may affect the pitch of corrected frames, and is recommended for atonal audio content such as speech or percussion.
pub fn get_audio_duration_correction(&self) -> &::std::option::Option<crate::types::AudioDurationCorrection> {
&self.audio_duration_correction
}
/// Selects a specific language code from within an audio source, using the ISO 639-2 or ISO 639-3 three-letter language code
pub fn custom_language_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.custom_language_code = ::std::option::Option::Some(input.into());
self
}
/// Selects a specific language code from within an audio source, using the ISO 639-2 or ISO 639-3 three-letter language code
pub fn set_custom_language_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.custom_language_code = input;
self
}
/// Selects a specific language code from within an audio source, using the ISO 639-2 or ISO 639-3 three-letter language code
pub fn get_custom_language_code(&self) -> &::std::option::Option<::std::string::String> {
&self.custom_language_code
}
/// Enable this setting on one audio selector to set it as the default for the job. The service uses this default for outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
pub fn default_selection(mut self, input: crate::types::AudioDefaultSelection) -> Self {
self.default_selection = ::std::option::Option::Some(input);
self
}
/// Enable this setting on one audio selector to set it as the default for the job. The service uses this default for outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
pub fn set_default_selection(mut self, input: ::std::option::Option<crate::types::AudioDefaultSelection>) -> Self {
self.default_selection = input;
self
}
/// Enable this setting on one audio selector to set it as the default for the job. The service uses this default for outputs where it can't find the specified input audio. If you don't set a default, those outputs have no audio.
pub fn get_default_selection(&self) -> &::std::option::Option<crate::types::AudioDefaultSelection> {
&self.default_selection
}
/// Specifies audio data from an external file source.
pub fn external_audio_file_input(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.external_audio_file_input = ::std::option::Option::Some(input.into());
self
}
/// Specifies audio data from an external file source.
pub fn set_external_audio_file_input(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.external_audio_file_input = input;
self
}
/// Specifies audio data from an external file source.
pub fn get_external_audio_file_input(&self) -> &::std::option::Option<::std::string::String> {
&self.external_audio_file_input
}
/// Settings specific to audio sources in an HLS alternate rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique audio track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the properties provided, the job fails. If no properties in hlsRenditionGroupSettings are specified, the default audio track within the video segment is chosen. If there is no audio within video segment, the alternative audio with DEFAULT=YES is chosen instead.
pub fn hls_rendition_group_settings(mut self, input: crate::types::HlsRenditionGroupSettings) -> Self {
self.hls_rendition_group_settings = ::std::option::Option::Some(input);
self
}
/// Settings specific to audio sources in an HLS alternate rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique audio track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the properties provided, the job fails. If no properties in hlsRenditionGroupSettings are specified, the default audio track within the video segment is chosen. If there is no audio within video segment, the alternative audio with DEFAULT=YES is chosen instead.
pub fn set_hls_rendition_group_settings(mut self, input: ::std::option::Option<crate::types::HlsRenditionGroupSettings>) -> Self {
self.hls_rendition_group_settings = input;
self
}
/// Settings specific to audio sources in an HLS alternate rendition group. Specify the properties (renditionGroupId, renditionName or renditionLanguageCode) to identify the unique audio track among the alternative rendition groups present in the HLS manifest. If no unique track is found, or multiple tracks match the properties provided, the job fails. If no properties in hlsRenditionGroupSettings are specified, the default audio track within the video segment is chosen. If there is no audio within video segment, the alternative audio with DEFAULT=YES is chosen instead.
pub fn get_hls_rendition_group_settings(&self) -> &::std::option::Option<crate::types::HlsRenditionGroupSettings> {
&self.hls_rendition_group_settings
}
/// Selects a specific language code from within an audio source.
pub fn language_code(mut self, input: crate::types::LanguageCode) -> Self {
self.language_code = ::std::option::Option::Some(input);
self
}
/// Selects a specific language code from within an audio source.
pub fn set_language_code(mut self, input: ::std::option::Option<crate::types::LanguageCode>) -> Self {
self.language_code = input;
self
}
/// Selects a specific language code from within an audio source.
pub fn get_language_code(&self) -> &::std::option::Option<crate::types::LanguageCode> {
&self.language_code
}
/// Specifies a time delta in milliseconds to offset the audio from the input video.
pub fn offset(mut self, input: i32) -> Self {
self.offset = ::std::option::Option::Some(input);
self
}
/// Specifies a time delta in milliseconds to offset the audio from the input video.
pub fn set_offset(mut self, input: ::std::option::Option<i32>) -> Self {
self.offset = input;
self
}
/// Specifies a time delta in milliseconds to offset the audio from the input video.
pub fn get_offset(&self) -> &::std::option::Option<i32> {
&self.offset
}
/// Appends an item to `pids`.
///
/// To override the contents of this collection use [`set_pids`](Self::set_pids).
///
/// Selects a specific PID from within an audio source (e.g. 257 selects PID 0x101).
pub fn pids(mut self, input: i32) -> Self {
let mut v = self.pids.unwrap_or_default();
v.push(input);
self.pids = ::std::option::Option::Some(v);
self
}
/// Selects a specific PID from within an audio source (e.g. 257 selects PID 0x101).
pub fn set_pids(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
self.pids = input;
self
}
/// Selects a specific PID from within an audio source (e.g. 257 selects PID 0x101).
pub fn get_pids(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
&self.pids
}
/// Use this setting for input streams that contain Dolby E, to have the service extract specific program data from the track. To select multiple programs, create multiple selectors with the same Track and different Program numbers. In the console, this setting is visible when you set Selector type to Track. Choose the program number from the dropdown list. If your input file has incorrect metadata, you can choose All channels instead of a program number to have the service ignore the program IDs and include all the programs in the track.
pub fn program_selection(mut self, input: i32) -> Self {
self.program_selection = ::std::option::Option::Some(input);
self
}
/// Use this setting for input streams that contain Dolby E, to have the service extract specific program data from the track. To select multiple programs, create multiple selectors with the same Track and different Program numbers. In the console, this setting is visible when you set Selector type to Track. Choose the program number from the dropdown list. If your input file has incorrect metadata, you can choose All channels instead of a program number to have the service ignore the program IDs and include all the programs in the track.
pub fn set_program_selection(mut self, input: ::std::option::Option<i32>) -> Self {
self.program_selection = input;
self
}
/// Use this setting for input streams that contain Dolby E, to have the service extract specific program data from the track. To select multiple programs, create multiple selectors with the same Track and different Program numbers. In the console, this setting is visible when you set Selector type to Track. Choose the program number from the dropdown list. If your input file has incorrect metadata, you can choose All channels instead of a program number to have the service ignore the program IDs and include all the programs in the track.
pub fn get_program_selection(&self) -> &::std::option::Option<i32> {
&self.program_selection
}
/// Use these settings to reorder the audio channels of one input to match those of another input. This allows you to combine the two files into a single output, one after the other.
pub fn remix_settings(mut self, input: crate::types::RemixSettings) -> Self {
self.remix_settings = ::std::option::Option::Some(input);
self
}
/// Use these settings to reorder the audio channels of one input to match those of another input. This allows you to combine the two files into a single output, one after the other.
pub fn set_remix_settings(mut self, input: ::std::option::Option<crate::types::RemixSettings>) -> Self {
self.remix_settings = input;
self
}
/// Use these settings to reorder the audio channels of one input to match those of another input. This allows you to combine the two files into a single output, one after the other.
pub fn get_remix_settings(&self) -> &::std::option::Option<crate::types::RemixSettings> {
&self.remix_settings
}
/// Specifies the type of the audio selector.
pub fn selector_type(mut self, input: crate::types::AudioSelectorType) -> Self {
self.selector_type = ::std::option::Option::Some(input);
self
}
/// Specifies the type of the audio selector.
pub fn set_selector_type(mut self, input: ::std::option::Option<crate::types::AudioSelectorType>) -> Self {
self.selector_type = input;
self
}
/// Specifies the type of the audio selector.
pub fn get_selector_type(&self) -> &::std::option::Option<crate::types::AudioSelectorType> {
&self.selector_type
}
/// Appends an item to `tracks`.
///
/// To override the contents of this collection use [`set_tracks`](Self::set_tracks).
///
/// Identify a track from the input audio to include in this selector by entering the track index number. To include several tracks in a single audio selector, specify multiple tracks as follows. Using the console, enter a comma-separated list. For example, type "1,2,3" to include tracks 1 through 3.
pub fn tracks(mut self, input: i32) -> Self {
let mut v = self.tracks.unwrap_or_default();
v.push(input);
self.tracks = ::std::option::Option::Some(v);
self
}
/// Identify a track from the input audio to include in this selector by entering the track index number. To include several tracks in a single audio selector, specify multiple tracks as follows. Using the console, enter a comma-separated list. For example, type "1,2,3" to include tracks 1 through 3.
pub fn set_tracks(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
self.tracks = input;
self
}
/// Identify a track from the input audio to include in this selector by entering the track index number. To include several tracks in a single audio selector, specify multiple tracks as follows. Using the console, enter a comma-separated list. For example, type "1,2,3" to include tracks 1 through 3.
pub fn get_tracks(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
&self.tracks
}
/// Consumes the builder and constructs a [`AudioSelector`](crate::types::AudioSelector).
pub fn build(self) -> crate::types::AudioSelector {
crate::types::AudioSelector {
audio_duration_correction: self.audio_duration_correction,
custom_language_code: self.custom_language_code,
default_selection: self.default_selection,
external_audio_file_input: self.external_audio_file_input,
hls_rendition_group_settings: self.hls_rendition_group_settings,
language_code: self.language_code,
offset: self.offset,
pids: self.pids,
program_selection: self.program_selection,
remix_settings: self.remix_settings,
selector_type: self.selector_type,
tracks: self.tracks,
}
}
}