pub struct VideoModeOptions(/* private fields */);Expand description
Optional video mode parameters.
Implementations§
Source§impl VideoModeOptions
impl VideoModeOptions
Sourcepub const fn new() -> VideoModeOptions
pub const fn new() -> VideoModeOptions
Create new empty set of options.
Sourcepub const fn set_quantization_level(&mut self, level: u8)
pub const fn set_quantization_level(&mut self, level: u8)
Set video codec quantization level.
Non-zero value makes video encoding lossy. Typical value is between 0 and 4.
Sourcepub const fn quantization_level(&self) -> u8
pub const fn quantization_level(&self) -> u8
Returns video codec quantization level.
Sourcepub const fn set_chroma_subsampling(&mut self, value: bool)
pub const fn set_chroma_subsampling(&mut self, value: bool)
Enables/disables 4:2:0 chroma subsampling.
Chroma subsampling makes video encoding lossy.
Sourcepub const fn chroma_subsampling(&self) -> bool
pub const fn chroma_subsampling(&self) -> bool
Returns true when chroma subsampling is enabled.
Sourcepub const fn set_raw(&mut self, value: bool)
pub const fn set_raw(&mut self, value: bool)
Sets raw mode.
When enabled, video frames are written in the original format without encoding.
This is useful when running the code in a RISCV interpreter.
pub const fn as_u64(self) -> u64
Trait Implementations§
Source§impl Clone for VideoModeOptions
impl Clone for VideoModeOptions
Source§fn clone(&self) -> VideoModeOptions
fn clone(&self) -> VideoModeOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VideoModeOptions
impl Debug for VideoModeOptions
Source§impl Default for VideoModeOptions
impl Default for VideoModeOptions
Source§fn default() -> VideoModeOptions
fn default() -> VideoModeOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for VideoModeOptions
impl PartialEq for VideoModeOptions
Source§fn eq(&self, other: &VideoModeOptions) -> bool
fn eq(&self, other: &VideoModeOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl TryFrom<u64> for VideoModeOptions
impl TryFrom<u64> for VideoModeOptions
impl Copy for VideoModeOptions
impl Eq for VideoModeOptions
impl StructuralPartialEq for VideoModeOptions
Auto Trait Implementations§
impl Freeze for VideoModeOptions
impl RefUnwindSafe for VideoModeOptions
impl Send for VideoModeOptions
impl Sync for VideoModeOptions
impl Unpin for VideoModeOptions
impl UnsafeUnpin for VideoModeOptions
impl UnwindSafe for VideoModeOptions
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