mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-01 10:31:54 +08:00
feat: 支持 MJPEG 解码与 MSD 目录配置
- FFmpeg/hwcodec 增加 RKMPP MJPEG 解码与 RAM FFI,ARM 构建启用对应解码器 - 共享视频管线新增 MJPEG 解码路径(RKMPP/TurboJPEG),优化 WebRTC 发送与 MJPEG 去重 - MSD 配置改为 msd_dir 并自动创建子目录,接口与前端设置同步更新 - 更新包依赖与版本号
This commit is contained in:
@@ -202,25 +202,37 @@ impl Default for HidConfig {
|
||||
pub struct MsdConfig {
|
||||
/// Enable MSD functionality
|
||||
pub enabled: bool,
|
||||
/// Storage path for ISO/IMG images
|
||||
pub images_path: String,
|
||||
/// Path for Ventoy bootable drive file
|
||||
pub drive_path: String,
|
||||
/// Ventoy drive size in MB (minimum 1024 MB / 1 GB)
|
||||
pub virtual_drive_size_mb: u32,
|
||||
/// MSD base directory (absolute path)
|
||||
pub msd_dir: String,
|
||||
}
|
||||
|
||||
impl Default for MsdConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
enabled: true,
|
||||
images_path: "./data/msd/images".to_string(),
|
||||
drive_path: "./data/msd/ventoy.img".to_string(),
|
||||
virtual_drive_size_mb: 16 * 1024, // 16GB default
|
||||
msd_dir: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl MsdConfig {
|
||||
pub fn msd_dir_path(&self) -> std::path::PathBuf {
|
||||
std::path::PathBuf::from(&self.msd_dir)
|
||||
}
|
||||
|
||||
pub fn images_dir(&self) -> std::path::PathBuf {
|
||||
self.msd_dir_path().join("images")
|
||||
}
|
||||
|
||||
pub fn ventoy_dir(&self) -> std::path::PathBuf {
|
||||
self.msd_dir_path().join("ventoy")
|
||||
}
|
||||
|
||||
pub fn drive_path(&self) -> std::path::PathBuf {
|
||||
self.ventoy_dir().join("ventoy.img")
|
||||
}
|
||||
}
|
||||
|
||||
// Re-export ATX types from atx module for configuration
|
||||
pub use crate::atx::{ActiveLevel, AtxDriverType, AtxKeyConfig, AtxLedConfig};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user