Feature: make remote desktop tuning per client
The tuning switches lived in the master's Advanced menu and were saved globally, so two hosts could not use different settings. The client already sends ScreenSettings when a remote desktop starts, so the state belongs there: the four items now sit in the remote desktop window's system menu, directly below Screen quality, and are saved per client. ScreenSettings had a 40-byte Reserved area at offset 56; four bytes became TuningFlags, keeping the struct at 100 bytes with Capabilities at 96. A new Capabilities bit marks a value written by a versioned master; old clients, and new clients never configured, report 0 and are not trusted. CMD_SCREEN_TUNING now ends with a version byte. A five-byte command comes from an older master that does not know the server-only adaptive bit: the client applies those three bits to the session but does not save them. A fresh client starts at 0, so an old master still gets pre-feature behaviour; the new master's 0xE default is persisted on its first session. The per-client master copy stays as the old-client fallback, and the old global [settings] Tuning* keys are honoured when neither exists, so an explicit opt-out survives the migration. Verified on the Debug server with the in-process test client: a fresh client stored 0xE on first use; toggling VBV wrote 0xF to both sides; after deleting the master copy and reopening, the menu restored VBV from the client report. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
f96e4a7320
commit
a190c21217
12 files changed
+216
-156
No files matched your search
@@ -280,28 +280,6 @@ public:
|
||||
void ReloadKernelPayloads();
|
||||
// 高级→DLL内嵌TLS证书
|
||||
afx_msg void OnToolEmbedTlsAnchor();
|
||||
// 高级→远程桌面调优:四项默认全开,取消勾选即回到加开关前的行为。
|
||||
// 前三项勾选后经 CMD_SCREEN_TUNING 下发客户端,某项出问题可以只关那一项。
|
||||
// 持久化在 [settings] Tuning*;注意默认值只对没写过该键的机器生效。
|
||||
bool m_bTuningX264Vbv = false; // TUNING_X264_VBV x264 软编加 VBV 码率封顶(默认关,仅限洲际弱网)
|
||||
bool m_bTuningGdiNoSleep = true; // TUNING_GDI_NO_SLEEP GDI 抓屏去分段延时
|
||||
bool m_bTuningPaceFpsFloor = true; // TUNING_PACE_FPS_FLOOR 发送节流帧率下限
|
||||
// 高级→远程桌面调优→自适应加吞吐判据:这一项是纯服务端的,不下发客户端。
|
||||
// 自适应原本只看 RTT,"短 RTT + 窄链路"会被判成网络很好(RTT 20~40ms 时甚至会选到
|
||||
// DIFF/RGB565 那两个零码率控制的档位);勾选后增加"链路是否已饱和"作为第二判据,
|
||||
// 与 RTT 判据取更保守者。持久化在 [settings] AdaptiveDualCriteria,默认开。
|
||||
// 防振荡(RTT 迟滞 / 升档失败封顶 / 探测样本门槛)都门控在开关内,见 EvaluateQuality。
|
||||
bool m_bAdaptiveDualCriteria = true;
|
||||
afx_msg void OnToolTuningX264Vbv();
|
||||
afx_msg void OnToolTuningGdiSleep();
|
||||
afx_msg void OnToolTuningPaceFpsFloor();
|
||||
afx_msg void OnToolTuningAdaptiveLoad();
|
||||
// 把上述各项的勾选状态同步到「远程桌面调优」子菜单
|
||||
void SyncTuningMenuChecks();
|
||||
// 当前调优开关位,供 CScreenSpyDlg 下发 CMD_SCREEN_TUNING 用
|
||||
int GetScreenTuningFlags() const;
|
||||
// 自适应质量是否启用吞吐判据(双判据),供 CScreenSpyDlg::EvaluateQuality 查询
|
||||
bool IsAdaptiveDualCriteria() const { return m_bAdaptiveDualCriteria; }
|
||||
// 高级→运行测试程序:把 m_ServerDLL 里的 DLL 在**本进程**内存加载,本机即上线一台
|
||||
// 测试主机。同一时间只跑一份,跑完后工作线程释放模块并重新启用菜单项。
|
||||
afx_msg void OnToolRunTest();
|
||||
|
||||
Reference in new issue
Block a user