mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-09-02 23:55:44 +00:00
feat: Add AV1 to WiVRn encoder configuration (fixes #125)
This commit is contained in:
parent
c3eb514b73
commit
6b2818f266
1 changed files with 5 additions and 2 deletions
|
@ -53,6 +53,7 @@ impl From<&Encoder> for u32 {
|
||||||
pub enum Codec {
|
pub enum Codec {
|
||||||
H264,
|
H264,
|
||||||
H265,
|
H265,
|
||||||
|
AV1,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Display for Codec {
|
impl Display for Codec {
|
||||||
|
@ -60,17 +61,18 @@ impl Display for Codec {
|
||||||
f.write_str(match self {
|
f.write_str(match self {
|
||||||
Self::H264 => "h264",
|
Self::H264 => "h264",
|
||||||
Self::H265 => "h265",
|
Self::H265 => "h265",
|
||||||
|
Self::AV1 => "av1",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Codec {
|
impl Codec {
|
||||||
pub fn iter() -> Iter<'static, Self> {
|
pub fn iter() -> Iter<'static, Self> {
|
||||||
[Self::H264, Self::H265].iter()
|
[Self::H264, Self::H265, Self::AV1].iter()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn as_vec() -> Vec<Self> {
|
pub fn as_vec() -> Vec<Self> {
|
||||||
vec![Self::H264, Self::H265]
|
vec![Self::H264, Self::H265, Self::AV1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,6 +81,7 @@ impl From<&Codec> for u32 {
|
||||||
match value {
|
match value {
|
||||||
Codec::H264 => 0,
|
Codec::H264 => 0,
|
||||||
Codec::H265 => 1,
|
Codec::H265 => 1,
|
||||||
|
Codec::AV1 => 2,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue