pub struct AbrRungConfig {
pub label: String,
pub width: u32,
pub height: u32,
pub video_bitrate_bps: u64,
pub audio_bitrate_bps: u64,
pub fps_num: u32,
pub fps_den: u32,
pub crf: Option<u8>,
pub profile: Option<String>,
pub bufsize_bits: Option<u64>,
}Expand description
A single rung in an ABR ladder describing one quality level.
Fields§
§label: StringLabel for this rung (e.g., “1080p”, “720p”).
width: u32Video width in pixels.
height: u32Video height in pixels.
video_bitrate_bps: u64Target video bitrate in bits per second.
audio_bitrate_bps: u64Target audio bitrate in bits per second.
fps_num: u32Frame rate numerator.
fps_den: u32Frame rate denominator.
crf: Option<u8>Constant Rate Factor (lower = better quality).
profile: Option<String>Codec profile (e.g., “high”, “main”, “baseline”).
bufsize_bits: Option<u64>Maximum buffer size in bits.
Implementations§
Source§impl AbrRungConfig
impl AbrRungConfig
Sourcepub fn new(
label: impl Into<String>,
width: u32,
height: u32,
video_bitrate_bps: u64,
audio_bitrate_bps: u64,
) -> Self
pub fn new( label: impl Into<String>, width: u32, height: u32, video_bitrate_bps: u64, audio_bitrate_bps: u64, ) -> Self
Creates a new ABR rung configuration.
Sourcepub fn with_profile(self, profile: impl Into<String>) -> Self
pub fn with_profile(self, profile: impl Into<String>) -> Self
Sets the codec profile.
Sourcepub fn with_bufsize(self, bufsize_bits: u64) -> Self
pub fn with_bufsize(self, bufsize_bits: u64) -> Self
Sets the buffer size in bits (typically 2x the video bitrate).
Sourcepub fn total_bitrate_bps(&self) -> u64
pub fn total_bitrate_bps(&self) -> u64
Returns the total bitrate (video + audio) in bits per second.
Sourcepub fn pixel_count(&self) -> u64
pub fn pixel_count(&self) -> u64
Returns the pixel count for this rung.
Trait Implementations§
Source§impl Clone for AbrRungConfig
impl Clone for AbrRungConfig
Source§fn clone(&self) -> AbrRungConfig
fn clone(&self) -> AbrRungConfig
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 AbrRungConfig
impl Debug for AbrRungConfig
Source§impl PartialEq for AbrRungConfig
impl PartialEq for AbrRungConfig
impl StructuralPartialEq for AbrRungConfig
Auto Trait Implementations§
impl Freeze for AbrRungConfig
impl RefUnwindSafe for AbrRungConfig
impl Send for AbrRungConfig
impl Sync for AbrRungConfig
impl Unpin for AbrRungConfig
impl UnsafeUnpin for AbrRungConfig
impl UnwindSafe for AbrRungConfig
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