Add HDMI input and chip queries to GVFG SDK 3.1
- Expose HDMI input and chip information through the capture API and rename the full-frame OSD rendering entry point. - Update the bundled Gigabyte library and add opt-in internal diagnostics with a user LED control. - Update the customer API reference, generated PDF, and build guidance. Validation: git diff --cached --check passed. Build and runtime tests were not run for this commit.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# GVFG 客戶 API Reference
|
||||
|
||||
SDK 3.0.0。Capture 與 Playback 使用各自的 API 與狀態碼。
|
||||
SDK 3.1.0。Capture 與 Playback 使用各自的 API 與狀態碼。
|
||||
|
||||
本版含不相容的 OSD 介面更新,並移除公開的 Playback 核心與 Preview delivery 詳細統計查詢。
|
||||
使用本版 header、import library 與 DLL 重新編譯;不可混用 SDK 2.x 二進位檔案。
|
||||
@@ -350,6 +350,47 @@ gvfg_status_t gvfg_get_channel_sdi_info(
|
||||
- `GVFG_ESTATE`:指定 channel 尚未 open。
|
||||
- 裝置查詢失敗時可能回傳 `GVFG_EIO`。
|
||||
|
||||
### HDMI 輸入資訊與晶片版本
|
||||
|
||||
```c
|
||||
gvfg_status_t gvfg_get_channel_hdmi_info(
|
||||
gvfg_handle handle, int channel_index, gvfg_hdmi_info_t *out_info);
|
||||
gvfg_status_t gvfg_get_chip_info(gvfg_handle handle, gvfg_chip_info_t *out_info);
|
||||
```
|
||||
|
||||
- 以 `gvfg_get_channel_signal_status()` 的 `video_interface` 選擇 SDI 或 HDMI 查詢。
|
||||
HDMI 查詢要求指定 channel 已 open,回傳來源鎖定狀態、寬高、FPS、色彩格式、
|
||||
色彩空間及位深。來源位深與 DMA 輸出位深可不同。
|
||||
- HDMI 的 `fps_name`、`color_format_name` 和 `color_space_name` 可直接顯示。
|
||||
HDMI 的 `fps` 是每秒幀數,例如 `60`,`fps_name` 是對應的十進位文字 `"60"`。
|
||||
色彩名稱範例為 `YUV 4:2:2` 和 `BT.2020 RGB (Limited)`。
|
||||
- 晶片版本屬於裝置,只需同一 handle 至少有一個 channel 已 open。
|
||||
日期與時間保留原始 32-bit 數值,將十六進位數字分別讀作 `YYYYMMDD` 和 `HHMMSS`。
|
||||
例如 `0x20261113`、`0x174645` 顯示為 `2026-11-13 17:46:45`。
|
||||
- 兩支 API 都要求非 NULL 的 handle 和輸出指標,否則回傳 `GVFG_EINVAL`。
|
||||
查詢所需的 channel 尚未 open 時回傳 `GVFG_ESTATE`。
|
||||
只有回傳 `GVFG_OK` 時才可使用輸出資料。
|
||||
|
||||
```c
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <gvfg_capture.h>
|
||||
|
||||
void print_chip_info(gvfg_handle handle)
|
||||
{
|
||||
gvfg_chip_info_t info = {0};
|
||||
if (gvfg_get_chip_info(handle, &info) == GVFG_OK) {
|
||||
char date[9];
|
||||
char time[9];
|
||||
int date_len = snprintf(date, sizeof date, "%08" PRIX32, info.version_date);
|
||||
int time_len = snprintf(time, sizeof time, "%06" PRIX32, info.version_time);
|
||||
if (date_len == 8 && time_len == 6)
|
||||
printf("Chip version: %.4s-%.2s-%.2s %.2s:%.2s:%.2s\n",
|
||||
date, date + 4, date + 6, time, time + 2, time + 4);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 2.6 Zero-copy mode selection
|
||||
|
||||
```c
|
||||
@@ -612,7 +653,7 @@ const char *gvfg_get_version(void);
|
||||
const char *gvfg_get_gigabyte_lib_version(void);
|
||||
```
|
||||
|
||||
- 回傳目前實際載入的 GVFG runtime DLL 版本,例如 `"3.0.0"`。
|
||||
- 回傳目前實際載入的 GVFG runtime DLL 版本,例如 `"3.1.0"`。
|
||||
- 回傳值是靜態 null-terminated 字串,caller 不可 free。
|
||||
- 可用於 log、問題回報,以及確認 header、DLL 是否來自同一版本。
|
||||
- `gvfg_get_gigabyte_lib_version()` 回傳編譯進目前 runtime 的 GigabyteLib 版本常數,
|
||||
|
||||
Reference in New Issue
Block a user