mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-04-30 01:46:37 +08:00
feat(video): 事务化切换与前端统一编排,增强视频输入格式支持
- 后端:切换事务+transition_id,/stream/mode 返回 switching/transition_id 与实际 codec - 事件:新增 mode_switching/mode_ready,config/webrtc_ready/mode_changed 关联事务 - 编码/格式:扩展 NV21/NV16/NV24/RGB/BGR 输入与转换链路,RKMPP direct input 优化 - 前端:useVideoSession 统一切换,失败回退真实切回 MJPEG,菜单格式同步修复 - 清理:useVideoStream 降级为 MJPEG-only
This commit is contained in:
@@ -22,7 +22,11 @@ impl VentoyImage {
|
||||
let size = parse_size(size_str)?;
|
||||
let layout = PartitionLayout::calculate(size)?;
|
||||
|
||||
println!("[INFO] Creating {}MB image: {}", size / (1024 * 1024), path.display());
|
||||
println!(
|
||||
"[INFO] Creating {}MB image: {}",
|
||||
size / (1024 * 1024),
|
||||
path.display()
|
||||
);
|
||||
|
||||
// Create sparse file
|
||||
let mut file = File::create(path)?;
|
||||
@@ -247,7 +251,11 @@ impl VentoyImage {
|
||||
///
|
||||
/// This is the preferred method for large files as it doesn't load
|
||||
/// the entire file into memory.
|
||||
pub fn read_file_to_writer<W: std::io::Write>(&self, path: &str, writer: &mut W) -> Result<u64> {
|
||||
pub fn read_file_to_writer<W: std::io::Write>(
|
||||
&self,
|
||||
path: &str,
|
||||
writer: &mut W,
|
||||
) -> Result<u64> {
|
||||
let mut fs = ExfatFs::open(&self.path, &self.layout)?;
|
||||
fs.read_file_path_to_writer(path, writer)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user