pub struct BitrateLadderRung {
pub label: String,
pub width: u32,
pub height: u32,
pub bitrate_bps: u64,
pub codec: ProxyCodecChoice,
}Expand description
A single rung of a proxy bitrate ladder.
Fields§
§label: StringLabel for this rung (e.g., “1080p”, “720p”).
width: u32Width in pixels.
height: u32Height in pixels.
bitrate_bps: u64Target bitrate in bits per second.
codec: ProxyCodecChoiceCodec for this rung.
Implementations§
Source§impl BitrateLadderRung
impl BitrateLadderRung
Sourcepub fn new(
label: impl Into<String>,
width: u32,
height: u32,
bitrate_bps: u64,
codec: ProxyCodecChoice,
) -> Self
pub fn new( label: impl Into<String>, width: u32, height: u32, bitrate_bps: u64, codec: ProxyCodecChoice, ) -> Self
Create a new bitrate ladder rung.
Sourcepub fn pixel_count(&self) -> u64
pub fn pixel_count(&self) -> u64
Pixel count for this rung.
Sourcepub fn bits_per_pixel_at_24fps(&self) -> f64
pub fn bits_per_pixel_at_24fps(&self) -> f64
Bits per pixel at this rung’s bitrate and 24fps.
Trait Implementations§
Source§impl Clone for BitrateLadderRung
impl Clone for BitrateLadderRung
Source§fn clone(&self) -> BitrateLadderRung
fn clone(&self) -> BitrateLadderRung
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 BitrateLadderRung
impl Debug for BitrateLadderRung
Source§impl PartialEq for BitrateLadderRung
impl PartialEq for BitrateLadderRung
impl StructuralPartialEq for BitrateLadderRung
Auto Trait Implementations§
impl Freeze for BitrateLadderRung
impl RefUnwindSafe for BitrateLadderRung
impl Send for BitrateLadderRung
impl Sync for BitrateLadderRung
impl Unpin for BitrateLadderRung
impl UnsafeUnpin for BitrateLadderRung
impl UnwindSafe for BitrateLadderRung
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