feat: 支持在线升级功能

This commit is contained in:
mofeng-git
2026-02-11 19:41:19 +08:00
parent 60b294e0ab
commit 934dc48208
36 changed files with 945 additions and 100 deletions

View File

@@ -32,8 +32,7 @@ fn init_hwcodec_logging() {
}
/// H.264 encoder type (detected from hwcodec)
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Default)]
#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub enum H264EncoderType {
/// NVIDIA NVENC
Nvenc,
@@ -69,7 +68,6 @@ impl std::fmt::Display for H264EncoderType {
}
}
/// Map codec name to encoder type
fn codec_name_to_type(name: &str) -> H264EncoderType {
if name.contains("nvenc") {
@@ -90,8 +88,7 @@ fn codec_name_to_type(name: &str) -> H264EncoderType {
}
/// Input pixel format for H264 encoder
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Default)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum H264InputFormat {
/// YUV420P (I420) - planar Y, U, V
Yuv420p,
@@ -112,7 +109,6 @@ pub enum H264InputFormat {
Bgr24,
}
/// H.264 encoder configuration
#[derive(Debug, Clone)]
pub struct H264Config {