diff --git a/rs/moq-relay/src/relay.rs b/rs/moq-relay/src/relay.rs index 6979b978f61..08e5b3a1b43 100644 --- a/rs/moq-relay/src/relay.rs +++ b/rs/moq-relay/src/relay.rs @@ -868,10 +868,10 @@ async fn serve_listening( } #[cfg(test)] -#[expect(clippy::disallowed_methods, reason = "tests read the host clock directly")] mod tests { #[cfg(feature = "stun")] #[tokio::test] + #[expect(clippy::disallowed_methods, reason = "tests read the host clock directly")] async fn stun_listener_runs_with_the_relay_and_stops_with_it() { use stun_types::message::{BINDING, Message, MessageWriteVec}; use stun_types::prelude::*; @@ -920,7 +920,11 @@ mod tests { /// exits at once rather than starting the drain again. #[cfg(unix)] #[tokio::test(start_paused = true)] - #[expect(clippy::disallowed_types, reason = "tests read the host clock directly")] + #[expect( + clippy::disallowed_methods, + clippy::disallowed_types, + reason = "tests read the host clock directly" + )] async fn a_signal_after_an_early_trigger_exits_at_once() { let _signals = crate::shutdown::SIGNALS.lock().await; // Either arm is ready, so an unbiased wait would pass some runs. diff --git a/rs/moq-video/src/capture/pump.rs b/rs/moq-video/src/capture/pump.rs index fb7c5baae94..7a30767062a 100644 --- a/rs/moq-video/src/capture/pump.rs +++ b/rs/moq-video/src/capture/pump.rs @@ -31,7 +31,8 @@ pub(super) enum Read { FrameAt(Surface, moq_net::Timestamp), /// No frame this turn, but the source is still live: the pump re-checks its /// stop flag and calls again. A backend uses this to hold a capture (a - /// minimized or mid-resize window) without ending the stream. + /// minimized or mid-resize window) without ending the stream. Only X11 holds one. + #[cfg(target_os = "linux")] Idle, /// The source stopped producing; the stream ends and the caller reopens. Done, @@ -98,7 +99,8 @@ where match read(&mut source) { Ok(Read::Frame(frame)) => chan.push(frame), Ok(Read::FrameAt(frame, timestamp)) => chan.push_native(frame, timestamp), - Ok(Read::Idle) => {} // held: re-check the stop flag, then read again + #[cfg(target_os = "linux")] + Ok(Read::Idle) => {} // held: re-check the stop flag, then read again Ok(Read::Done) => break, // device stopped producing frames Err(err) => { chan.fail(err); diff --git a/rs/moq-video/src/encode/encoder.rs b/rs/moq-video/src/encode/encoder.rs index ab16582db9b..d035ee8a8ac 100644 --- a/rs/moq-video/src/encode/encoder.rs +++ b/rs/moq-video/src/encode/encoder.rs @@ -146,7 +146,11 @@ impl Applied { /// A report that `preset` took effect through `controls`. #[cfg_attr( - not(any(feature = "openh264", feature = "nvidia", feature = "vaapi", target_os = "macos")), + not(any( + feature = "openh264", + apple, + all(target_os = "linux", any(feature = "nvidia", feature = "vaapi")) + )), allow(dead_code, reason = "only the encoder backends report a preset") )] pub(crate) fn new(preset: Preset, controls: impl Into) -> Self { diff --git a/rs/moq-video/src/frame.rs b/rs/moq-video/src/frame.rs index f8a05b3384f..da14325e7bc 100644 --- a/rs/moq-video/src/frame.rs +++ b/rs/moq-video/src/frame.rs @@ -884,10 +884,9 @@ impl I420 { /// Convert BGRA to I420 in [`Color::infer`]'s color space for this size. /// `stride` is the source row pitch in bytes (>= `width * 4`), so a padded - /// surface maps directly. Used by the screen-capture paths: Windows Desktop - /// Duplication (BGRA staging texture) and Linux PipeWire (BGRx/BGRA - /// shared-memory buffers). - #[cfg(any(target_os = "windows", all(target_os = "linux", feature = "pipewire")))] + /// surface maps directly. Used by PipeWire capture's BGRx/BGRA shared-memory + /// buffers. + #[cfg(all(target_os = "linux", feature = "pipewire"))] pub(crate) fn from_bgra(bgra: &[u8], stride: u32, size: Size) -> Result { use yuv::bgra_to_yuv420;