use clap::Parser; #[derive(Parser, Debug, Clone)] #[command(name = "wl-webrtc", about = "Wayland screen capture and encoding tool")] pub struct Args { /// Output file path (e.g., output.mp4, output.mkv). Optional when using --port for WebRTC mode #[arg(short, long)] pub output: Option, /// Wayland output name to capture #[arg(long)] pub output_name: Option, /// Target frames per second #[arg(long, default_value_t = 30)] pub fps: u32, /// Video codec (h264 only for MVP) #[arg(long, default_value = "h264")] pub codec: String, /// Hardware acceleration method (vaapi only for MVP) #[arg(long, default_value = "vaapi")] pub hw_accel: String, /// DRM render device path (e.g., /dev/dri/renderD128) #[arg(long)] pub drm_device: Option, /// Target bitrate in bits per second #[arg(long)] pub bitrate: Option, /// Maximum bitrate in bps for WebRTC mode. Caps BWE-driven escalation to /// prevent large IDR bursts from swamping the network. Default 8 Mbps covers /// 1080p30/1440p30 H.264 acceptably. Does NOT affect MP4 (--output) mode. /// See issue #23. #[arg(long, default_value = "8000000")] pub max_bitrate: u64, /// Group of Pictures (GOP) size #[arg(long)] pub gop_size: Option, /// Enable verbose logging #[arg(short, long)] pub verbose: bool, /// Capture backend to use: 'screencopy' (wlroots) or 'portal' (KWin/KDE). Auto-detected if omitted #[arg(long)] pub backend: Option, /// Port for WebRTC HTTP signaling server; 0 keeps MP4 file output mode #[arg(long, default_value_t = 0)] pub port: u16, /// Force re-authorization dialog (ignore saved portal restore token) #[arg(long)] pub no_persist: bool, /// Enable per-second pipeline statistics output for stutter diagnosis #[arg(long)] pub stats: bool, }