pub struct TimecodeEventCapture { /* private fields */ }Expand description
Accumulates timecode events recorded during a production session.
Thread safety: TimecodeEventCapture is not Sync; wrap in a Mutex
or RwLock if sharing across threads.
Implementations§
Source§impl TimecodeEventCapture
impl TimecodeEventCapture
Sourcepub fn mark_out(&mut self, tc: Timecode) -> Option<EditRange>
pub fn mark_out(&mut self, tc: Timecode) -> Option<EditRange>
Record a mark-out event at tc.
Returns the completed EditRange if a pending mark-in exists.
Sourcepub fn cue(&mut self, tc: Timecode, label: impl Into<String>)
pub fn cue(&mut self, tc: Timecode, label: impl Into<String>)
Record a cue trigger at tc with an optional label.
Sourcepub fn custom(
&mut self,
tc: Timecode,
name: impl Into<String>,
label: impl Into<String>,
payload: Option<String>,
)
pub fn custom( &mut self, tc: Timecode, name: impl Into<String>, label: impl Into<String>, payload: Option<String>, )
Record a custom event at tc.
Sourcepub fn events(&self) -> &[TimecodeEvent]
pub fn events(&self) -> &[TimecodeEvent]
Return a slice of all recorded events.
Sourcepub fn mark_ins(&self) -> Vec<&TimecodeEvent>
pub fn mark_ins(&self) -> Vec<&TimecodeEvent>
Return only the mark-in events.
Sourcepub fn mark_outs(&self) -> Vec<&TimecodeEvent>
pub fn mark_outs(&self) -> Vec<&TimecodeEvent>
Return only the mark-out events.
Sourcepub fn edit_ranges(&self) -> Vec<EditRange>
pub fn edit_ranges(&self) -> Vec<EditRange>
Reconstruct all completed in/out ranges from the event log.
Pairs mark-in events with the next mark-out event that follows them.
Trait Implementations§
Source§impl Debug for TimecodeEventCapture
impl Debug for TimecodeEventCapture
Source§impl Default for TimecodeEventCapture
impl Default for TimecodeEventCapture
Source§fn default() -> TimecodeEventCapture
fn default() -> TimecodeEventCapture
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TimecodeEventCapture
impl RefUnwindSafe for TimecodeEventCapture
impl Send for TimecodeEventCapture
impl Sync for TimecodeEventCapture
impl Unpin for TimecodeEventCapture
impl UnsafeUnpin for TimecodeEventCapture
impl UnwindSafe for TimecodeEventCapture
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