diff --git a/AGENTS.md b/AGENTS.md index 58024d2..01a077f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -144,7 +144,7 @@ every 60 s. | `src/assist.rs`, `c_engine/assist_window.c` | remote assistance (guest + account) and the unified GTK main window (assist + account/QR card) | Diagnostic subcommands: `login [--no-gui]`, `unlock-check` (password on stdin, prints only accepted/rejected), -`desktop-probe [new.png]`, `desktop-video-probe`, `wayland-input-probe`, `clipboard-acceptance`, +`desktop-probe [new.png]`, `desktop-video-probe` (`UU_PROBE_FPS`, `UU_PROBE_FRAMES`, `UU_PROBE_QUALITY` 1-5 = viewer bitrate preset, 5 auto), `wayland-input-probe`, `clipboard-acceptance`, `portal-acceptance`, `help`. Unknown arguments exit with code 2. Builds up to v0.1.0 did **not** reject them and started a second full host server instead, so check that a subcommand exists in the binary you run. diff --git a/src/video.rs b/src/video.rs index e103be2..f959542 100644 --- a/src/video.rs +++ b/src/video.rs @@ -523,7 +523,13 @@ pub async fn probe(size:(u32,u32),display:String,portal:Optioncrate::capture_setting::QUALITY_AUTO, + Some(v)=>v.parse::().ok().filter(|q|(1..=5).contains(q)).ok_or("UU_PROBE_QUALITY must be 1-5")?, + }; + let settings=VideoSettings {fps,quality,..VideoSettings::default()}; let _reader=EncoderTask(tokio::spawn(read_encoder(size,display,portal,tx,settings,sequence,Arc::new(AtomicBool::new(false)),Arc::new(Semaphore::new(4))))); let mut count=0; let mut bytes=0;