Feat: Implement H264 for Linux client with dynamic libx264 loading

This commit is contained in:
yuanyuanxiang
2026-05-03 12:15:22 +02:00
parent 36423b1c7c
commit ca37fa419a
6 changed files with 646 additions and 38 deletions

View File

@@ -202,6 +202,8 @@ private:
// macOS locale settings
setenv("LANG", "en_US.UTF-8", 1);
setenv("LC_ALL", "en_US.UTF-8", 1);
// Disable zsh session save/restore (causes errors in PTY)
setenv("SHELL_SESSIONS_DISABLE", "1", 1);
// Try zsh first (macOS default), fallback to bash
if (access("/bin/zsh", X_OK) == 0) {

View File

@@ -1048,6 +1048,14 @@ enum QualityLevel {
QUALITY_COUNT = 6,
};
// 屏幕压缩算法常量 (所有平台共用)
#ifndef ALGORITHM_GRAY
#define ALGORITHM_GRAY 0 // 灰度压缩
#define ALGORITHM_DIFF 1 // 差分压缩 (BGRA)
#define ALGORITHM_H264 2 // H264 硬件编码
#define ALGORITHM_RGB565 3 // RGB565 压缩
#endif
/* 质量配置(与 QualityLevel 对应)
- strategy = 01080p 限制
- strategy = 1原始分辨率