pub struct VideoFrameBuilder { /* private fields */ }Expand description
Builder for configuring a VideoFrame with ergonomic method chaining
Implementations§
Source§impl VideoFrameBuilder
impl VideoFrameBuilder
Sourcepub fn resolution(self, width: i32, height: i32) -> Self
pub fn resolution(self, width: i32, height: i32) -> Self
Set the video resolution
Sourcepub fn pixel_format(self, pixel_format: PixelFormat) -> Self
pub fn pixel_format(self, pixel_format: PixelFormat) -> Self
Set the pixel format
Sourcepub fn frame_rate(self, numerator: i32, denominator: i32) -> Self
pub fn frame_rate(self, numerator: i32, denominator: i32) -> Self
Set the frame rate as a fraction (e.g., 30000/1001 for 29.97fps)
Sourcepub fn aspect_ratio(self, ratio: f32) -> Self
pub fn aspect_ratio(self, ratio: f32) -> Self
Set the picture aspect ratio
Sourcepub fn scan_type(self, scan_type: ScanType) -> Self
pub fn scan_type(self, scan_type: ScanType) -> Self
Set the scan type (progressive, interlaced, etc.)
Sourcepub fn build(self) -> Result<VideoFrame>
pub fn build(self) -> Result<VideoFrame>
Build the VideoFrame
Trait Implementations§
Source§impl Clone for VideoFrameBuilder
impl Clone for VideoFrameBuilder
Source§fn clone(&self) -> VideoFrameBuilder
fn clone(&self) -> VideoFrameBuilder
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 VideoFrameBuilder
impl Debug for VideoFrameBuilder
Auto Trait Implementations§
impl Freeze for VideoFrameBuilder
impl RefUnwindSafe for VideoFrameBuilder
impl Send for VideoFrameBuilder
impl Sync for VideoFrameBuilder
impl Unpin for VideoFrameBuilder
impl UnsafeUnpin for VideoFrameBuilder
impl UnwindSafe for VideoFrameBuilder
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