pub struct Settings { /* private fields */ }
Expand description
Holds a logical combination of encoder settings.
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn preset_h264_yuv420p(
width: usize,
height: usize,
realtime: bool,
) -> Settings
pub fn preset_h264_yuv420p( width: usize, height: usize, realtime: bool, ) -> Settings
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 preset_h264_custom(
width: usize,
height: usize,
pixel_format: PixelFormat,
options: Options,
) -> Settings
pub fn preset_h264_custom( width: usize, height: usize, pixel_format: PixelFormat, options: Options, ) -> Settings
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.+
Sourcepub fn set_keyframe_interval(&mut self, keyframe_interval: u64)
pub fn set_keyframe_interval(&mut self, keyframe_interval: u64)
Set the keyframe interval.
Sourcepub fn with_keyframe_interval(self, keyframe_interval: u64) -> Self
pub fn with_keyframe_interval(self, keyframe_interval: u64) -> Self
Set the keyframe interval.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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