pub struct MultiCamSession {
pub cameras: Vec<CameraTrack>,
pub sync_offset_ms: Vec<i64>,
}Expand description
A multi-camera editing session that groups camera tracks and their sync offsets.
Fields§
§cameras: Vec<CameraTrack>All camera tracks in this session, in order.
sync_offset_ms: Vec<i64>Per-camera sync offset in milliseconds (positive = camera starts later). The vector is grown automatically when cameras are added.
Implementations§
Source§impl MultiCamSession
impl MultiCamSession
Sourcepub fn add_camera(&mut self, track: CameraTrack)
pub fn add_camera(&mut self, track: CameraTrack)
Add a camera track to the session. A zero sync offset is appended.
Sourcepub fn set_sync_offset(
&mut self,
camera_idx: usize,
offset_ms: i64,
) -> EditResult<()>
pub fn set_sync_offset( &mut self, camera_idx: usize, offset_ms: i64, ) -> EditResult<()>
Override the sync offset for camera_idx.
§Errors
Returns EditError::InvalidEdit when camera_idx is out of range.
Sourcepub fn camera_count(&self) -> usize
pub fn camera_count(&self) -> usize
Number of cameras in this session.
Sourcepub fn camera_local_ms(&self, camera_idx: usize, abs_ms: i64) -> i64
pub fn camera_local_ms(&self, camera_idx: usize, abs_ms: i64) -> i64
Return the sync-adjusted timeline position for a given camera at absolute
position abs_ms. The result is the position within that camera’s own
coordinate system after accounting for its sync offset.
Trait Implementations§
Source§impl Clone for MultiCamSession
impl Clone for MultiCamSession
Source§fn clone(&self) -> MultiCamSession
fn clone(&self) -> MultiCamSession
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 moreSource§impl Debug for MultiCamSession
impl Debug for MultiCamSession
Source§impl Default for MultiCamSession
impl Default for MultiCamSession
Source§fn default() -> MultiCamSession
fn default() -> MultiCamSession
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MultiCamSession
impl RefUnwindSafe for MultiCamSession
impl Send for MultiCamSession
impl Sync for MultiCamSession
impl Unpin for MultiCamSession
impl UnsafeUnpin for MultiCamSession
impl UnwindSafe for MultiCamSession
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