Files
GVFG_Standalone/GVFG_Qt_Sample/DELIVERY_DIAGNOSTICS.md
T
Mark.lin 350e8e519c Streamline GigabyteLib capture control and diagnostics
Compared with d652f15:

- set the SDK release version to 1.0.0 for the new GigabyteLib backend and its required matching driver

- preserve GigabyteLib result codes and event names through the public SDK instead of translating vendor semantics

- expose cached Lib signal, SDI string fields, ErrorCount, and separate video/audio event counters for direct diagnostics

- serialize GigabyteLib capture calls and recover an active stream internally after a video input plugin event

- keep the SDK frame lifetime fence while following the current zero-copy contract without a vendor release call

- separate Sample logging and presentation counters from capture control, and report Lib-owned fields with explicit source names

- remove the manual Open Device control so Start lazily opens the selected device and revalidates VideoSignalLock once per request

- keep format selection side-effect free until Start opens the channel, then apply the selected output depth through GigabyteLib

- update the public API, diagnostics, architecture, error-handling, and build documentation for the simplified ownership model
2026-09-15 16:52:19 +08:00

24 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 關鍵交付 Log
畫面保留原本狀態,不顯示完整交付統計,也不增加設定控制。正常的預覽與音訊佇列取捨不輸出 Log。
- `[LIB]`:GigabyteLib 回傳的 signal 或 event 現象。
- `[SDK]`/`[SDK API]`:SDK read 邊界或 API 回傳的現象。
- `[APP]`:Preview、audio output 或 Sample 自身核對的現象。
- 累計數字最多每 5 秒彙整一次;Stop 會補記尚未輸出的變化。
- Stop 不列印正常統計摘要;只有實際 API、preview 或 audio output 錯誤才記錄。
## 拿到 Log 後怎麼處理
Log 只標示觀測層、現象與數值。Video/audio `frame_id` 是 SDK 每次 Start 從 1 開始的成功交付序號,不再使用 GigabyteLib `FrameCount`;`[APP] Preview ...` 是 Sample 顯示路徑問題。
預覽使用 Present(0, 0),讓 DXGI 等待呈現相依條件,不做外部重試。SyncInterval 仍為 0,並非每張都保證顯示。預覽改成 FIFO,最多保留 3 張待處理影像(包含正在上傳的容量保留),另有 1 個處理中槽位,共 4 個 GPU 槽。60 FPS 下 3 張約 50 ms;這不是刻意等滿 50 ms 才顯示。從上傳完成入列開始計時,等待超過 50 ms 的影像才丟棄(expired);容量滿時跳過新影像(busy),不替換仍在期限內的舊影像。50 ms 是開始處理前的等待期限,不含 GPU 執行/DXGI Present 等待,不保證端到端延遲或實體螢幕逐張呈現。Stop/關閉/鎖等待只處理 Windows 同步送達的視窗訊息,避免 DXGI 等待 UI 而 UI 又等待 worker;不處理一般排隊輸入或 Qt callbacks。
Audio 保留原本最多 10 個 PCM 區塊的播放佇列(`kMaxQueuedAudioFrames`);滿時丟掉最舊區塊,再加入新區塊。Sample 不統計輸出、丟棄或取消數量;audio frame 不保證與 video frame 等長。
播放 write 失敗,或持續回傳 0、兩秒沒有進展,會記錄原因並停止通道;檢查音效裝置後重新 Start。此檢查無法中斷本身永不返回的 write 呼叫。
統計從 APP 成功取得 SDK frame 開始。SDK ID 連續不能證明更上游沒有丟失;DXGI 接受 Present 不代表實體螢幕已顯示,QAudioSink 接受 PCM 也不代表已實際發聲。已丟掉的原始資料無法靠這些處理補回。
擷取 API/驅動不修改。新版 APP 需配套的新版 gvfg_preview.dll。後續 GPU 優化修改了共用的轉換原始碼;若要發佈包含該優化的 SDK GPU buffer converter,也需重建其 DLL。尚待 build、播放/預覽異常測試與硬體長測;靜態檢查不能證明零丟失。