Simplify Qt sample controller boundaries
Compared with57ad00c: - Remove the redundant GvfgClient and gvfg_api forwarding layer so the sample calls the public GVFG capture and preview C APIs directly from CaptureController. - Keep MainWindow limited to widget state, user actions, preview-window presentation, and option synchronization while CaptureController continues to own device, channel, worker, delivery, and logging state. - Restore thef612cfdcustomer-visible behavior for hidden CH1 status, Y210 option tooltips, startup log-path reporting, contextual preview errors, timestamped error logging, and zero-copy option status synchronization. - Preserve the requested device-name number suffixes, MinGW consumer support, video frame release handling, audio read-copy-release queue, QAudioSink playback-thread ownership, delivery accounting, and diagnostic output. - Destroy and disconnect CaptureController while MainWindow and its UI are still valid, preventing destructor-time callbacks from reaching an object whose derived destructor has completed. - Use supported QString multi-argument formatting to satisfy clazy without mixing numeric arguments into QString-only overloads. Validation: git diff --cached --check and focused source/API parity inspection againstf612cfdpassed. No configure, build, runtime launch, capture, audio playback, device-event, shutdown, or hardware validation was run.
This commit is contained in:
@@ -20,7 +20,7 @@ Qt Sample 的 source boundary:
|
||||
|
||||
- `mainwindow.cpp`:Widget 建立、signal/slot、畫面狀態與使用者操作。
|
||||
- `capture_controller.cpp/.h`:不依賴 UI widget 的裝置/channel lifecycle、video/audio worker、preview submission、狀態與 log 資料流。
|
||||
- `gvfg_api.cpp/.h`:唯一直接呼叫 `gvfg_*` 與 `gvfg_preview_*` C API 的 application adapter;`GvfgClient` 以 RAII 管理 capture handle。
|
||||
- `capture_controller.cpp/.h` 直接示範公開的 GVFG C API,並明確管理 `gvfg_create()`/停止流程/`gvfg_destroy()`,不建立重複轉呼叫層。
|
||||
|
||||
客戶使用指南在 `docs/GVFG_CUSTOMER_API.md`,完整函式與結構參考在
|
||||
`docs/GVFG_CUSTOMER_API_REFERENCE.md`。內部架構、package
|
||||
|
||||
Reference in New Issue
Block a user