feat: v4l2 buffer 由2改为4

This commit is contained in:
mofeng-git
2026-07-05 21:15:44 +08:00
parent bb2691fe8f
commit 16a65289f2
4 changed files with 11 additions and 24 deletions

View File

@@ -27,7 +27,9 @@ use crate::video::capture::status::{
capture_error_log_key, classify_capture_io_error, signal_status_from_capture_kind,
CaptureIoErrorKind,
};
use crate::video::capture::{is_source_changed_error, BridgeContext, CaptureStream};
use crate::video::capture::{
is_source_changed_error, BridgeContext, CaptureStream, DEFAULT_CAPTURE_BUFFER_COUNT,
};
const MIN_CAPTURE_FRAME_SIZE: usize = 128;
@@ -769,7 +771,7 @@ impl Streamer {
const MAX_RETRIES: u32 = 5;
const RETRY_DELAY_MS: u64 = 200;
const IDLE_STOP_DELAY_SECS: u64 = 5;
const BUFFER_COUNT: u32 = 2;
const BUFFER_COUNT: u32 = DEFAULT_CAPTURE_BUFFER_COUNT;
/// Initial back-off after signal loss before the first soft restart.
///
/// PiKVM/ustreamer drops to sub-second recovery because it subscribes to