configurable capture fps
This commit is contained in:
@@ -17,7 +17,6 @@ use windows_capture::settings::{
|
||||
|
||||
use crate::CaptureRect;
|
||||
|
||||
const TARGET_FPS: u32 = 30;
|
||||
const MAX_ENCODE_WIDTH: u32 = 1920;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -149,6 +148,7 @@ pub fn start(
|
||||
capture_cursor: bool,
|
||||
_audio: bool,
|
||||
crop: Option<CaptureRect>,
|
||||
fps: u32,
|
||||
) -> Result<CaptureSession> {
|
||||
let monitor = Monitor::primary().map_err(|e| anyhow!("primary monitor: {e:?}"))?;
|
||||
let raw_width = monitor
|
||||
@@ -167,7 +167,7 @@ pub fn start(
|
||||
ffmpeg_path,
|
||||
width,
|
||||
height,
|
||||
fps: TARGET_FPS,
|
||||
fps,
|
||||
crop,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user