Refine signal caching and Sample device lifecycle

Compared with 350e8e5:

- perform one fresh GigabyteLib signal query for each explicit channel Start and reject a no-lock request with GVFG_ETIMEOUT instead of entering a placeholder monitoring stream

- keep running signal-status reads on the SDK cache and synchronize format-change, input plug-in, and input unplug state before publishing the corresponding event

- invalidate cached video information when the output depth changes so format selection does not cause an extra immediate hardware read

- make the Qt Sample refresh SDI information after a successful Start and on signal events without polling it from the periodic status timer

- close the Sample device session after the final running channel stops or an idle Start path fails, while preserving the selected device for the next Start

- document the updated Start result, event/cache ordering, query boundaries, and Sample ownership policy across the public API and internal flow guides

Validation: git diff --check passed. The SDK and Qt Sample builds completed successfully during this change. Hardware no-signal, plug/unplug, dual-process handoff, and recording tests were not rerun for this commit.
This commit is contained in:
Mark.lin
2026-09-16 10:37:18 +08:00
parent 350e8e519c
commit 7fb0028ba6
11 changed files with 178 additions and 72 deletions
+9 -1
View File
@@ -332,11 +332,15 @@ gvfg_status_t gvfg_start_channel(gvfg_handle handle, int channel_index);
```
- `handle`:已成功 open 的 session handle。
- `GVFG_OK`:開始擷取、已經 running,或無訊號但成功進入訊號監看模式。
- `GVFG_OK`:開始擷取,或 channel 已經 running。
- `GVFG_EINVAL`:handle 為 NULL。
- `GVFG_ESTATE`:尚未 open 裝置。
- `GVFG_ETIMEOUT`:本次 Start 的即時 signal query 顯示沒有 lock;channel 不會進入 running。
- GigabyteLib 失敗時回傳原始正數 `GVFG_HRESULT`。
每次明確 Start 都會執行一次新的 signal query,不沿用停止前的 signal cache。無訊號時
Application 應等待輸入恢復後再次呼叫 Start。
### 1.21 `gvfg_read_channel_frame`
```c
@@ -490,6 +494,10 @@ gvfg_status_t gvfg_get_channel_signal_status(
- `GVFG_ESTATE`:尚未 open 裝置。
- 也可能回傳其他 backend I/O 狀態。
Channel 尚未 running 時,此 API 會透過 GigabyteLib 更新 signal status;running 期間回傳
SDK cache,不進行另一筆硬體查詢。Format changed、input plug-in 與 input unplug event
都會先同步此 cache,再放入 `gvfg_poll_channel_event()` 使用的 public queue。
### 1.31 `gvfg_get_channel_runtime_info`
```c