Harden GVFG signal recovery and preview lifecycle
Compared with d03f064:
- Pause the sample video and audio readers after signal disconnect events and resume them only after reconnect or stream-ready notification.
- Serialize plug, unplug, and format transitions against active reads and held zero-copy frames while keeping stop and close able to interrupt lifecycle waits.
- Treat ERROR_BAD_COMMAND as unplug-revoked zero-copy ownership only after the backend has confirmed signal loss, while preserving all other release failures for retry and diagnosis.
- Stop submitting frames when the user closes an independent preview window, account those frames as intentionally skipped, and resume submission when preview is reopened.
- Emit UTF-16 Windows debug output so localized Win32 error messages remain readable in Qt and debugger output.
- Add startup and first-frame timing diagnostics, reduce routine stream-ready logging, and update public and internal documentation for the new disconnect and ownership behavior.
Validation: git diff --check and focused symbol/document consistency searches passed; no build or hardware validation was run.
This commit is contained in:
@@ -105,6 +105,9 @@ gvfg_open_channel(handle, device_index, GVFG_CHANNEL_0);
|
||||
|
||||
`VIDEO_DMA` 為 frame capture 必需,SDK 固定註冊。Plug-in、Unplug 與
|
||||
Format-change driver event 則依 mask 註冊;關閉它們也會停用對應的自動訊號恢復。
|
||||
Application 收到 `GVFG_EVENT_SIGNAL_DISCONNECTED` 後應暫停 video/audio read,
|
||||
等待 `GVFG_EVENT_SIGNAL_CONNECTED` 或 stop 再喚醒 worker,不應在已知無訊號時持續
|
||||
輪詢 timeout。
|
||||
|
||||
每個 channel 預設為 copy mode。指定 channel open 後不可切換該路模式;
|
||||
另一條尚未 open 的 channel 仍可獨立選擇。Zero-copy mode 仍使用相同的 `gvfg_read_channel_frame()` /
|
||||
@@ -162,6 +165,9 @@ runtime API 都明確要求 `channel_index`;不再保留隱含 selected-channe
|
||||
`gvfg_qt_preview.exe` 只使用 public API,主畫面只顯示 input 與 Preview
|
||||
狀態;CH0、CH1 各自有 Start、Stop 與獨立 Preview 視窗,可單獨測試,
|
||||
也可同時啟動。第二個 channel open/start 失敗時不會停止已運作的 channel。
|
||||
關閉獨立 Preview 視窗只會停止該視窗的 frame submission;capture/audio 仍可繼續,
|
||||
未顯示的 frame 不計為 preview delivery failure。重新開啟 Preview 或 Fullscreen 會
|
||||
恢復 frame submission。
|
||||
IRQ、DMA 等資訊只存在 internal diagnostic tool。
|
||||
|
||||
## Consumer Layout
|
||||
|
||||
Reference in New Issue
Block a user