pub struct VideoExpectations {
pub width: Option<u32>,
pub height: Option<u32>,
pub fps: Option<f64>,
pub codec: Option<String>,
pub min_duration_secs: Option<f64>,
pub max_duration_secs: Option<f64>,
pub require_audio: bool,
pub fps_tolerance: f64,
}Expand description
Expected video properties for validation.
Fields§
§width: Option<u32>Expected width (None = skip check)
height: Option<u32>Expected height (None = skip check)
fps: Option<f64>Expected FPS (None = skip check)
codec: Option<String>Expected codec (None = skip check)
min_duration_secs: Option<f64>Minimum duration in seconds (None = skip check)
max_duration_secs: Option<f64>Maximum duration in seconds (None = skip check)
require_audio: boolWhether audio stream must be present
fps_tolerance: f64FPS tolerance for comparison (default: 0.01)
Implementations§
Source§impl VideoExpectations
impl VideoExpectations
Sourcepub const fn with_resolution(self, width: u32, height: u32) -> Self
pub const fn with_resolution(self, width: u32, height: u32) -> Self
Set expected resolution.
Sourcepub fn with_codec(self, codec: impl Into<String>) -> Self
pub fn with_codec(self, codec: impl Into<String>) -> Self
Set expected codec.
Sourcepub fn with_min_duration(self, secs: f64) -> Self
pub fn with_min_duration(self, secs: f64) -> Self
Set minimum duration.
Sourcepub fn with_max_duration(self, secs: f64) -> Self
pub fn with_max_duration(self, secs: f64) -> Self
Set maximum duration.
Sourcepub const fn with_require_audio(self, require: bool) -> Self
pub const fn with_require_audio(self, require: bool) -> Self
Require audio stream.
Trait Implementations§
Source§impl Clone for VideoExpectations
impl Clone for VideoExpectations
Source§fn clone(&self) -> VideoExpectations
fn clone(&self) -> VideoExpectations
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 VideoExpectations
impl Debug for VideoExpectations
Auto Trait Implementations§
impl Freeze for VideoExpectations
impl RefUnwindSafe for VideoExpectations
impl Send for VideoExpectations
impl Sync for VideoExpectations
impl Unpin for VideoExpectations
impl UnsafeUnpin for VideoExpectations
impl UnwindSafe for VideoExpectations
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().