pub struct TrackRenderInput {
pub track_index: usize,
pub kind: TrackKind,
pub clips: Vec<ClipWithSource>,
pub position: i64,
pub width: u32,
pub height: u32,
pub channels: usize,
pub sample_rate: u32,
pub num_samples: usize,
}Expand description
All immutable data needed to render one track’s contribution at a single frame position.
This struct is intentionally cheap to clone (all expensive data sits
behind Arcs) so rayon can distribute inputs across threads without
copying pixel data.
Fields§
§track_index: usizeZero-based track index (used in the output for ordering).
kind: TrackKindVideo or audio track.
clips: Vec<ClipWithSource>Clips active at position, paired with their decoded sources.
Clips are already filtered to the ones that overlap position.
position: i64Timeline position (in timebase units) to render.
width: u32Target frame width (video only; ignored for audio).
height: u32Target frame height (video only; ignored for audio).
channels: usizeNumber of audio channels (audio only; ignored for video).
sample_rate: u32Sample rate in Hz (audio only; ignored for video).
num_samples: usizeNumber of audio samples per render call (audio only).
Implementations§
Source§impl TrackRenderInput
impl TrackRenderInput
Sourcepub fn video(
track_index: usize,
clips: Vec<ClipWithSource>,
position: i64,
width: u32,
height: u32,
) -> Self
pub fn video( track_index: usize, clips: Vec<ClipWithSource>, position: i64, width: u32, height: u32, ) -> Self
Build a TrackRenderInput for a video track.
Sourcepub fn audio(
track_index: usize,
clips: Vec<ClipWithSource>,
position: i64,
channels: usize,
sample_rate: u32,
num_samples: usize,
) -> Self
pub fn audio( track_index: usize, clips: Vec<ClipWithSource>, position: i64, channels: usize, sample_rate: u32, num_samples: usize, ) -> Self
Build a TrackRenderInput for an audio track.
Trait Implementations§
Source§impl Clone for TrackRenderInput
impl Clone for TrackRenderInput
Source§fn clone(&self) -> TrackRenderInput
fn clone(&self) -> TrackRenderInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TrackRenderInput
impl RefUnwindSafe for TrackRenderInput
impl Send for TrackRenderInput
impl Sync for TrackRenderInput
impl Unpin for TrackRenderInput
impl UnsafeUnpin for TrackRenderInput
impl UnwindSafe for TrackRenderInput
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
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>
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>
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