Skip to content

Commit

Permalink
Merge pull request #161 from mahkoh/jorth/pipewire-hotfix
Browse files Browse the repository at this point in the history
portal: ignore formats not supported by pipewire
  • Loading branch information
mahkoh authored Apr 10, 2024
2 parents e9ba778 + 3f39fa1 commit f35a7f6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 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
4 changes: 4 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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 f35a7f6

Please sign in to comment.