From df45c0bfebb4fc1430adb082986c53860d417aed Mon Sep 17 00:00:00 2001 From: Mollusk Date: Mon, 6 Jul 2026 16:47:06 -0400 Subject: [PATCH] screenshare: log the pixelpass-host and player argv on spawn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The screen-share code only logged pixelpass's high-level JSON events, never the argv it spawned children with, so a field log couldn't confirm which encode/viewer settings actually reached the helpers — e.g. the per-call quality's --bitrate (host) or the hardware-decode --avcodec-hw/--hwdec flag (player). Log both verbatim at spawn: host args carry no secret, and the player line omits the local stream URL. Logged per attempt so a player fallback is visible too. Co-Authored-By: Claude Opus 4.8 --- src/screenshare/mod.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/screenshare/mod.rs b/src/screenshare/mod.rs index 79da653..76dbf17 100644 --- a/src/screenshare/mod.rs +++ b/src/screenshare/mod.rs @@ -370,8 +370,13 @@ pub async fn spawn_host( quality: ShareQuality, notices: Option>, ) -> std::io::Result<(Child, String)> { + let args = host_args(audio_app, settings, quality); + // Log the exact argv we hand pixelpass so a field log can confirm which + // encode/quality flags (e.g. --bitrate) actually reached the host — these + // are local flags with no ticket/secret, so logging them verbatim is safe. + crate::log_msg(&format!("pixelpass host spawn: {} {}", bin.display(), args.join(" "))); let mut child = Command::new(bin) - .args(host_args(audio_app, settings, quality)) + .args(&args) .stdin(Stdio::null()) .stdout(Stdio::piped()) // Capture stderr (not null): pixelpass prints its startup precondition @@ -686,6 +691,12 @@ fn vlc_args(settings: &ScreenShareSettings) -> Vec { } fn spawn_player(bin: &str, args: &[String], url: &str) -> std::io::Result { + // Log the player + its flags (mpv/vlc, incl. hardware-decode: --hwdec / + // --avcodec-hw) so a field log can confirm the viewer settings reached the + // player. The `url` is omitted deliberately — it is the local stream address + // and is not needed to verify the flags. Logged on each attempt, so a + // fallback from the preferred player to the other one is visible too. + crate::log_msg(&format!("player spawn: {bin} {}", args.join(" "))); Command::new(bin) .args(args) .arg(url)