Update SDK 3.2 documentation and add English and Traditional Chinese versions
- Check the README, customer guides, API reference, and internal notes against the SDK 3.2.0 headers, export lists, and CMake rules. Fix stale versions, the OSD move to gvfg_osd.dll, the OSD example header, and missing APIs (HDMI audio info, the HDMI and chip structs, gvfg_render_osd_frame_bgra, gvfg_playback_enable_audio_reconnect). - Document present_image returning EOUTPUT when nothing was presented, opt-in audio reconnect for EAUDIO, and whole-macropixel YUY2 row sizes. - Make English the primary *.md for the README and customer documents, keep Traditional Chinese as *.zh-TW.md, and install both language versions. - Update the GigabyteLib README version and checksum to 1.0.5 and redraw the architecture diagram for the Capture, OSD, and Playback DLLs. Validation: git diff --cached --check passed. All relative links and anchors in the changed Markdown files resolve, and the drawio XML parses with valid edges and non-overlapping boxes. No build, cmake --install, or PDF regeneration was run, and the diagram was not opened in draw.io. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
# GVFG OSD core
|
||||
# GVFG OSD
|
||||
|
||||
`gvfg_osd_core` is an internal static library that generates a full-frame
|
||||
YUV422 OSD surface when text settings change. It does not capture, process
|
||||
live video frames, communicate with the driver, or present a preview. The
|
||||
library is linked into `gvfg.dll`; it is not installed or shipped as a
|
||||
separate customer DLL.
|
||||
Since SDK 3.2.0, OSD is built as the `gvfg_osd` SHARED target and shipped as the
|
||||
optional customer DLL `gvfg_osd.dll`, with the public header `gvfg_osd.h` and the
|
||||
import library `gvfg_osd.lib` (`libgvfg_osd.dll.a` for MinGW). It exports
|
||||
`gvfg_get_osd_fonts`, `gvfg_measure_osd_text`, `gvfg_render_osd_frame_bgra`,
|
||||
`gvfg_set_channel_osd`, `gvfg_set_channel_osd_visible`, and
|
||||
`gvfg_clear_channel_osd`. Channel OSD attaches to capture through the
|
||||
`gvfg_control_frame_processor` export of `gvfg.dll`, which is not declared in any
|
||||
public header, so `gvfg_osd.dll` must come from the same SDK build as `gvfg.dll`.
|
||||
|
||||
The helper supports:
|
||||
The private OSD core (`src/gvfg_osd_core.h`, `src/gvfg_osd.cpp`) generates a
|
||||
full-frame YUV422 OSD surface when text settings change. It does not capture,
|
||||
communicate with the driver, or present a preview; the GPU blend into live
|
||||
frames is in `src/gvfg_gpu_osd.cpp`.
|
||||
|
||||
The core supports:
|
||||
|
||||
- YUY2 and Y210 output
|
||||
- printable ASCII text, up to 32 characters
|
||||
@@ -23,7 +31,7 @@ at least `width` bytes per row.
|
||||
|
||||
`gvfg_osd_measure()` returns a conservative complete text box containing logical
|
||||
spacing, glyph overhang, and a one-pixel guard on each edge. It is not a
|
||||
pixel-tight raster bound. The public `gvfg_measure_osd_text()` API in `gvfg.dll`
|
||||
pixel-tight raster bound. The public `gvfg_measure_osd_text()` API in `gvfg_osd.dll`
|
||||
provides the same measurement without creating a capture handle or opening a
|
||||
device. Font size must be non-zero; the SDK does not impose the viewer's
|
||||
512-pixel UI limit.
|
||||
@@ -45,14 +53,17 @@ uploaded on settings/geometry changes, not every frame. Hidden slots retain
|
||||
their rasterized surfaces and textures; shader visibility bits implement show/hide
|
||||
without rebuilding. If all slots are hidden, no blend or readback is performed.
|
||||
Clearing a slot discards its configuration and surfaces. An oversized slot is
|
||||
skipped independently, leaving capture and the other slot active. For non-zero-copy acquisition, the backend explicitly
|
||||
skipped independently, leaving capture and the other slot active.
|
||||
|
||||
For non-zero-copy (copy-mode) acquisition, the backend explicitly
|
||||
grants writable access to its currently held SDK-owned capture buffer: the
|
||||
GPU result replaces only that rectangle in place, retaining the original
|
||||
stride and size. No second full-frame copy or output-buffer resize is needed.
|
||||
The backend frame stays held until the application's normal release, including
|
||||
across signal-recovery requests. The application still receives read-only data.
|
||||
|
||||
By default, driver zero-copy acquisition grants no writable access. The SDK still
|
||||
Driver zero-copy acquisition grants no writable access (the experimental in-place
|
||||
zero-copy OSD path was removed in 3.2.0). The SDK
|
||||
copies the complete native frame into independent output storage, replaces
|
||||
the processed rectangle there, and releases the backend frame before delivery.
|
||||
CPU code copies bytes but does not blend pixels. Text with no visible coverage
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Playback 維護與同步實作
|
||||
|
||||
SDK 3.0.0;客戶整合從 [公開播放手冊](../../../docs/GVFG_PLAYBACK_API.md) 開始,
|
||||
逐參數契約見 [API Reference](../../../docs/GVFG_Customer_doc/GVFG_CUSTOMER_API_REFERENCE.md)。
|
||||
SDK 3.2.0;客戶整合從 [公開播放手冊](../../../docs/GVFG_PLAYBACK_API.zh-TW.md) 開始,
|
||||
逐參數契約見 [API Reference](../../../docs/GVFG_Customer_doc/GVFG_CUSTOMER_API_REFERENCE.zh-TW.md)。
|
||||
本文件供 SDK 維護者,說明目前實作,不作為 Customer Demo 的除錯畫面需求。
|
||||
|
||||
`signal_card.cpp` 管理 UI 執行緒上的原生 child overlay;圖片以 bitmap resource
|
||||
@@ -22,7 +22,7 @@ gvfg_preview STATIC gvfg_audio_playback STATIC
|
||||
```
|
||||
|
||||
Playback 是 SHARED target;兩個 backend 是 PRIVATE 連結的 STATIC target,只有 Playback 函式匯出。
|
||||
`.def` 在本目錄。客戶標頭包含 backend header 只是重用資料型別,不對外匯出 backend 函式。
|
||||
`.def` 在本目錄。公開 PCM、影像與呈現型別直接定義在 `gvfg_playback.h`;backend 標頭為私有,不安裝也不匯出 backend 函式。
|
||||
Capture DLL 與 Playback DLL 沒有互相接管 handle,SDK source 仍依 target 各自維護。
|
||||
|
||||
## 2. 物件與執行緒
|
||||
@@ -109,6 +109,7 @@ backend position 的 resetting 旗標與 generation 在 mutex 下協調,避免
|
||||
HWND owner 的同步等待仍服務 sent messages,避免 DXGI 與 UI thread 互等。
|
||||
|
||||
初次 prepare 在緩衝期間做;正常每張不再重複 prepare 與前置 idle 等待。
|
||||
`present_image()` 比對 render 前後的 presented 計數,沒有增加(GPU busy、逾時)就回傳 EOUTPUT。
|
||||
真正後端 failure 導致 EOUTPUT;GPU busy/後端過期是計數略過,不是 Capture failure。
|
||||
`video_processed` 包含呈現、隱藏消化與略過;`video_dropped` 是過期/busy 略過,不能當 driver drop。
|
||||
底層 Preview delivery 計數不包含 core 在送 GPU 前已退休的所有 frame。
|
||||
@@ -124,6 +125,9 @@ Audio master 不調整音訊速率。其他 master 每約 20 ms 以 audio PTS
|
||||
WASAPI 使用 shared-mode AUTOCONVERTPCM、SRC_DEFAULT_QUALITY、RATEADJUST,
|
||||
透過 `IAudioClockAdjustment::SetSampleRate()` 執行指令;不支援或操作失敗會回報輸出錯誤。
|
||||
本實作沒有舊 QAudioSink 的兩秒自動重建裝置策略,也沒有無界加速補回未知遺失 samples。
|
||||
影音模式可選用 `gvfg_playback_enable_audio_reconnect()`(start 前):音訊輸出失效後,worker 以背景 `std::async`
|
||||
約每秒建立並 start 一個新的預設輸出;成功時換上新 player、重設音訊映射與恢復狀態並清除 `audio_output_failed`。
|
||||
純音訊模式或核心已有 `last_error` 時不重試。
|
||||
|
||||
## 8. 與 FFplay 的對應及差異
|
||||
|
||||
@@ -148,9 +152,9 @@ stop/reset 取消 queue,不是無損 drain。reset 沿用舊 config,音訊
|
||||
|
||||
詳細統計位於私有 `src/playback_debug.h`,不安裝到客戶套件。核心保留診斷計數與同步狀態。
|
||||
詳細 Preview delivery 計數型別位於私有 `../gvfg_preview/src/preview_delivery_stats.h`。
|
||||
僅 Debug DLL 匯出 `gvfg_playback_debug_get_stats()` 與 `gvfg_playback_debug_get_delivery_stats()`;內部工具須定義
|
||||
僅在 `GVFG_INTERNAL_DIAGNOSTICS=1`(Debug 組態,或頂層選項 `GVFG_ENABLE_INTERNAL_DIAGNOSTICS=ON`)建置的 DLL 匯出 `gvfg_playback_debug_get_stats()` 與 `gvfg_playback_debug_get_delivery_stats()`;內部工具須定義
|
||||
`GVFG_INTERNAL_DIAGNOSTICS=1` 並使用同一版私有標頭與 MSVC Debug 匯入庫。
|
||||
診斷結構不提供穩定 ABI 或舊大小相容;Release DLL 不匯出診斷查詢。
|
||||
診斷結構不提供穩定 ABI 或舊大小相容;預設 Release DLL 不匯出診斷查詢。
|
||||
config 仍要求目前完整的 struct_size。
|
||||
公開 API/資料變更需同步標頭、匯入庫、DLL、Reference 與 Demo,避免混版。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user