Feature: throughput criterion for adaptive quality, plus anti-oscillation
Adaptive quality only looked at RTT, so a short RTT over a narrow pipe read as "excellent": at 20-40ms it picks Ultra/High (DIFF/RGB565), both with bitRate == 0, and never steps down. One 1080p RGB565 frame is 4.15 MB -- 1.66s of transmission on 20 Mbps. Adds GetTargetQualityLevelByLoad(): congestion needs both fps < 60% of baseline and bytes/frame still near the nominal bitrate, because a static screen has a near-zero byte rate on any link. Merged with the RTT result as max() -- averaging lets a good RTT mask a narrow pipe. Step-down is 3 confirmations and jumps straight to the level the throughput can carry (capped at +2); step-up stays RTT-only, so the criterion is one-way and the worst case is one level too low instead of a 30s/15s oscillation. Anti-oscillation, all inside the switch: RTT hysteresis (85%/115% dead band against the target level's threshold), failed step-up pinned for 3 minutes, cooldowns 3s -> 10s down / 15s up, counters interrupt each other, and a hard limit of 6 changes per 5 minutes. Server-only, no client change. m_ulBytesThisSecond had to be fixed first: it is accumulated before the switch, so file transfer, audio and clipboard counted as screen traffic; added m_ulScreenBytesThisSecond for the four frame cases. Also gates a real bug in the 10s post-step-down probe that disabled the criterion permanently on a static screen. Default on (same migration caveat as the other four). Unticking takes the original path unchanged. Verified on Debug: 27 hysteresis cases and the load cases pass, menu defaults correct; not yet measured end to end.
This commit is contained in:
1 parent
ab83f5d685
commit
d6b04a98f0
12 files changed
+543
-23
No files matched your search
@@ -280,19 +280,28 @@ public:
|
||||
void ReloadKernelPayloads();
|
||||
// 高级→DLL内嵌TLS证书
|
||||
afx_msg void OnToolEmbedTlsAnchor();
|
||||
// 高级→远程桌面调优:三项默认全开,取消勾选即回到加开关前的行为。
|
||||
// 勾选后打开远程桌面时经 CMD_SCREEN_TUNING 下发,某项出问题可以只关那一项。
|
||||
// 高级→远程桌面调优:四项默认全开,取消勾选即回到加开关前的行为。
|
||||
// 前三项勾选后经 CMD_SCREEN_TUNING 下发客户端,某项出问题可以只关那一项。
|
||||
// 持久化在 [settings] Tuning*;注意默认值只对没写过该键的机器生效。
|
||||
bool m_bTuningX264Vbv = true; // 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; }
|
||||
MasterSettings m_settings;
|
||||
// 缓存上次检测到的上级 FRP 配置([settings] FrpConfig),由定时器检测外部模块写入的变更。
|
||||
// 检出变更后会热切换 FRPC(首次=启动 / 覆盖=重启 / 撤销=停止),并在主对话框信息列表中给出友好提示。
|
||||
|
||||
Reference in new issue
Block a user