Add dual-slot font-selectable OSD and privatize playback diagnostics for SDK 3.0.0

- replace the single-overlay API with two independently configured OSD slots per channel, simplify NUL-terminated text/font settings, and add explicit visibility controls that preserve cached glyphs separately from Clear

- enumerate installed Windows font families as an SDK-owned UTF-8 list without callbacks or caller-side free, refresh installed fonts on demand, and use the selected family consistently for measurement and rendering with invalid/missing-font rejection

- retain per-slot YUV and A8 mask caches, blend slot 1 over slot 0 in one GPU dispatch/readback, preserve hidden surfaces, and skip oversized slots independently while capture and the other slot continue

- move detailed playback core statistics to a private Debug-only header/export, remove the public legacy statistics query and compatibility layouts, and retain public preview/delivery statistics

- bump the SDK major version to 3.0.0 for the breaking OSD and playback API changes and document matching header, import-library and runtime deployment requirements

- refresh the capture/playback guides, internal build notes and API reference, document all 51 public Capture/Playback functions, add checked OSD usage examples, and regenerate the branded 23-page PDF

Validation: git diff --cached --check and public API documentation coverage checks passed. The regenerated PDF passed text/content checks and visual review of its rendered pages, including the OSD types, API contracts and examples. Earlier session SDK Release compilation and synthetic YUY2/Y210 blending checks passed; no new build, hardware capture, FPGA upload or long-duration runtime validation was performed during this commit pass.
This commit is contained in:
Mark.lin
2026-10-29 09:02:54 +08:00
parent bfa9397f6b
commit c8b2d0608a
24 changed files with 796 additions and 482 deletions
+8 -6
View File
@@ -1,6 +1,6 @@
# Playback 維護與同步實作
SDK 2.1.1;客戶整合從 [公開播放手冊](../../../docs/GVFG_PLAYBACK_API.md) 開始,
SDK 3.0.0;客戶整合從 [公開播放手冊](../../../docs/GVFG_PLAYBACK_API.md) 開始,
逐參數契約見 [API Reference](../../../docs/GVFG_Customer_doc/GVFG_CUSTOMER_API_REFERENCE.md)。
本文件供 SDK 維護者,說明目前實作,不作為 Customer Demo 的除錯畫面需求。
@@ -146,9 +146,11 @@ core 非同步失敗保存在 last_error,worker 暫停,後續 submit 回報
stop/reset 取消 queue,不是無損 drain。reset 沿用舊 config,音訊格式改變應明確 stop/start 新設定。
呼叫端先停止/join read producers、release token,再停止 Playback 與 Capture。
2.0.2 stats 尾端新增 video_dropped;2.0.4 追加 sync_degraded、sync_fallbacks、audio_dropped_frames。
getter 明確接受目前大小、2.0.2/2.0.3 大小及 2.0.0/2.0.1 原始大小,
只回填 caller 提供的範圍;不是對任意 struct_size 都相容。config 仍要求目前完整大小。
詳細統計位於私有 `src/playback_debug.h`,不安裝到客戶套件。核心保留診斷計數與同步狀態。
僅 Debug DLL 匯出 `gvfg_playback_debug_get_stats()`;內部工具須定義
`GVFG_INTERNAL_DIAGNOSTICS=1` 並使用同一版私有標頭與 MSVC Debug 匯入庫。
診斷結構不提供穩定 ABI 或舊大小相容;Release DLL 不匯出診斷查詢。
config 仍要求目前完整的 struct_size。
公開 API/資料變更需同步標頭、匯入庫、DLL、Reference 與 Demo,避免混版。
## 10. 既有驗證範圍
@@ -157,7 +159,7 @@ getter 明確接受目前大小、2.0.2/2.0.3 大小及 2.0.0/2.0.1 原始
既有實際 Qt Sample 測試為 CH0 1080p YUY2、48 kHz stereo PCM16、External master、120 秒,
含視窗/全螢幕切換:約 60 fps,queue 未持續增長;7166 張輸入,processed 7160、presented 7158、dropped 2。
其餘待播 frame 在 stop 時取消。
慢速輸出模擬為 60 fps 輸入、30 ms/張輸出與 busy:300 張輸入,略過 159、呈現 134、最大 queue 8、無拒收;舊 stats guard 通過。
慢速輸出模擬為 60 fps 輸入、30 ms/張輸出與 busy:300 張輸入,略過 159、呈現 134、最大 queue 8、無拒收。
2.0.3 的決定性模擬使用實際 Playback core,僅替換時鐘/worker 步進與輸出後端:
舊版在 audio source 慢 500 ppm 時,910.084 秒出現 buffering、video queue 32、EQUEUE_FULL。
@@ -172,7 +174,7 @@ Audio master 遇到來源較慢時仍會耗盡既有緩衝並重新緩衝,未
2.0.4 決定性 core 模擬通過:完全無音訊、延後出現、五秒斷音、五秒停影、
來源半速/兩倍速及恢復、各 master、video-only/audio-only、GPU worker 暫停且 video queue 只有兩張。
檢查無拒收、容量不超限、影像持續消化、來源恢復後退出降級,以及兩種既有 stats 大小的尾端 guard。
檢查無拒收、容量不超限、影像持續消化、來源恢復後退出降級。
後端模擬 reset 延遲五毫秒,驗證 reset 完成前不會餵入新 mapping。
正常 ±500 ppm 各模擬兩小時,沒有降級,video queue 最大 6~7。