pub enum CodecString {
Avc {
in_band: bool,
profile: u8,
constraints: u8,
level: u8,
},
Hevc {
in_band: bool,
profile_space: u8,
profile: u8,
compatibility: u32,
tier: Tier,
level: u8,
constraints: [u8; 6],
},
Av1 {
profile: u8,
level: u8,
tier: Tier,
bit_depth: u8,
},
DolbyVision {
base: VideoCodec,
in_band: bool,
profile: u8,
level: u8,
},
}Expand description
One video codec string, read.
Variants§
Avc
avc1.PPCCLL (avc3 with in_band): profile_idc, the
constraint flags byte and level_idc, in hex.
Hevc
hvc1.[A-C]P.F.TL.CC… (hev1 with in_band): profile space and
general_profile_idc; the 32 compatibility flags as the string
writes them (bit-reversed, in hex); tier and general_level_idc
(30 times the level: 153 is 5.1); then up to six constraint bytes,
those written in hex, the trailing zero ones left out.
Fields
Av1
av01.P.LLT.DD: seq_profile, seq_level_idx_0, seq_tier_0 and
the bit depth. The optional fields after it are read past and not
kept.
DolbyVision
dvh1.PP.LL (dvhe with in_band) over HEVC, dva1/dvav over
H.264, dav1 over AV1: Dolby Vision’s profile and level.
Implementations§
Source§impl CodecString
impl CodecString
Sourcepub fn covers(&self, source: &CodecString) -> bool
pub fn covers(&self, source: &CodecString) -> bool
Whether a decoder that plays self plays source: the same codec
(the sample entry aside: hvc1 and hev1 are one decoder), a
profile it decodes, and a tier and level at most its own; for AV1
the same bit depth. A profile decodes itself, and a few decode
others by their standard: HEVC Main 10 decodes Main; H.264’s High
profiles decode Main, the ones under them and any stream whose
constraint flags say it is Main. Compatibility and constraint flags
are otherwise not compared.
Sourcepub fn codec(&self) -> VideoCodec
pub fn codec(&self) -> VideoCodec
The codec it is a string of; Dolby Vision’s is its own base layer’s.
Trait Implementations§
Source§impl Clone for CodecString
impl Clone for CodecString
impl Copy for CodecString
Source§impl Debug for CodecString
impl Debug for CodecString
Source§impl<'de> Deserialize<'de> for CodecString
impl<'de> Deserialize<'de> for CodecString
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Source§impl Display for CodecString
impl Display for CodecString
impl Eq for CodecString
Source§impl FromStr for CodecString
impl FromStr for CodecString
Source§impl Hash for CodecString
impl Hash for CodecString
Source§impl PartialEq for CodecString
impl PartialEq for CodecString
Source§impl Serialize for CodecString
On the wire as its string.
impl Serialize for CodecString
On the wire as its string.