mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
refactor: 清理死代码和优化日志级别
- 删除未使用的函数和常量 - create_public_key_message (rustdesk/connection) - decode_audio_packet, AudioPacketHeader (web/audio_ws) - io_error_to_hid_error, close_device, close_all_devices (hid) - shutdown_rx (rustdesk/mod) - CONNECT_TIMEOUT_MS, RESP_ERR_SEND_FAILED - 调整日志级别 - Session lagged: warn -> debug - 移除 H264 NAL trace 日志 - 移除 Frame distribution lagged trace 日志 - 移除 absolute mouse report trace 日志 - 优化 broadcast channel 缓冲区大小 8 -> 16 - 修复条件编译 - static_files.rs: 添加 debug_assertions 条件
This commit is contained in:
@@ -383,7 +383,7 @@ pub struct PeerConnectionManager {
|
||||
impl PeerConnectionManager {
|
||||
/// Create a new peer connection manager
|
||||
pub fn new(config: WebRtcConfig) -> Self {
|
||||
let (frame_tx, _) = broadcast::channel(16);
|
||||
let (frame_tx, _) = broadcast::channel(16); // Buffer size 16 for low latency
|
||||
|
||||
Self {
|
||||
config,
|
||||
@@ -395,7 +395,7 @@ impl PeerConnectionManager {
|
||||
|
||||
/// Create a new peer connection manager with HID controller
|
||||
pub fn with_hid(config: WebRtcConfig, hid: Arc<HidController>) -> Self {
|
||||
let (frame_tx, _) = broadcast::channel(16);
|
||||
let (frame_tx, _) = broadcast::channel(16); // Buffer size 16 for low latency
|
||||
|
||||
Self {
|
||||
config,
|
||||
|
||||
@@ -339,7 +339,6 @@ impl UnifiedVideoTrack {
|
||||
_ => {}
|
||||
}
|
||||
|
||||
trace!("H264 NAL: type={} size={}", nal_type, nal.data.len());
|
||||
nals.push(nal.data.freeze());
|
||||
}
|
||||
|
||||
|
||||
@@ -573,7 +573,7 @@ impl UniversalSession {
|
||||
}
|
||||
}
|
||||
Err(broadcast::error::RecvError::Lagged(n)) => {
|
||||
warn!("Session {} lagged by {} frames", session_id, n);
|
||||
debug!("Session {} lagged by {} frames", session_id, n);
|
||||
}
|
||||
Err(broadcast::error::RecvError::Closed) => {
|
||||
info!("Video frame channel closed for session {}", session_id);
|
||||
|
||||
@@ -376,7 +376,6 @@ impl UniversalVideoTrack {
|
||||
_ => {}
|
||||
}
|
||||
|
||||
trace!("H264 NAL: type={} size={}", nal_type, nal.data.len());
|
||||
nals.push(nal.data.freeze());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user