pub struct VideoClip {
pub id: String,
pub source: String,
pub start_time: f64,
pub duration: f64,
pub in_point: f64,
pub out_point: f64,
pub speed: f64,
pub colour: ColourGrade,
}Expand description
A video clip — a segment of video content.
Fields§
§id: String§source: String§start_time: f64§duration: f64§in_point: f64§out_point: f64§speed: f64§colour: ColourGradeImplementations§
Source§impl VideoClip
impl VideoClip
Sourcepub fn new(id: &str, source: &str, duration: f64) -> Self
pub fn new(id: &str, source: &str, duration: f64) -> Self
Creates a clip for source with duration, 1.0 speed, full-range trim.
Sourcepub fn trim(&mut self, in_point: f64, out_point: f64)
pub fn trim(&mut self, in_point: f64, out_point: f64)
Sets in/out points (seconds) bounding the clip.
Sourcepub fn effective_duration(&self) -> f64
pub fn effective_duration(&self) -> f64
Trimmed duration divided by speed.
Sourcepub fn apply_colour_grade(&mut self, grade: ColourGrade)
pub fn apply_colour_grade(&mut self, grade: ColourGrade)
Applies a colour grade to the clip.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VideoClip
impl RefUnwindSafe for VideoClip
impl Send for VideoClip
impl Sync for VideoClip
impl Unpin for VideoClip
impl UnsafeUnpin for VideoClip
impl UnwindSafe for VideoClip
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