#[repr(u32)]pub enum FrameRate {
Fps24 = 0,
Fps25 = 1,
Fps2997 = 2,
Fps30 = 3,
Fps2997Drop = 4,
Fps30Drop = 5,
Fps50 = 10,
Fps5994 = 11,
Fps60 = 12,
Fps5994Drop = 13,
Fps60Drop = 14,
}Expand description
SMPTE frame rate for video synchronization.
Used with Transport::frame_rate for film/video sync applications.
Variants§
Fps24 = 0
24 fps (film)
Fps25 = 1
25 fps (PAL video)
Fps2997 = 2
29.97 fps non-drop (NTSC video)
Fps30 = 3
30 fps
Fps2997Drop = 4
29.97 fps drop-frame (NTSC broadcast)
Fps30Drop = 5
30 fps drop-frame
Fps50 = 10
50 fps
Fps5994 = 11
59.94 fps
Fps60 = 12
60 fps
Fps5994Drop = 13
59.94 fps drop-frame
Fps60Drop = 14
60 fps drop-frame
Implementations§
Source§impl FrameRate
impl FrameRate
Sourcepub fn fps(&self) -> f64
pub fn fps(&self) -> f64
Returns the frames per second as an f64.
Drop-frame rates return their actual (non-integer) values.
Sourcepub fn is_drop_frame(&self) -> bool
pub fn is_drop_frame(&self) -> bool
Returns true if this is a drop-frame format.
Sourcepub fn from_raw(fps: u32, is_drop: bool) -> Option<Self>
pub fn from_raw(fps: u32, is_drop: bool) -> Option<Self>
Creates a FrameRate from raw frames-per-second and drop-frame flag.
This is the canonical conversion from VST3’s FrameRate struct.
Returns None for unsupported frame rates.
§Arguments
fps- Frames per second (24, 25, 29, 30, 50, 59, 60)is_drop- True if drop-frame timecode (only affects 29.97, 30, 59.94, 60)
Trait Implementations§
impl Copy for FrameRate
impl Eq for FrameRate
impl StructuralPartialEq for FrameRate
Auto Trait Implementations§
impl Freeze for FrameRate
impl RefUnwindSafe for FrameRate
impl Send for FrameRate
impl Sync for FrameRate
impl Unpin for FrameRate
impl UnwindSafe for FrameRate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more