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:
Mark.lin
2026-11-17 17:40:25 +08:00
parent 47a5f041ee
commit 7a7027391e
20 changed files with 568 additions and 47 deletions
+46 -13
View File
@@ -177,6 +177,26 @@ extern "C"
char st352_bit_depth_name[24]; /* Null-terminated ST 352 bit-depth description. */
} gvfg_sdi_info_t;
typedef struct
{
int connected;
uint32_t width;
uint32_t height;
uint32_t fps; /* HDMI input frames per second reported by GigabyteLib. */
uint32_t color_format; /* HDMI color format code. */
uint32_t color_space; /* HDMI color space and range code. */
uint32_t bit_depth; /* HDMI input bit depth. */
char fps_name[24]; /* Decimal text for fps, without a unit suffix. */
char color_format_name[24];
char color_space_name[32];
} gvfg_hdmi_info_t;
typedef struct
{
uint32_t version_date; /* Chip version date, interpreted in hexadecimal. */
uint32_t version_time; /* Chip version time, interpreted in hexadecimal. */
} gvfg_chip_info_t;
typedef struct
{
int connected; /* Non-zero while this channel has a valid input signal. */
@@ -226,7 +246,7 @@ extern "C"
typedef struct gvfg_osd_bitmap_t
{
const uint8_t *data; /* SDK-owned; do not modify/free. See gvfg_render_osd_bgra(). */
const uint8_t *data; /* SDK-owned; do not modify/free. See the render function's lifetime. */
uint64_t data_size; /* stride * height bytes. */
uint32_t width;
uint32_t height;
@@ -397,19 +417,23 @@ extern "C"
GVFG_PARAM_OUT uint32_t *out_width,
GVFG_PARAM_OUT uint32_t *out_height);
/* Render one standalone text bitmap; no device, channel or Start needed.
* Same text/font/size limits as measure; ignores x/y. Auto-sized conservative
* text box, top-down, left-to-right B,G,R,A bytes with PREMULTIPLIED alpha.
* Transparent background; anti-aliased edges retain partial alpha.
* Snapshot expires at the next call to this function on the SAME thread
* (including failure), thread exit, or DLL unload. Copy before rendering a
* second OSD or handing data to another thread/asynchronous FPGA transfer.
* Other OSD APIs do not invalidate it. out_bitmap is empty on failure.
* Invalid/missing font/input or unsupported dimensions: GVFG_EINVAL;
* allocation/render failure: GVFG_EIO. No caller-side free is needed.
/* Prepare one transparent video-sized overlay for FPGA transfer. No capture
* handle needed; pass the target video width/height in pixels. Output is
* top-down BGRA8888, premultiplied alpha, stride = width * 4.
* NULL slots are omitted (hidden/unused); both NULL produce a blank frame.
* x/y are frame coordinates, clamped to fit; oversized text is skipped.
* Slot 1 is composited over slot 0. No video pixels are included.
* Data is valid until the next call to this function on the same thread
* (including failure), thread exit or DLL unload. Copy for async transfer.
* Invalid inputs/dimensions (including byte size above UINT32_MAX) return
* GVFG_EINVAL; allocation/render failures return GVFG_EIO. On failure the
* output is empty. Does not affect GPU capture OSD.
*/
GVFG_API gvfg_status_t gvfg_render_osd_bgra(
GVFG_PARAM_IN const gvfg_channel_osd_config_t *config,
GVFG_API gvfg_status_t gvfg_render_osd_frame_bgra(
GVFG_PARAM_IN uint32_t video_width,
GVFG_PARAM_IN uint32_t video_height,
GVFG_PARAM_IN const gvfg_channel_osd_config_t *slot0,
GVFG_PARAM_IN const gvfg_channel_osd_config_t *slot1,
GVFG_PARAM_OUT gvfg_osd_bitmap_t *out_bitmap);
/* Set and show slot 0 or 1 on an opened channel. Strings are copied before
@@ -659,6 +683,15 @@ extern "C"
GVFG_PARAM_IN int channel_index,
GVFG_PARAM_OUT gvfg_sdi_info_t *out_info);
GVFG_API gvfg_status_t gvfg_get_channel_hdmi_info(
GVFG_PARAM_IN gvfg_handle handle,
GVFG_PARAM_IN int channel_index,
GVFG_PARAM_OUT gvfg_hdmi_info_t *out_info);
GVFG_API gvfg_status_t gvfg_get_chip_info(
GVFG_PARAM_IN gvfg_handle handle,
GVFG_PARAM_OUT gvfg_chip_info_t *out_info);
/*
* Query runtime frame-delivery diagnostics.
*
+3
View File
@@ -170,6 +170,9 @@ GVFG_DEBUG_API gvfg_status_t gvfg_debug_get_channel_backend_stats(
GVFG_PARAM_IN int channel_index,
GVFG_PARAM_OUT gvfg_debug_backend_stats_t *out_stats);
/* Set the board's user LED. At least one channel must be open. */
GVFG_DEBUG_API gvfg_status_t gvfg_debug_set_user_led(gvfg_handle handle, int on);
/* Query device capabilities for internal diagnostics. At least one channel
* must already be open on handle. */
GVFG_DEBUG_API gvfg_status_t gvfg_debug_get_device_capabilities(