#[non_exhaustive]pub struct DecoderConfig {
pub codec: VideoCodec,
pub implementation: ImplPreference,
pub output: PixelFormat,
pub fit: Option<(u32, u32)>,
pub mode: DecodeMode,
pub output_queue: usize,
}Expand description
One decoder per remote track (or per file, in DecodeMode::File).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.codec: VideoCodecThe codec.
implementation: ImplPreferenceHardware or software.
output: PixelFormatOutput CPU planes in this format, or Native to keep OS buffers.
fit: Option<(u32, u32)>Scale outputs to fit this box, keeping the aspect ratio; None: the
coded size.
mode: DecodeModeReal time (the default) or a file.
output_queue: usizeDecodeMode::File only: how many decoded frames may wait for
poll before submit answers Busy, 1 to
FILE_OUTPUT_QUEUE_MAX
(anything else is Invalid at open). Real time ignores it: its
queue is always 2, oldest dropped.
Implementations§
Source§impl DecoderConfig
impl DecoderConfig
Sourcepub fn new(codec: VideoCodec) -> DecoderConfig
pub fn new(codec: VideoCodec) -> DecoderConfig
codec, hardware preferred, I420 out at the coded size, real time.
Sourcepub fn file(codec: VideoCodec) -> DecoderConfig
pub fn file(codec: VideoCodec) -> DecoderConfig
codec for a file (DecodeMode::File): hardware preferred, I420
out at the coded size, an output queue of
FILE_OUTPUT_QUEUE.
Sourcepub fn validate(&self) -> Result<(), VideoError>
pub fn validate(&self) -> Result<(), VideoError>
Invalid for a File-mode output queue outside 1 to
FILE_OUTPUT_QUEUE_MAX.
Trait Implementations§
Source§impl Clone for DecoderConfig
impl Clone for DecoderConfig
impl Copy for DecoderConfig
Source§impl Debug for DecoderConfig
impl Debug for DecoderConfig
impl Eq for DecoderConfig
Source§impl Hash for DecoderConfig
impl Hash for DecoderConfig
Source§impl PartialEq for DecoderConfig
impl PartialEq for DecoderConfig
impl StructuralPartialEq for DecoderConfig
Auto Trait Implementations§
impl Forget for DecoderConfig
impl Freeze for DecoderConfig
impl Move for DecoderConfig
impl RefUnwindSafe for DecoderConfig
impl Send for DecoderConfig
impl Sync for DecoderConfig
impl Unpin for DecoderConfig
impl UnsafeUnpin for DecoderConfig
impl UnwindSafe for DecoderConfig
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