aws_sdk_medialive/types/
_timecode_config.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Timecode Config
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct TimecodeConfig {
7    /// Identifies the source for the timecode that will be associated with the events outputs. -Embedded (embedded): Initialize the output timecode with timecode from the the source. If no embedded timecode is detected in the source, the system falls back to using "Start at 0" (zerobased). -System Clock (systemclock): Use the UTC time. -Start at 0 (zerobased): The time of the first frame of the event will be 00:00:00:00.
8    pub source: ::std::option::Option<crate::types::TimecodeConfigSource>,
9    /// Threshold in frames beyond which output timecode is resynchronized to the input timecode. Discrepancies below this threshold are permitted to avoid unnecessary discontinuities in the output timecode. No timecode sync when this is not specified.
10    pub sync_threshold: ::std::option::Option<i32>,
11}
12impl TimecodeConfig {
13    /// Identifies the source for the timecode that will be associated with the events outputs. -Embedded (embedded): Initialize the output timecode with timecode from the the source. If no embedded timecode is detected in the source, the system falls back to using "Start at 0" (zerobased). -System Clock (systemclock): Use the UTC time. -Start at 0 (zerobased): The time of the first frame of the event will be 00:00:00:00.
14    pub fn source(&self) -> ::std::option::Option<&crate::types::TimecodeConfigSource> {
15        self.source.as_ref()
16    }
17    /// Threshold in frames beyond which output timecode is resynchronized to the input timecode. Discrepancies below this threshold are permitted to avoid unnecessary discontinuities in the output timecode. No timecode sync when this is not specified.
18    pub fn sync_threshold(&self) -> ::std::option::Option<i32> {
19        self.sync_threshold
20    }
21}
22impl TimecodeConfig {
23    /// Creates a new builder-style object to manufacture [`TimecodeConfig`](crate::types::TimecodeConfig).
24    pub fn builder() -> crate::types::builders::TimecodeConfigBuilder {
25        crate::types::builders::TimecodeConfigBuilder::default()
26    }
27}
28
29/// A builder for [`TimecodeConfig`](crate::types::TimecodeConfig).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct TimecodeConfigBuilder {
33    pub(crate) source: ::std::option::Option<crate::types::TimecodeConfigSource>,
34    pub(crate) sync_threshold: ::std::option::Option<i32>,
35}
36impl TimecodeConfigBuilder {
37    /// Identifies the source for the timecode that will be associated with the events outputs. -Embedded (embedded): Initialize the output timecode with timecode from the the source. If no embedded timecode is detected in the source, the system falls back to using "Start at 0" (zerobased). -System Clock (systemclock): Use the UTC time. -Start at 0 (zerobased): The time of the first frame of the event will be 00:00:00:00.
38    /// This field is required.
39    pub fn source(mut self, input: crate::types::TimecodeConfigSource) -> Self {
40        self.source = ::std::option::Option::Some(input);
41        self
42    }
43    /// Identifies the source for the timecode that will be associated with the events outputs. -Embedded (embedded): Initialize the output timecode with timecode from the the source. If no embedded timecode is detected in the source, the system falls back to using "Start at 0" (zerobased). -System Clock (systemclock): Use the UTC time. -Start at 0 (zerobased): The time of the first frame of the event will be 00:00:00:00.
44    pub fn set_source(mut self, input: ::std::option::Option<crate::types::TimecodeConfigSource>) -> Self {
45        self.source = input;
46        self
47    }
48    /// Identifies the source for the timecode that will be associated with the events outputs. -Embedded (embedded): Initialize the output timecode with timecode from the the source. If no embedded timecode is detected in the source, the system falls back to using "Start at 0" (zerobased). -System Clock (systemclock): Use the UTC time. -Start at 0 (zerobased): The time of the first frame of the event will be 00:00:00:00.
49    pub fn get_source(&self) -> &::std::option::Option<crate::types::TimecodeConfigSource> {
50        &self.source
51    }
52    /// Threshold in frames beyond which output timecode is resynchronized to the input timecode. Discrepancies below this threshold are permitted to avoid unnecessary discontinuities in the output timecode. No timecode sync when this is not specified.
53    pub fn sync_threshold(mut self, input: i32) -> Self {
54        self.sync_threshold = ::std::option::Option::Some(input);
55        self
56    }
57    /// Threshold in frames beyond which output timecode is resynchronized to the input timecode. Discrepancies below this threshold are permitted to avoid unnecessary discontinuities in the output timecode. No timecode sync when this is not specified.
58    pub fn set_sync_threshold(mut self, input: ::std::option::Option<i32>) -> Self {
59        self.sync_threshold = input;
60        self
61    }
62    /// Threshold in frames beyond which output timecode is resynchronized to the input timecode. Discrepancies below this threshold are permitted to avoid unnecessary discontinuities in the output timecode. No timecode sync when this is not specified.
63    pub fn get_sync_threshold(&self) -> &::std::option::Option<i32> {
64        &self.sync_threshold
65    }
66    /// Consumes the builder and constructs a [`TimecodeConfig`](crate::types::TimecodeConfig).
67    pub fn build(self) -> crate::types::TimecodeConfig {
68        crate::types::TimecodeConfig {
69            source: self.source,
70            sync_threshold: self.sync_threshold,
71        }
72    }
73}