[−][src]Struct ltc::LTCFrame
Represents a single LTC frame obtained from an LTCDecoder
.
This struct represents the encoded data almost 1:1, that is, no extra processing is done. The one exception is that the hour, minute, second and frame are all decode for ease of use.
Examples
let frame: LTCFrame = ...; println!("Frame time: {}", frame.format_time());
Fields
frame: u8
second: u8
minute: u8
hour: u8
user1: u8
user2: u8
user3: u8
user4: u8
user5: u8
user6: u8
user7: u8
user8: u8
drop_frame: bool
color_frame: bool
flag27: bool
flag43: bool
flag59: bool
synchronised_externally: bool
samples_length: u32
Methods
impl LTCFrame
[src]
pub fn format_time(&self) -> String
[src]
Format the time of the frame as a string.
pub fn estimate_framerate(&self, sample_rate: f32) -> FramerateEstimate
[src]
Estimate the framerate of the frame.
By taking in a sample rate, this function uses the recorded length of the frame in samples in order to make an estimation as to the framerate that this frame was part of. Does not currently take into account drop rate timecode.
Arguments
sample_rate
- The rate (in samples per second) that samples were fed to the decoder that produced this frame. Used to make an estimation of the framerate.
Trait Implementations
impl Debug for LTCFrame
[src]
impl Eq for LTCFrame
[src]
impl PartialEq<LTCFrame> for LTCFrame
[src]
impl StructuralEq for LTCFrame
[src]
impl StructuralPartialEq for LTCFrame
[src]
Auto Trait Implementations
impl RefUnwindSafe for LTCFrame
impl Send for LTCFrame
impl Sync for LTCFrame
impl Unpin for LTCFrame
impl UnwindSafe for LTCFrame
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,