pub enum VideoCodec {
H264,
Hevc,
Vp9,
Av1,
Mpeg4Part2,
}Expand description
Video codecs the engine resolves a rate for.
One set of spellings for every host: the native sinks key on these
directly, and the browser adapter maps its avc onto Self::H264 at its
own edge. mpeg4-part2 has no browser sink.
Variants§
Implementations§
Source§impl VideoCodec
impl VideoCodec
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Stable identifier used by every protocol and binding.
Sourcepub const fn chroma_location(self) -> ChromaLocation
pub const fn chroma_location(self) -> ChromaLocation
Where the codec’s 4:2:0 chroma samples sit when a stream does not say, which is how every export is written: an export packs its chroma there, since a browser encoder cannot tag it otherwise.
H.264, HEVC, and MPEG-4 Part 2 imply H.273 chroma location type 0,
co-sited with the even luma columns (ChromaLocation::Left), as
decoders report them and alpha2 imports them. VP9 and AV1 streams
leave it unspecified, which alpha2 reads as centred.
Trait Implementations§
Source§impl Clone for VideoCodec
impl Clone for VideoCodec
impl Copy for VideoCodec
Source§impl Debug for VideoCodec
impl Debug for VideoCodec
Source§impl<'de> Deserialize<'de> for VideoCodec
impl<'de> Deserialize<'de> for VideoCodec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for VideoCodec
Source§impl FromStr for VideoCodec
impl FromStr for VideoCodec
Source§impl Hash for VideoCodec
impl Hash for VideoCodec
Source§impl PartialEq for VideoCodec
impl PartialEq for VideoCodec
Source§impl Serialize for VideoCodec
impl Serialize for VideoCodec
impl StructuralPartialEq for VideoCodec
Auto Trait Implementations§
impl Freeze for VideoCodec
impl RefUnwindSafe for VideoCodec
impl Send for VideoCodec
impl Sync for VideoCodec
impl Unpin for VideoCodec
impl UnsafeUnpin for VideoCodec
impl UnwindSafe for VideoCodec
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