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
+8 -5
View File
@@ -385,16 +385,16 @@ extern "C"
* - handle: Running session handle.
*
* Returns:
* - GVFG_OK on success, including when capture is already running or the SDK
* has entered signal-monitoring mode while no input is connected.
* - GVFG_OK on success, including when capture is already running.
* - GVFG_EINVAL if handle is NULL.
* - GVFG_ESTATE if no device is open.
* - GVFG_ETIMEOUT if a fresh signal query reports no connected input.
* - GVFG_EIO or another status code if stream configuration/start fails.
*
* After success, call gvfg_read_channel_frame() to receive frames and
* gvfg_poll_channel_event()
* to receive capture events. With no input signal, frame reads time out; capture
* starts automatically after a signal-connected event.
* to receive capture events. Each explicit start performs one fresh signal
* query; a no-signal result does not leave the channel running.
*/
GVFG_API gvfg_status_t gvfg_start_channel(
GVFG_PARAM_IN gvfg_handle handle,
@@ -569,7 +569,10 @@ extern "C"
* - GVFG_ESTATE if no capture device is open.
*
* No input signal is a normal state: the function returns GVFG_OK with
* out_status->connected set to 0.
* out_status->connected set to 0. Before capture starts, this function
* refreshes the status from GigabyteLib. While capture is running, it returns
* the SDK cache; format-change, input-plug and input-unplug processing updates
* that cache before the corresponding public event is queued.
*/
GVFG_API gvfg_status_t gvfg_get_channel_signal_status(
GVFG_PARAM_IN gvfg_handle handle,