From 3ad0546b0d4fb12334eac49631f682caf85ff83a Mon Sep 17 00:00:00 2001 From: Maksim Bondarenkov <119937608+ognevny@users.noreply.github.com> Date: Mon, 28 Jul 2025 12:02:48 +0000 Subject: [PATCH] Re-add `TestScreenCaptureStream` implementation for `mock_client` to fix FreeBSD and MinGW builds (#35191) The implementation was removed in #31506. re-added it to match the current implementation from `gpui::test` Closes #35189 Release Notes: - N/A --- .../src/mock_client/participant.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/crates/livekit_client/src/mock_client/participant.rs b/crates/livekit_client/src/mock_client/participant.rs index 991d10bd50..033808cbb5 100644 --- a/crates/livekit_client/src/mock_client/participant.rs +++ b/crates/livekit_client/src/mock_client/participant.rs @@ -5,7 +5,9 @@ use crate::{ }; use anyhow::Result; use collections::HashMap; -use gpui::{AsyncApp, ScreenCaptureSource, ScreenCaptureStream, TestScreenCaptureStream}; +use gpui::{ + AsyncApp, DevicePixels, ScreenCaptureSource, ScreenCaptureStream, SourceMetadata, size, +}; #[derive(Clone, Debug)] pub struct LocalParticipant { @@ -119,3 +121,16 @@ impl RemoteParticipant { self.identity.clone() } } + +struct TestScreenCaptureStream; + +impl ScreenCaptureStream for TestScreenCaptureStream { + fn metadata(&self) -> Result { + Ok(SourceMetadata { + id: 0, + is_main: None, + label: None, + resolution: size(DevicePixels(1), DevicePixels(1)), + }) + } +}