pub struct AbrRung {
pub width: u32,
pub height: u32,
pub video_bitrate: u64,
pub audio_bitrate: u64,
pub frame_rate: (u32, u32),
pub codec: String,
pub profile_name: String,
}Expand description
A single rung in an ABR ladder.
Fields§
§width: u32Video width in pixels.
height: u32Video height in pixels.
video_bitrate: u64Target video bitrate in bits per second.
audio_bitrate: u64Target audio bitrate in bits per second.
frame_rate: (u32, u32)Frame rate as (numerator, denominator).
codec: StringCodec to use for this rung.
profile_name: StringProfile name for this rung (e.g., “720p”, “1080p”).
Implementations§
Source§impl AbrRung
impl AbrRung
Sourcepub fn new(
width: u32,
height: u32,
video_bitrate: u64,
audio_bitrate: u64,
codec: impl Into<String>,
profile_name: impl Into<String>,
) -> Self
pub fn new( width: u32, height: u32, video_bitrate: u64, audio_bitrate: u64, codec: impl Into<String>, profile_name: impl Into<String>, ) -> Self
Creates a new ABR rung.
Sourcepub fn with_frame_rate(self, num: u32, den: u32) -> Self
pub fn with_frame_rate(self, num: u32, den: u32) -> Self
Sets the frame rate.
Sourcepub fn total_bitrate(&self) -> u64
pub fn total_bitrate(&self) -> u64
Gets the total bitrate (video + audio).
Sourcepub fn resolution_string(&self) -> String
pub fn resolution_string(&self) -> String
Gets the resolution as a string (e.g., “1920x1080”).
Sourcepub fn is_full_hd(&self) -> bool
pub fn is_full_hd(&self) -> bool
Checks if this rung is Full HD quality or higher (1080p+).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AbrRung
impl<'de> Deserialize<'de> for AbrRung
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AbrRung
impl StructuralPartialEq for AbrRung
Auto Trait Implementations§
impl Freeze for AbrRung
impl RefUnwindSafe for AbrRung
impl Send for AbrRung
impl Sync for AbrRung
impl Unpin for AbrRung
impl UnsafeUnpin for AbrRung
impl UnwindSafe for AbrRung
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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