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:
@@ -349,6 +349,10 @@ gvfg_status_t gvfg_release_channel_frame(gvfg_handle handle,
|
||||
- `handle`:取得該 frame 的同一個 handle。
|
||||
- `frame`:`gvfg_read_channel_frame()` 原封不動回傳的完整 descriptor。
|
||||
- `GVFG_OK`:成功歸還 frame;copy buffer 可再次使用,或 zero-copy frame 已歸還 driver。
|
||||
- 若 frame 原本合法取得,但 release 與 plug-out 競爭,driver 可能已先撤銷
|
||||
zero-copy ownership。SDK 僅在已確認 disconnected 且 driver 回
|
||||
`ERROR_BAD_COMMAND (22)` 時清除相符的 held token,並將 release 視為完成;
|
||||
application 仍照常呼叫一次 release,不需處理 driver error 22。
|
||||
- `GVFG_EINVAL`:NULL 或 token 內容與 held frame 不符。
|
||||
- `GVFG_ESTATE`:沒有 backend、目前沒有 held frame,或 backend release 狀態不正確。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user