pub struct CameraTrack {
pub id: String,
pub clips: Vec<ClipRef>,
pub timecode_start: i64,
}Expand description
A single camera track holding an ordered list of ClipRefs and a
source timecode anchor.
Fields§
§id: StringHuman-readable or machine-generated camera identifier.
clips: Vec<ClipRef>Ordered list of clip references on this track.
timecode_start: i64The timeline start position of this camera, in milliseconds. All clip start_ms values are relative to this anchor.
Implementations§
Source§impl CameraTrack
impl CameraTrack
Sourcepub fn new(id: impl Into<String>, timecode_start: i64) -> Self
pub fn new(id: impl Into<String>, timecode_start: i64) -> Self
Create a new empty camera track.
Sourcepub fn clip_at_ms(&self, ms: i64) -> Option<&ClipRef>
pub fn clip_at_ms(&self, ms: i64) -> Option<&ClipRef>
Return the clip whose time range contains ms (timeline-relative).
The lookup accounts for the track’s timecode_start offset so that
ms should be given in the same coordinate system as timecode_start.
Sourcepub fn clip_count(&self) -> usize
pub fn clip_count(&self) -> usize
Total number of clips on this track.
Trait Implementations§
Source§impl Clone for CameraTrack
impl Clone for CameraTrack
Source§fn clone(&self) -> CameraTrack
fn clone(&self) -> CameraTrack
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CameraTrack
impl RefUnwindSafe for CameraTrack
impl Send for CameraTrack
impl Sync for CameraTrack
impl Unpin for CameraTrack
impl UnsafeUnpin for CameraTrack
impl UnwindSafe for CameraTrack
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more