pub struct AudioTrack {
pub src: String,
pub start_from: f64,
pub timeline_start: f64,
pub duration: Option<f64>,
pub volume: f64,
pub playback_rate: f64,
pub looped: bool,
}Expand description
Audio source mixed into the encoded output.
Fields§
§src: StringLocal audio or video file containing an audio stream.
start_from: f64Source offset in seconds.
timeline_start: f64Composition timeline offset in seconds.
duration: Option<f64>Optional audible duration on the composition timeline.
volume: f64Linear gain in 0.0..=1.0.
playback_rate: f64Playback speed supported by FFmpeg atempo (0.5..=2.0).
looped: boolRepeat the source when it is shorter than the requested duration.
Implementations§
Trait Implementations§
Source§impl Clone for AudioTrack
impl Clone for AudioTrack
Source§fn clone(&self) -> AudioTrack
fn clone(&self) -> AudioTrack
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 AudioTrack
impl Debug for AudioTrack
Source§impl<'de> Deserialize<'de> for AudioTrack
impl<'de> Deserialize<'de> for AudioTrack
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AudioTrack
impl PartialEq for AudioTrack
Source§impl Serialize for AudioTrack
impl Serialize for AudioTrack
impl StructuralPartialEq for AudioTrack
Auto Trait Implementations§
impl Freeze for AudioTrack
impl RefUnwindSafe for AudioTrack
impl Send for AudioTrack
impl Sync for AudioTrack
impl Unpin for AudioTrack
impl UnsafeUnpin for AudioTrack
impl UnwindSafe for AudioTrack
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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