#[non_exhaustive]pub enum Codec {
H264,
H265,
}Expand description
Output video codec. #[non_exhaustive] so new codecs can be added without
breaking external matches.
Not every codec has a backend on every platform: H.265 is hardware-only
(VideoToolbox on macOS today). Building an Encoder returns
Error::NoEncoder when nothing can encode the
requested codec on this machine.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
H264
H.264 / AVC, Annex-B with in-band SPS/PPS (the “avc3” shape). The widest support and the default.
H265
H.265 / HEVC, Annex-B with in-band VPS/SPS/PPS (the “hev1” shape).
Trait Implementations§
impl Copy for Codec
impl Eq for Codec
impl StructuralPartialEq for Codec
Auto Trait Implementations§
impl Freeze for Codec
impl RefUnwindSafe for Codec
impl Send for Codec
impl Sync for Codec
impl Unpin for Codec
impl UnsafeUnpin for Codec
impl UnwindSafe for Codec
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