Merge pull request #161 from mahkoh/jorth/pipewire-hotfix
portal: ignore formats not supported by pipewire
This commit is contained in:
commit
f35a7f691a
5 changed files with 19 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -521,7 +521,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "jay-compositor"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"anyhow",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "jay-compositor"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
edition = "2021"
|
||||
build = "build/build.rs"
|
||||
license = "GPL-3.0-only"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
# Unreleased
|
||||
|
||||
# 1.0.2
|
||||
|
||||
- Needs jay-compositor release.
|
||||
|
||||
# 1.0
|
||||
|
||||
- Needs jay-config release.
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
- Add support for wp-alpha-modifier.
|
||||
|
||||
# 1.0.2 (2024-04-10)
|
||||
|
||||
- Fixed a bug that caused the portal to fail.
|
||||
|
||||
# 1.0 (2024-04-07)
|
||||
|
||||
This is the first stable release of Jay.
|
||||
|
|
|
|||
|
|
@ -71,11 +71,19 @@ static FORMATS_MAP: Lazy<AHashMap<u32, &'static Format>> = Lazy::new(|| {
|
|||
static PW_FORMATS_MAP: Lazy<AHashMap<SpaVideoFormat, &'static Format>> = Lazy::new(|| {
|
||||
let mut map = AHashMap::new();
|
||||
for format in FORMATS {
|
||||
assert!(map.insert(format.pipewire, format).is_none());
|
||||
if format.pipewire != SPA_VIDEO_FORMAT_UNKNOWN {
|
||||
assert!(map.insert(format.pipewire, format).is_none());
|
||||
}
|
||||
}
|
||||
map
|
||||
});
|
||||
|
||||
#[test]
|
||||
fn formats_dont_panic() {
|
||||
formats();
|
||||
pw_formats();
|
||||
}
|
||||
|
||||
pub fn formats() -> &'static AHashMap<u32, &'static Format> {
|
||||
&FORMATS_MAP
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue