pub enum OutputConstraint {
MaxVideoBitrate(u64),
MinVideoBitrate(u64),
MaxAudioBitrate(u64),
ExactWidth(u32),
ExactHeight(u32),
MaxFileSizeBytes(u64),
DurationWithinTolerance {
expected: f64,
tolerance: f64,
},
HasAudio,
HasVideo,
}Expand description
A constraint that a transcode output must satisfy.
Variants§
MaxVideoBitrate(u64)
Video bitrate must not exceed the given value (bps).
MinVideoBitrate(u64)
Video bitrate must be at least the given value (bps).
MaxAudioBitrate(u64)
Audio bitrate must not exceed the given value (bps).
ExactWidth(u32)
Video width must equal the given pixel count.
ExactHeight(u32)
Video height must equal the given pixel count.
MaxFileSizeBytes(u64)
Output file must not exceed this size in bytes.
DurationWithinTolerance
Duration must be within tolerance seconds of expected.
HasAudio
The file must carry an audio track.
HasVideo
The file must carry a video track.
Implementations§
Source§impl OutputConstraint
impl OutputConstraint
Sourcepub fn constraint_name(&self) -> &'static str
pub fn constraint_name(&self) -> &'static str
A short identifier used in reports.
Sourcepub fn is_bitrate_constraint(&self) -> bool
pub fn is_bitrate_constraint(&self) -> bool
Returns true for constraints that relate to bitrate.
Sourcepub fn is_stream_presence(&self) -> bool
pub fn is_stream_presence(&self) -> bool
Returns true for constraints about presence of a stream.
Trait Implementations§
Source§impl Clone for OutputConstraint
impl Clone for OutputConstraint
Source§fn clone(&self) -> OutputConstraint
fn clone(&self) -> OutputConstraint
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 OutputConstraint
impl Debug for OutputConstraint
Source§impl PartialEq for OutputConstraint
impl PartialEq for OutputConstraint
impl StructuralPartialEq for OutputConstraint
Auto Trait Implementations§
impl Freeze for OutputConstraint
impl RefUnwindSafe for OutputConstraint
impl Send for OutputConstraint
impl Sync for OutputConstraint
impl Unpin for OutputConstraint
impl UnsafeUnpin for OutputConstraint
impl UnwindSafe for OutputConstraint
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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