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 Decode for VideoModeOptions
impl Decode for VideoModeOptions
Source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<VideoModeOptions, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<VideoModeOptions, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
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 Encode for VideoModeOptions
impl Encode for VideoModeOptions
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>(
&self,
f: __CodecUsingEncodedCallback,
) -> __CodecOutputReturn
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl MaxEncodedLen for VideoModeOptions
impl MaxEncodedLen for VideoModeOptions
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
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 EncodeLike 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