pub struct EncoderSettings<'o> { /* private fields */ }
Expand description
Holds a logical combination of encoder settings.
Implementations§
Source§impl<'o> Settings<'o>
impl<'o> Settings<'o>
Sourcepub fn for_h264_yuv420p(
width: usize,
height: usize,
realtime: bool,
) -> Settings<'o>
pub fn for_h264_yuv420p( width: usize, height: usize, realtime: bool, ) -> Settings<'o>
Create encoder settings for an H264 stream with YUV420p pixel format. This will encode to arguably the most widely compatible video file since H264 is a common codec and YUV420p is the most commonly used pixel format.
Sourcepub fn for_h264_custom(
width: usize,
height: usize,
pixel_format: PixelFormat,
options: Options<'o>,
) -> Settings<'o>
pub fn for_h264_custom( width: usize, height: usize, pixel_format: PixelFormat, options: Options<'o>, ) -> Settings<'o>
Create encoder settings for an H264 stream with a custom pixel format and options. This allows for greater flexibility in encoding settings, enabling specific requirements or optimizations to be set depending on the use case.
§Arguments
width
- The width of the video stream.height
- The height of the video stream.pixel_format
- The desired pixel format for the video stream.options
- Custom H264 encoding options.
§Return value
A Settings
instance with the specified configuration.+
Auto Trait Implementations§
impl<'o> Freeze for Settings<'o>
impl<'o> RefUnwindSafe for Settings<'o>
impl<'o> Send for Settings<'o>
impl<'o> Sync for Settings<'o>
impl<'o> Unpin for Settings<'o>
impl<'o> UnwindSafe for Settings<'o>
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