style(fmt): rustfmt the GNOME 50 HDR files under the pinned toolchain
ci / web (push) Successful in 48s
ci / docs-site (push) Successful in 1m2s
apple / swift (push) Successful in 1m15s
decky / build-publish (push) Successful in 34s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 12s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 40s
windows-host / package (push) Failing after 5m25s
ci / bench (push) Successful in 6m55s
docker / build-push (ci, ci/rust-ci-noble.Dockerfile, punktfunk-rust-ci-noble) (push) Successful in 10s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 11s
apple / screenshots (push) Successful in 6m11s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 11s
deb / build-publish-host (push) Failing after 7m52s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 6m42s
ci / rust (push) Failing after 9m20s
docker / deploy-docs (push) Successful in 23s
deb / build-publish (push) Successful in 10m3s
arch / build-publish (push) Successful in 12m4s
android / android (push) Successful in 17m22s
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Failing after 10m5s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Successful in 18m38s

`feat(hdr): GNOME 50 HDR screencast capture` (0e977817) landed with rustfmt
drift — six files were not clean under the pinned 1.96.0 toolchain, so
`cargo fmt --all --check` (ci.yml "Format") is red on main. Pure whitespace/
wrapping from `cargo fmt --all`; no semantic change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-19 10:09:34 +02:00
parent 3ae5f222d3
commit a83acf3ee1
6 changed files with 22 additions and 11 deletions
+2 -1
View File
@@ -286,7 +286,8 @@ pub fn capturer_supports_hdr() -> bool {
/// 10-second negotiation timeout on every reconnect. Sticky until host restart (matching the
/// zero-copy downgrade latches); the log line at latch time says so.
#[cfg(target_os = "linux")]
static HDR_CAPTURE_FAILED: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false);
static HDR_CAPTURE_FAILED: std::sync::atomic::AtomicBool =
std::sync::atomic::AtomicBool::new(false);
#[cfg(target_os = "linux")]
pub fn hdr_capture_failed() -> bool {
+5 -3
View File
@@ -405,7 +405,7 @@ impl Capturer for PortalCapturer {
Some(punktfunk_core::quic::HdrMeta {
// ST.2086 order G, B, R; (x, y) chromaticity in 1/50000 units.
display_primaries: [[8500, 39850], [6550, 2300], [35400, 14600]],
white_point: [15635, 16450], // D65
white_point: [15635, 16450], // D65
max_display_mastering_luminance: 10_000_000, // 1000 cd/m² (0.0001 units)
min_display_mastering_luminance: 50, // 0.005 cd/m²
max_cll: 0,
@@ -548,8 +548,10 @@ pub fn gnome_hdr_monitor_active() -> bool {
)
.await
.context("DisplayConfig.GetCurrentState")?;
let (_serial, monitors, _logical, _props): State =
reply.body().deserialize().context("parse GetCurrentState")?;
let (_serial, monitors, _logical, _props): State = reply
.body()
.deserialize()
.context("parse GetCurrentState")?;
Ok(monitors.iter().any(|(_spec, _modes, props)| {
props
.get("color-mode")
+4 -1
View File
@@ -479,7 +479,10 @@ impl CpuInner {
)
};
if sws.is_null() {
bail!("sws_getContext(RGB→{})", if ten_bit { "P010" } else { "NV12" });
bail!(
"sws_getContext(RGB→{})",
if ten_bit { "P010" } else { "NV12" }
);
}
// SAFETY: `sws` is the non-null `SwsContext` from `sws_getContext` above (the `is_null()`
// check immediately preceding returned false). The coefficient table from
+4 -1
View File
@@ -184,7 +184,10 @@ impl Encoder for OpenH264Encoder {
// 10-bit HDR comes only from the GPU paths; the software 8-bit H.264 encoder can't
// represent it (and never receives it — HDR is never negotiated on a software host).
PixelFormat::Rgb10a2 | PixelFormat::X2Rgb10 | PixelFormat::X2Bgr10 => {
anyhow::bail!("software H.264 encoder cannot encode 10-bit HDR ({:?})", self.src_format)
anyhow::bail!(
"software H.264 encoder cannot encode 10-bit HDR ({:?})",
self.src_format
)
}
// NV12/P010 are GPU-resident video-processor outputs for the NVENC path; the software
// encoder never receives them (it only gets CPU RGB frames).
@@ -419,10 +419,9 @@ fn gs_bit_depth(format: crate::capture::PixelFormat) -> u8 {
use crate::capture::PixelFormat;
match format {
// Windows IDD-push HDR formats, and the Linux GNOME 50+ portal HDR formats.
PixelFormat::P010
| PixelFormat::Rgb10a2
| PixelFormat::X2Rgb10
| PixelFormat::X2Bgr10 => 10,
PixelFormat::P010 | PixelFormat::Rgb10a2 | PixelFormat::X2Rgb10 | PixelFormat::X2Bgr10 => {
10
}
_ => 8,
}
}
+4 -1
View File
@@ -90,7 +90,10 @@ pub fn run(opts: Options) -> Result<()> {
// PUNKTFUNK_SPIKE_HDR=1: run the GNOME 50+ HDR offer (10-bit PQ dmabufs) — the dev
// validation lever for the Linux HDR capture path without a full GameStream client.
let want_hdr = std::env::var("PUNKTFUNK_SPIKE_HDR").as_deref() == Ok("1");
tracing::info!(want_hdr, "spike source: xdg ScreenCast portal (live monitor)");
tracing::info!(
want_hdr,
"spike source: xdg ScreenCast portal (live monitor)"
);
capture::open_portal_monitor(want_hdr).context("open portal capturer")?
}
Source::KwinVirtual => {