mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-24 11:20:22 +00:00
feat: remove functionally duplicate codecs
This commit is contained in:
parent
41fa38acf5
commit
1ace5564de
1 changed files with 2 additions and 8 deletions
|
@ -46,8 +46,6 @@ impl Encoder {
|
|||
pub enum Codec {
|
||||
H264,
|
||||
H265,
|
||||
Avc,
|
||||
Hevc,
|
||||
}
|
||||
|
||||
impl Display for Codec {
|
||||
|
@ -55,27 +53,23 @@ impl Display for Codec {
|
|||
f.write_str(match self {
|
||||
Self::H264 => "h264",
|
||||
Self::H265 => "h265",
|
||||
Self::Avc => "AVC",
|
||||
Self::Hevc => "HEVC",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl Codec {
|
||||
pub fn iter() -> Iter<'static, Self> {
|
||||
[Self::H264, Self::H265, Self::Avc, Self::Hevc].iter()
|
||||
[Self::H264, Self::H265].iter()
|
||||
}
|
||||
|
||||
pub fn as_vec() -> Vec<Self> {
|
||||
vec![Self::H264, Self::H265, Self::Avc, Self::Hevc]
|
||||
vec![Self::H264, Self::H265]
|
||||
}
|
||||
|
||||
pub fn as_number(&self) -> u32 {
|
||||
match self {
|
||||
Self::H264 => 0,
|
||||
Self::H265 => 1,
|
||||
Self::Avc => 2,
|
||||
Self::Hevc => 3,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue