Skip to content

Commit

Permalink
portal: ignore formats not supported by pipewire
Browse files Browse the repository at this point in the history
  • Loading branch information
mahkoh committed Apr 10, 2024
1 parent 2136f13 commit 6d46256
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 4 additions & 0 deletions deploy-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased

# 1.0.2

- Needs jay-compositor release.

# 1.0

- Needs jay-config release.
Expand Down
6 changes: 5 additions & 1 deletion release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased

# 1.0
# 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.
10 changes: 9 additions & 1 deletion src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6d46256

Please sign in to comment.