pub struct NDITime(/* private fields */);Expand description
This is the timecode of this frame in 100 ns intervals.
This is generally not used internally by the SDK but is passed through to applications which may interpret it as they wish.
When sending data, a value of NDITime::SYNTHESIZE (C: NDIlib_send_timecode_synthesize) can be specified (and should be the default), the operation of this value is documented in the sending section of this documentation.
NDITime::SYNTHESIZE will yield UTC time in 100 ns intervals since the Unix Time Epoch 1/1/1970 00:00. When interpreting this timecode, a receiving application may choose to localize the time of day based on time zone offset, which can optionally be communicated by the sender in connection metadata.
Since the timecode is stored in UTC within NDI, communicating timecode time of day for non-UTC time zones requires a translation.
Implementations§
Source§impl NDITime
impl NDITime
pub const UNDEFINED: Self
Sourcepub const SYNTHESIZE: Self
pub const SYNTHESIZE: Self
Advises the SDK to automatically generate a timecode for this frame from the system clock
pub fn to_ffi(self) -> i64
pub fn from_ffi(time: i64) -> Self
Sourcepub fn to_utc(self) -> Option<SystemTime>
pub fn to_utc(self) -> Option<SystemTime>
This API is unstable
Converts this timestamp to SystemTime
pub fn is_default(self) -> bool
Trait Implementations§
Source§impl Ord for NDITime
impl Ord for NDITime
Source§impl PartialOrd for NDITime
impl PartialOrd for NDITime
impl Copy for NDITime
impl Eq for NDITime
impl StructuralPartialEq for NDITime
Auto Trait Implementations§
impl Freeze for NDITime
impl RefUnwindSafe for NDITime
impl Send for NDITime
impl Sync for NDITime
impl Unpin for NDITime
impl UnwindSafe for NDITime
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)