Consolidate playback APIs and add standalone OSD bitmap rendering
- move public PCM, image and presentation types into gvfg_playback.h and remove the separate backend headers from source and installation - keep WASAPI and D3D backends private while preserving the existing public type names, fields and static backend integration - move detailed preview delivery counters into a private header and expose their playback query only through the Debug diagnostics API - retain public preview information and basic presentation statistics, mark EQUEUE_FULL as reserved, and document capacity limits as advanced settings with recommended defaults - refresh customer guides, API reference and error handling for the single-header interface, presentation counter limits and EAUDIO handle-recreation policy - add SDK-owned standalone premultiplied BGRA text rendering with transparent backgrounds, measured dimensions, thread-local snapshot lifetime and validated output bounds Validation: git diff --cached --check passed. Release gvfg_playback and Customer Sample builds, standalone C/C++ header checks, Debug playback syntax checks and Release export inspection passed earlier in this session. Final follow-up changes affect comments and documentation only. No runtime or hardware playback validation was performed. The existing Release gvfg target was also checked and was up to date. OSD rendering changes were source-reviewed; no new bitmap or hardware test was run in this commit pass. Capture debug exports are unchanged.
This commit is contained in:
@@ -13,8 +13,22 @@
|
||||
MinGW 使用對應的 `libgvfg.dll.a`、`libgvfg_playback.dll.a`。
|
||||
播放功能只有一個 DLL;擷取仍有自己的 DLL。Windows 與 C/C++ runtime 相依仍須滿足。
|
||||
|
||||
公開標頭需一起交付:`gvfg_capture.h`、`gvfg_playback.h`、`gvfg_preview.h`、
|
||||
`gvfg_audio_playback.h`。後兩個由 Playback 標頭引入,提供影像、PCM 格式及統計型別。
|
||||
Playback 僅需交付 `gvfg_playback.h`,其中已包含所有公開函式、影像、PCM 格式及統計型別。擷取功能另使用 `gvfg_capture.h`;內部音訊與顯示後端不需另外提供標頭。
|
||||
|
||||
### 顯示資訊與呈現統計
|
||||
|
||||
公開查詢提供一般應用程式需要的資訊:
|
||||
|
||||
| 查詢 | 結果 | 用途 |
|
||||
|---|---|---|
|
||||
| `gvfg_playback_get_preview_info()` | `gvfg_preview_info_t` | 取得影像尺寸、格式與顯示卡資訊 |
|
||||
| `gvfg_playback_get_preview_stats()` | `gvfg_preview_stats_t` | 取得 `present_fps`、`presented_frames`、`skipped_presents` |
|
||||
|
||||
呼叫時傳入有效的 Playback handle 與結果結構指標,並檢查回傳值。
|
||||
`present_fps` 是最近五秒成功被 DXGI Present 接受的速率;`presented_frames` 是成功 Present 的累積數,兩者均不代表螢幕實際掃描輸出。
|
||||
`skipped_presents` 是預覽端略過呈現的累積數,不是擷取或錄影掉格總數。
|
||||
|
||||
詳細佇列、GPU upload slot 與逐影格 delivery 計數屬於內部 Debug 診斷,不在公開 header 或客戶 API 中提供。應用程式不需管理這些內部狀態。
|
||||
|
||||
## 2. 選擇模式
|
||||
|
||||
@@ -149,7 +163,7 @@ bool SubmitOneAudio(gvfg_handle capture, int channel, gvfg_playback player)
|
||||
應用程式不必自行調整播放速率或實作同步演算法。
|
||||
- 來源不穩定時可能出現靜音、間斷或略過影格;應用程式仍須持續提交可用資料。
|
||||
API 接受資料不保證每張 frame 都顯示,也不能保證恢復未知的底層遺失或延遲。
|
||||
- 依實際需求設定緩衝容量;欄位、預設值與範圍見 API Reference 的 `gvfg_playback_config_t`。
|
||||
- 一般應用程式保留 `gvfg_playback_default_config()` 提供的緩衝預設值。`max_video_frames`、`max_audio_ms`、`max_video_bytes` 是進階容量上限,僅在有明確記憶體或待播容量需求時調整;它們不是固定播放延遲的保證。欄位與合法範圍見 API Reference 的 `gvfg_playback_config_t`。
|
||||
|
||||
## 7. 執行緒、重設與停止
|
||||
|
||||
|
||||
Reference in New Issue
Block a user