降低CPU使用率,处置好因降低CPU使用率带来的颜色偏差

This commit is contained in:
2026-01-31 10:43:41 +08:00
parent 6661edfc44
commit 4afbf06439
17 changed files with 360 additions and 64 deletions

View File

@@ -341,11 +341,18 @@ public static class HikPlayMethods
[DllImport(DllName)]
public static extern bool PlayM4_ResetSourceBuffer(int nPort);
// =========================================================================
// 🚀 [修正] 适配 V6.1.9+ 新版 SDK 的硬解码 API
// =========================================================================
/// <summary>
/// [新增] 开启硬件解码
/// 设置解码引擎 (扩展版)
/// 对应 C++: BOOL PlayM4_SetDecodeEngineEx(LONG nPort, DWORD dwEngine);
/// </summary>
[DllImport(DllName)]
public static extern bool PlayM4_SetHardWareDecode(int nPort, int nMode);
/// <param name="nPort">通道号</param>
/// <param name="dwEngine">0:软解, 1:显卡硬解(D3D9), 2:显卡硬解(D3D11), 3:Intel核显</param>
/// <returns></returns>
[DllImport("PlayCtrl.dll")]
public static extern bool PlayM4_SetDecodeEngineEx(int nPort, uint dwEngine);
#endregion
}