pub struct VideoProject {
pub id: String,
pub name: String,
pub width: u32,
pub height: u32,
pub fps: f64,
pub tracks: Vec<VideoTrack>,
pub transitions: BTreeMap<String, VideoTransition>,
pub render_format: String,
pub render_bitrate: u64,
}Expand description
A video project — tracks, transitions, and render settings.
Fields§
§id: String§name: String§width: u32§height: u32§fps: f64§tracks: Vec<VideoTrack>§transitions: BTreeMap<String, VideoTransition>§render_format: String§render_bitrate: u64Implementations§
Source§impl VideoProject
impl VideoProject
Sourcepub fn new(id: &str, name: &str, width: u32, height: u32, fps: f64) -> Self
pub fn new(id: &str, name: &str, width: u32, height: u32, fps: f64) -> Self
Creates a project at widthxheight@fps with no tracks.
Sourcepub fn add_track(&mut self, track: VideoTrack)
pub fn add_track(&mut self, track: VideoTrack)
Appends a track.
Sourcepub fn add_transition(&mut self, transition: VideoTransition)
pub fn add_transition(&mut self, transition: VideoTransition)
Registers a transition.
Sourcepub fn total_duration(&self) -> f64
pub fn total_duration(&self) -> f64
Longest track duration.
Sourcepub fn set_render_format(&mut self, format: &str)
pub fn set_render_format(&mut self, format: &str)
Sets the output container/codec label.
Sourcepub fn set_render_bitrate(&mut self, bitrate: u64)
pub fn set_render_bitrate(&mut self, bitrate: u64)
Sets the target output bitrate.
Sourcepub fn track_count(&self) -> usize
pub fn track_count(&self) -> usize
Number of tracks.
Trait Implementations§
Source§impl Clone for VideoProject
impl Clone for VideoProject
Auto Trait Implementations§
impl Freeze for VideoProject
impl RefUnwindSafe for VideoProject
impl Send for VideoProject
impl Sync for VideoProject
impl Unpin for VideoProject
impl UnsafeUnpin for VideoProject
impl UnwindSafe for VideoProject
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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