Remove legacy signal status fields

This commit is contained in:
Mark.lin
2026-06-09 14:19:06 +08:00
parent 71d4cf6a9b
commit aeef7860dd
3 changed files with 6 additions and 41 deletions
+3 -6
View File
@@ -127,9 +127,6 @@ typedef struct
{
int width; /* Signal width in pixels, from FPGA when available. */
int height; /* Signal height in pixels, from FPGA when available. */
double fps; /* Legacy field; GVFG leaves this 0. Use fpga.frame_rate_* instead. */
int bit_depth; /* Legacy SDK source-buffer bit depth. Prefer fpga.* and runtime delivered_frame. */
char pixel_format[32]; /* Legacy SDK source-buffer format. Prefer fpga.* and runtime delivered_frame. */
gvfg_fpga_signal_status_t fpga; /* Raw/decoded FPGA signal metadata. */
} gvfg_signal_status_t;
@@ -144,7 +141,7 @@ typedef struct
typedef struct
{
gvfg_signal_status_t input_signal; /* FPGA-reported signal metadata plus legacy buffer fields. */
gvfg_signal_status_t input_signal; /* FPGA-reported signal metadata. */
gvfg_delivered_frame_info_t delivered_frame; /* Frame buffer delivered by gvfg.dll to the app. */
double capture_fps; /* Runtime FPS measured from backend frames seen by the SDK worker. */
uint64_t delivered_frames; /* Number of frames delivered to the app callback. */
@@ -406,8 +403,8 @@ GVFG_API gvfg_status_t gvfg_stop(gvfg_handle handle);
* - GVFG_EINVAL if handle or out_status is NULL.
* - GVFG_ENODEV if no valid signal information is available.
*
* The FPGA metadata describes the hardware signal. The pixel_format and
* bit_depth fields describe the buffer format delivered by the customer API.
* The FPGA metadata describes the hardware signal. Use
* gvfg_runtime_info_t::delivered_frame for the callback buffer format.
*/
GVFG_API gvfg_status_t gvfg_get_signal_status(gvfg_handle handle, gvfg_signal_status_t *out_status);
-24
View File
@@ -158,27 +158,6 @@ namespace
}
}
const char *gdriver_pixel_format_name(gdriver_pixel_format_t fmt)
{
switch (fmt)
{
case GDRIVER_PIXFMT_YUY2:
return "YUY2";
case GDRIVER_PIXFMT_Y210:
return "Y210";
case GDRIVER_PIXFMT_RGB24:
return "RGB24";
case GDRIVER_PIXFMT_NV12:
return "NV12";
case GDRIVER_PIXFMT_P010:
return "P010";
case GDRIVER_PIXFMT_YUV444:
return "YUV444";
default:
return "UNKNOWN";
}
}
bool fpga_field_valid(uint32_t mask, int bit)
{
return (mask & (1u << bit)) != 0;
@@ -380,9 +359,6 @@ struct gvfg_handle_t
haveSignalSize = fpgaWidthValid && fpgaHeightValid && fpgaWidthRaw != 0 && fpgaHeightRaw != 0;
out.width = haveSignalSize ? static_cast<int>(fpgaWidthRaw) : 0;
out.height = haveSignalSize ? static_cast<int>(fpgaHeightRaw) : 0;
out.fps = 0.0;
out.bit_depth = static_cast<int>(bitDepth ? bitDepth : 8);
copy_cstr(out.pixel_format, sizeof(out.pixel_format), gdriver_pixel_format_name(pixelFormat));
out.fpga.valid_mask = fpgaValidMask;
out.fpga.width_valid = fpgaWidthValid ? 1 : 0;
out.fpga.height_valid = fpgaHeightValid ? 1 : 0;