Separate Qt capture control from the UI
Compared with 1214e72:
- Move device discovery, channel lifecycle, signal monitoring, frame delivery, preview submission, runtime logging, and shutdown coordination from MainWindow into a dedicated CaptureController.
- Add a GvfgClient RAII wrapper and gvfg_api namespace so one application module owns all direct calls to the public capture and preview C APIs.
- Keep MainWindow focused on widget creation, user actions, option synchronization, preview-window presentation, and UI state updates through controller signals.
- Preserve per-channel video workers, exact frame release handling, preview delivery accounting, startup timing, signal recovery, and diagnostic reporting while removing their implementation details from the UI class.
- Preserve the audio read-copy-release path, bounded playback queue, playback-thread QAudioSink ownership, recovery behavior, and byte/frame accounting inside the controller.
- Register the new source files in the standalone Qt sample target and document the resulting UI, capture-control, and API-adapter source boundaries.
Validation: git diff --cached --check passed before commit. No build, runtime launch, capture, audio playback, device-event, shutdown, or hardware validation was run.
This commit is contained in:
@@ -16,6 +16,12 @@ done-index 與舊 SDK frame-ring 流程不在相容範圍內。
|
||||
- `GVFG_Qt_Sample`:獨立 Qt APP project,只連結預先建好的 SDK,不會編譯 SDK source。
|
||||
- `docs`:API 與整合說明。
|
||||
|
||||
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。
|
||||
|
||||
客戶使用指南在 `docs/GVFG_CUSTOMER_API.md`,完整函式與結構參考在
|
||||
`docs/GVFG_CUSTOMER_API_REFERENCE.md`。內部架構、package
|
||||
切分、threading、frame ownership 說明在 `docs/GVFG_INTERNAL_NOTES.md`。
|
||||
|
||||
Reference in New Issue
Block a user