pub struct TransitionRenderer;Expand description
Transition renderer helper.
Implementations§
Source§impl TransitionRenderer
impl TransitionRenderer
Sourcepub fn blend_video(
frame_a: &VideoFrame,
frame_b: &VideoFrame,
transition: &Transition,
progress: f64,
) -> VideoFrame
pub fn blend_video( frame_a: &VideoFrame, frame_b: &VideoFrame, transition: &Transition, progress: f64, ) -> VideoFrame
Blend two video frames based on transition progress.
progress ranges from 0.0 (fully frame_a) to 1.0 (fully frame_b).
When the two frames have different dimensions the larger frame is returned
unchanged. When formats differ frame_a is returned unchanged.
Sourcepub fn mix_audio(
frame_a: &AudioFrame,
frame_b: &AudioFrame,
_transition: &Transition,
progress: f64,
) -> AudioFrame
pub fn mix_audio( frame_a: &AudioFrame, frame_b: &AudioFrame, _transition: &Transition, progress: f64, ) -> AudioFrame
Mix two audio frames based on transition progress (cross-fade).
progress ranges from 0.0 (fully frame_a) to 1.0 (fully frame_b).
F32 interleaved and F32p planar audio are blended; all other formats
fall back to returning frame_a unchanged. When sample formats differ,
frame_a is returned unchanged.
Auto Trait Implementations§
impl Freeze for TransitionRenderer
impl RefUnwindSafe for TransitionRenderer
impl Send for TransitionRenderer
impl Sync for TransitionRenderer
impl Unpin for TransitionRenderer
impl UnsafeUnpin for TransitionRenderer
impl UnwindSafe for TransitionRenderer
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> 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