Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions rs/moq-relay/src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions rs/moq-video/src/capture/pump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 5 additions & 1 deletion rs/moq-video/src/encode/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) -> Self {
Expand Down
7 changes: 3 additions & 4 deletions rs/moq-video/src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self, Error> {
use yuv::bgra_to_yuv420;

Expand Down
Loading