From 703f1bf500cc8029400bb8e4709b140e471c64d7 Mon Sep 17 00:00:00 2001 From: Aspect Date: Fri, 6 Jun 2025 13:48:28 -0400 Subject: [PATCH] Implement Windows monitor index --- src/main.rs | 3 +++ src/rtc/pipeline.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 798257b..897379f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -388,6 +388,7 @@ pub struct AppState { config: Config, } +#[allow(unused)] #[derive(Deserialize, Clone, Debug)] struct Config { target_bitrate: u32, @@ -396,6 +397,8 @@ struct Config { starty: u32, endx: Option, endy: Option, + // Windows-only + windows_monitor_index: Option, port: u16, password: String, sound_forwarding: bool, diff --git a/src/rtc/pipeline.rs b/src/rtc/pipeline.rs index ddd6875..9589a43 100644 --- a/src/rtc/pipeline.rs +++ b/src/rtc/pipeline.rs @@ -652,6 +652,7 @@ impl ScreenRecordingPipeline { .property("crop-y", config.starty) .property_if_some("crop-width", config.endx.map(|endx| endx - config.startx)) .property_if_some("crop-height", config.endy.map(|endy| endy - config.starty)) + .property_if_some("monitor-index", config.windows_monitor_index) .property("show-cursor", show_mouse) //.property_from_str("capture-api", "wgc") .build()?;