Add independent dual-channel preview controls

Compared with f380a8a:

- Let CH0 and CH1 open, start, stop, and preview independently while sharing one device connection.

- Give each channel its own capture worker, preview window, frame ownership, runtime status, and failure reporting.

- Expose channel-indexed zero-copy selection to match the driver IOCTL contract and keep output format selection independent per channel.

- Prevent immediate timeout responses from hot-looping and flooding the Qt event queue.

- Align the CH0 and CH1 controls in equal-width channel panels and update the public and internal documentation.

Validation: Qt uic parsing and git diff --check passed; no build or hardware validation was run.
This commit is contained in:
Mark.lin
2026-08-27 17:13:22 +08:00
parent f380a8a143
commit 226369df0e
11 changed files with 539 additions and 523 deletions
+5 -4
View File
@@ -36,7 +36,7 @@ bin/gvfg_preview.dll
```text
gvfg_enumerate_devices
-> gvfg_create
-> gvfg_set_zero_copy_enabled (optional, before open)
-> gvfg_set_channel_zero_copy_enabled (optional, before channel open)
-> gvfg_open_channel
-> gvfg_start_channel
-> 重複:
@@ -155,9 +155,10 @@ int main(void)
- `gvfg_enumerate_devices(out_devices, max_devices)`:列舉裝置。傳入
`NULL, 0` 可只查數量;回傳值是寫入數量或可用裝置數,無裝置時為 `0`。
- `gvfg_create(&handle)`:建立 closed session。
- `gvfg_set_zero_copy_enabled(handle, enabled)`:選用 zero-copy;只能在
`gvfg_open_channel()` 前呼叫,預設為關閉。
- `gvfg_get_zero_copy_enabled(handle, &enabled)`:查詢 session 選擇的模式。
- `gvfg_set_channel_zero_copy_enabled(handle, channel, enabled)`:替指定 channel
選用 zero-copy;只能在該 channel open 前呼叫,預設為關閉。
- `gvfg_get_channel_zero_copy_enabled(handle, channel, &enabled)`:查詢指定
channel 選擇的模式。
- `gvfg_open_channel(handle, device_index, channel)`:開啟列舉所得裝置,channel
必須為 `GVFG_CHANNEL_0` 或 `GVFG_CHANNEL_1`。
- `gvfg_set_channel_event_mask(handle, channel, mask)`:在 open 前設定指定 channel