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:
2026-12-01 16:03:38 +08:00
co-authored by Claude Opus 5.5
parent 02c7004e8c
commit 784aa5c579
21 changed files with 3277 additions and 1044 deletions
+80 -49
View File
@@ -1,84 +1,115 @@
# GVFG Standalone SDK
目前 SDK 版本為 3.0.0,來源是 [GVFG_SDK/CMakeLists.txt](GVFG_SDK/CMakeLists.txt)。
擷取使用 `gvfg.dll`;選用播放功能使用 `gvfg_playback.dll`。Audio 與 Preview 是
Playback 內部靜態 library,不再各自部署 DLL。
English | [繁體中文](README.zh-TW.md)
## 文件入口
The current SDK version is 3.2.0, defined in [GVFG_SDK/CMakeLists.txt](GVFG_SDK/CMakeLists.txt).
Capture uses `gvfg.dll`. The optional OSD feature uses `gvfg_osd.dll`, and the optional
playback feature uses `gvfg_playback.dll`. Audio and Preview are internal static libraries
of Playback and are no longer deployed as separate DLLs.
| 目的 | 文件 |
## Where to start
| Goal | Document |
|---|---|
| 第一次使用擷取 API | [客戶 API 使用手冊](docs/GVFG_CUSTOMER_API.md) |
| 播放影像、音訊或同步影音 | [統一影音播放使用手冊](docs/GVFG_PLAYBACK_API.md) |
| 查結構、參數、限制與狀態碼 | [公開 API Reference](docs/GVFG_Customer_doc/GVFG_CUSTOMER_API_REFERENCE.md) |
| 理解 source、ownership 與執行緒 | [學習入口](docs/GVFG_LEARNING_INDEX.md) |
| 建置 SDK、連結 Demo、安裝 | [內部建置說明](docs/INTERNAL_BUILD_GUIDE.md) |
| 維護同步、WASAPI、D3D 實作 | [Playback 維護說明](GVFG_SDK/helpers/gvfg_playback/README.md) |
| First use of the capture API (including OSD) | [Customer API Guide](docs/GVFG_CUSTOMER_API.md) |
| Play video, audio, or synchronized audio/video | [Unified Playback Guide](docs/GVFG_PLAYBACK_API.md) |
| Look up structs, parameters, limits, and status codes | [Public API Reference](docs/GVFG_Customer_doc/GVFG_CUSTOMER_API_REFERENCE.md) |
| Understand sources, ownership, and threading | [Learning Index](docs/GVFG_LEARNING_INDEX.md) |
| Build the SDK, link the demo, install | [Internal Build Guide](docs/INTERNAL_BUILD_GUIDE.md) |
| Maintain sync, WASAPI, and D3D implementation | [Playback Maintenance Notes](GVFG_SDK/helpers/gvfg_playback/README.md) |
客戶先讀使用手冊,不需要理解 backend、driver 或同步演算法才可呼叫 API。
Customer documents are available in English (`*.md`) and Traditional Chinese
(`*.zh-TW.md`); internal maintenance documents are in Chinese only.
Customers should start with the guides. Calling the API does not require understanding
the backend, the driver, or the sync algorithms.
## 原始碼與責任
## Source layout and responsibilities
```text
GVFG_SDK/
sdk/gvfg/ Capture C API、GigabyteLib adapter、OSD/GPU conversion
helpers/gvfg_playback/ 公開播放 API、模式、時鐘、緩衝、同步排程
helpers/gvfg_audio_playback/ 內部 WASAPI 靜態 backend
helpers/gvfg_preview/ 內部 D3D 靜態 backend
helpers/gvfg_osd/ 內部 OSD 元件
docs/ 客戶與維護文件
../Costomer_SDK_Release/GVFG_Customer_Sample/ 獨立 Qt Demo 專案
../srcroot/ 完整 Viewer,匯入 Standalone SDK
sdk/gvfg/ Capture C API, GigabyteLib adapter, GPU conversion
helpers/gvfg_osd/ OSD DLL: fonts, text measurement, per-channel GPU OSD
helpers/gvfg_playback/ Public playback API, modes, clock, buffering, sync scheduling
helpers/gvfg_audio_playback/ Internal static WASAPI backend
helpers/gvfg_preview/ Internal static D3D backend
third_party/GigabyteLib/ Vendor GigabyteLib headers and libraries
docs/ Customer and maintenance documentation
tools/gigabytelib_probe/ GigabyteLib probing tool
CaptureDemo/exdemo/ Reference CaptureDemo (audio player example)
../Costomer_SDK_Release/GVFG_Customer_Sample/ Standalone Qt demo project
../srcroot/ Full Viewer, consumes the Standalone SDK
```
Capture 的 read/release、裝置與 channel lifecycle 由應用程式管理;Playback 只管理收到的播放副本。
GigabyteLib `GvfgSdk.lib` 靜態連結在 Capture DLL,private vendor headers 不屬於客戶 API。
The application owns capture read/release as well as the device and channel lifecycle;
Playback only manages the copies it receives for playback.
GigabyteLib `GvfgSdk.lib` is statically linked into the capture DLL. Private vendor
headers are not part of the customer API.
## 建置
## Build
SDK 不需要 Qt。在已載入 MSVC x64 環境的命令提示字元,於此目錄執行:
The SDK does not require Qt. From a command prompt with the MSVC x64 environment loaded,
run in this directory:
```bat
cmake -S GVFG_SDK -B GVFG_SDK/build_release -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build GVFG_SDK/build_release --target gvfg gvfg_playback
cmake --build GVFG_SDK/build_release --target gvfg gvfg_osd gvfg_playback
```
SDK 的頂層 CMake 不建置 Qt Sample,也沒有 `BUILD_GVFG_SAMPLES` 選項。
Demo 從 [獨立專案目錄](../Costomer_SDK_Release/GVFG_Customer_Sample/README.md) 建置,僅需要 Qt Widgets。
內附 vendor `.lib` 需要相容的 MSVC x64 SDK 建置環境;MinGW 客戶端可連結產生的 GNU 匯入庫。
若找不到 dlltool,可設定 `GVFG_MINGW_DLLTOOL`,細節見建置說明。
The top-level SDK CMake does not build the Qt sample and has no `BUILD_GVFG_SAMPLES`
option. Build the demo from its [standalone project directory](../Costomer_SDK_Release/GVFG_Customer_Sample/README.md);
it only needs Qt Widgets.
The bundled vendor `.lib` requires a compatible MSVC x64 build environment; MinGW clients
can link against the generated GNU import libraries. If `dlltool` is not found
automatically, set `GVFG_MINGW_DLLTOOL`; see the build guide for details.
`GVFG_ENABLE_INTERNAL_DIAGNOSTICS` (default `OFF`) enables SDK diagnostics in non-Debug
builds and is for internal use only.
## 客戶檔案
## Customer files
```text
include/gvfg_capture.h
include/gvfg_osd.h
include/gvfg_playback.h
bin/gvfg.dll
bin/gvfg_osd.dll
bin/gvfg_playback.dll
lib/gvfg.lib
lib/gvfg_osd.lib
lib/gvfg_playback.lib
lib/libgvfg.dll.a # 有啟用 dlltool 時
lib/libgvfg_playback.dll.a # 有啟用 dlltool 時
lib/libgvfg.dll.a # when dlltool is enabled
lib/libgvfg_osd.dll.a # when dlltool is enabled
lib/libgvfg_playback.dll.a # when dlltool is enabled
share/doc/ # customer guides and API reference (English and Traditional Chinese)
```
只擷取、不播放時,只需要 Capture 的 header/匯入庫/DLL。使用 Playback 時,
另外攜帶三個播放相關標頭;後端標頭只為公開資料型別,不代表其函式對外匯出。
不要把建置目錄內的 `gvfg_preview.lib`、`gvfg_audio_playback.lib` 誤當成部署用匯入庫。
For capture only, you need just the capture header, import library, and DLL. To use OSD,
also ship `gvfg_osd.h`, its import library, and `gvfg_osd.dll`. To use Playback, also ship
`gvfg_playback.h`, its import library, and `gvfg_playback.dll`. All DLLs must come from the
same SDK build.
Do not mistake `gvfg_preview.lib` or `gvfg_audio_playback.lib` in the build directory for
deployable import libraries.
使用 `cmake --install <sdk-build> --prefix <new-package-directory>` 取得配套輸出。
Customer Demo 的 Release 打包腳本使用 EXE 同目錄中的 Capture/Playback DLL,
不會代為編譯,也不從其他 build 目錄任意挑 DLL。
Run `cmake --install <sdk-build> --prefix <new-package-directory>` to get a matching set of
outputs. The Customer Demo's Release packaging script uses the Capture and Playback
DLLs located next to the EXE; it does not build them and does not pick DLLs from arbitrary
build directories.
## 模式、遷移與驗證
## Modes, migration, and validation
Playback 支援 video-only、audio-only、audio-video;純音訊不需視窗,
單張 RAW/DICOM 可用 `gvfg_playback_present_image()`,不啟動播放時間軸。
同步策略在 SDK,不放在 Demo。普通 Demo 顯示基本狀態及 API 錯誤;內部分支的
Debug 診斷與客戶 Release 套件分開,不能以 Debug 畫面作為客戶 API 契約。
Playback supports video-only, audio-only, and audio-video. Audio-only playback needs no
window. A single RAW/DICOM image can be shown with `gvfg_playback_present_image()` without
starting the playback timeline.
The sync policy lives in the SDK, not in the demo. The standard demo shows basic status
and API errors. Debug diagnostics on internal branches are separate from the customer
Release package; the Debug UI is not part of the customer API contract.
舊程式應移除直接使用 Audio/Preview helper 的程式碼與 DLL 相依,
重新編譯並改用 `gvfg_playback_*`;遷移步驟見播放手冊。
既有擷取錄影流程與即時預覽是不同消費路徑,預覽略過數不等於錄影掉格數。
Existing code should remove any direct use of the Audio/Preview helpers and their DLL
dependencies, rebuild, and switch to `gvfg_playback_*`; see the playback guide for the
migration steps.
The existing capture-to-recording flow and live preview are different consumer paths:
the preview skip count is not the recording dropped-frame count.
既有 2 分鐘實機測試與慢速輸出模擬的範圍記在 Playback 維護說明;
短測、建置通過不代表完成聲學嘴型精度、小時級漂移或所有硬體/格式驗證。
The scope of the existing 2-minute hardware test and the slow-output simulation is
documented in the Playback maintenance notes. Short tests and successful builds do not
constitute validation of acoustic lip-sync accuracy, hour-long drift, or all
hardware/format combinations.