pub struct VideoParams {
pub width: u32,
pub height: u32,
pub frame_rate: f64,
pub crf: u8,
}Expand description
A helper that bundles video parameters for convenience.
Fields§
§width: u32Width in pixels.
height: u32Height in pixels.
frame_rate: f64Frames per second.
crf: u8CRF value (0–51 for most codecs).
Implementations§
Source§impl VideoParams
impl VideoParams
Sourcepub fn new(width: u32, height: u32, frame_rate: f64, crf: u8) -> Self
pub fn new(width: u32, height: u32, frame_rate: f64, crf: u8) -> Self
Creates new video params.
Sourcepub fn estimate_bitrate(&self, estimator: &BitrateEstimator) -> u64
pub fn estimate_bitrate(&self, estimator: &BitrateEstimator) -> u64
Estimates bitrate using a BitrateEstimator.
Trait Implementations§
Source§impl Clone for VideoParams
impl Clone for VideoParams
Source§fn clone(&self) -> VideoParams
fn clone(&self) -> VideoParams
Returns a duplicate of the value. Read more
1.0.0 · 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 VideoParams
impl Debug for VideoParams
impl Copy for VideoParams
Auto Trait Implementations§
impl Freeze for VideoParams
impl RefUnwindSafe for VideoParams
impl Send for VideoParams
impl Sync for VideoParams
impl Unpin for VideoParams
impl UnsafeUnpin for VideoParams
impl UnwindSafe for VideoParams
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
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>
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