pub struct Timecode(/* private fields */);Expand description
The editorial timecode a frame carries, in 100-nanosecond ticks.
Every sendable frame starts with Timecode::SYNTHESIZE, which asks the
SDK to generate a timecode when the frame is sent. Any other value,
including zero, is sent unchanged. A received frame carries the timecode
its sender gave it or the SDK generated.
§Examples
use grafton_ndi::Timecode;
let one_second = Timecode::from_ticks(10_000_000);
assert_eq!(one_second.ticks(), 10_000_000);
assert_eq!(Timecode::default(), Timecode::SYNTHESIZE);Implementations§
Source§impl Timecode
impl Timecode
Sourcepub const SYNTHESIZE: Self
pub const SYNTHESIZE: Self
The SDK’s request to generate a timecode when the frame is sent
(NDIlib_send_timecode_synthesize, i64::MAX ticks).
Sourcepub const fn from_ticks(ticks: i64) -> Self
pub const fn from_ticks(ticks: i64) -> Self
A timecode of ticks 100-nanosecond intervals.
Trait Implementations§
impl Copy for Timecode
impl Eq for Timecode
Source§impl Ord for Timecode
impl Ord for Timecode
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Timecode
impl PartialOrd for Timecode
impl StructuralPartialEq for Timecode
Auto Trait Implementations§
impl Freeze for Timecode
impl RefUnwindSafe for Timecode
impl Send for Timecode
impl Sync for Timecode
impl Unpin for Timecode
impl UnsafeUnpin for Timecode
impl UnwindSafe for Timecode
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