nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// Segment metadata for video files.
/// Lightweight version that excludes bounds and RID since those are stored elsewhere.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith,
    Copy
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct VideoSegmentsMetadata {
    #[serde(rename = "numFrames")]
    num_frames: i32,
    #[serde(rename = "numSegments")]
    num_segments: i32,
    #[serde(rename = "scaleFactor")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    scale_factor: f64,
    #[serde(rename = "mediaDurationSeconds")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    media_duration_seconds: f64,
    #[serde(rename = "mediaFrameRate")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    media_frame_rate: f64,
}
impl VideoSegmentsMetadata {
    /// Total number of frames across all segments.
    #[inline]
    pub fn num_frames(&self) -> i32 {
        self.num_frames
    }
    /// Number of segments the video was split into.
    #[inline]
    pub fn num_segments(&self) -> i32 {
        self.num_segments
    }
    /// Scale factor applied to timestamps during segmentation.
    #[inline]
    pub fn scale_factor(&self) -> f64 {
        self.scale_factor
    }
    /// Total duration of the video in seconds.
    #[inline]
    pub fn media_duration_seconds(&self) -> f64 {
        self.media_duration_seconds
    }
    /// Average frame rate (FPS) calculated as total frames / duration.
    #[inline]
    pub fn media_frame_rate(&self) -> f64 {
        self.media_frame_rate
    }
}