pub struct AbrRendition {
pub width: u32,
pub height: u32,
pub video_bitrate: u64,
pub audio_bitrate: u64,
pub name: Option<String>,
}Expand description
One resolution/bitrate tier in an ABR ladder.
Each rendition becomes an independent encoder stream. The output files are
placed in a subdirectory named after the rendition (see dir_name).
Fields§
§width: u32Target video width in pixels.
height: u32Target video height in pixels.
video_bitrate: u64Target video encoder bitrate in bits per second.
audio_bitrate: u64Target audio encoder bitrate in bits per second.
name: Option<String>Optional subdirectory name. Defaults to "{width}x{height}".
Implementations§
Source§impl AbrRendition
impl AbrRendition
Sourcepub fn dir_name(&self) -> String
pub fn dir_name(&self) -> String
Returns the subdirectory name for this rendition.
Uses name if set; otherwise "{width}x{height}".
§Example
use ff_stream::AbrRendition;
let r = AbrRendition { width: 1920, height: 1080,
video_bitrate: 4_000_000, audio_bitrate: 192_000, name: None };
assert_eq!(r.dir_name(), "1920x1080");
let r2 = AbrRendition { width: 1280, height: 720,
video_bitrate: 2_000_000, audio_bitrate: 128_000,
name: Some("720p".into()) };
assert_eq!(r2.dir_name(), "720p");Auto Trait Implementations§
impl Freeze for AbrRendition
impl RefUnwindSafe for AbrRendition
impl Send for AbrRendition
impl Sync for AbrRendition
impl Unpin for AbrRendition
impl UnsafeUnpin for AbrRendition
impl UnwindSafe for AbrRendition
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