Compared with 2a3ad7a:
- replace Microsoft SAL annotations in the public capture and debug headers with GVFG_PARAM_IN, GVFG_PARAM_OUT, and GVFG_PARAM_INOUT
- remove the explicit sal.h include and the non-MSVC SAL compatibility block
- guard the lightweight parameter macros so the public header can coexist with the supervisor-provided framework header
- include gvfgsdkapi.h first inside the private Gigabyte capture session to reuse the vendor definitions without redefinition warnings
- preserve every API signature, ABI layout, export, and runtime behavior
85 lines
2.4 KiB
C
85 lines
2.4 KiB
C
#pragma once
|
|
|
|
/*
|
|
* Internal GVFG debug API.
|
|
*
|
|
* Do not ship this header in customer/demo packages. It is intended for
|
|
* internal driver, FPGA, hardware bring-up, and diagnostic tools.
|
|
*/
|
|
|
|
#include "gvfg_capture.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct
|
|
{
|
|
int width; /* Width of the most recent frame returned by gvfg_read_channel_frame(). */
|
|
int height; /* Height of the most recent frame returned by gvfg_read_channel_frame(). */
|
|
int bit_depth; /* Bits per color channel of the frame buffer. */
|
|
int pixel_format; /* gvfg_pixel_format_t value: YUY2 or Y210. */
|
|
int valid; /* Non-zero after a frame is returned during the current running session. */
|
|
} gvfg_debug_last_frame_info_t;
|
|
|
|
typedef struct
|
|
{
|
|
int sdk_running;
|
|
int frame_held;
|
|
uint32_t event_queue_depth;
|
|
|
|
double runtime_fps;
|
|
uint64_t frames_returned;
|
|
gvfg_debug_last_frame_info_t last_frame;
|
|
|
|
int backend_state;
|
|
uint64_t backend_frames_captured;
|
|
uint64_t backend_frames_delivered;
|
|
uint64_t backend_dma_errors;
|
|
uint64_t backend_interrupt_count;
|
|
uint64_t backend_wait_timeouts;
|
|
|
|
int backend_running;
|
|
int backend_capture_active;
|
|
uint64_t backend_latest_sequence;
|
|
uint64_t backend_delivered_sequence;
|
|
uint64_t audio_dma_event_wakes;
|
|
uint64_t extra_audio_event_wakes;
|
|
uint64_t audio_frames_from_driver;
|
|
uint64_t audio_bytes_from_driver;
|
|
|
|
int get_frame_zero_copy;
|
|
uint64_t get_frame_timing_samples;
|
|
double get_frame_timing_average_us;
|
|
double get_frame_timing_max300_us;
|
|
double get_frame_timing_max_us;
|
|
} gvfg_debug_backend_stats_t;
|
|
|
|
/*
|
|
* Query driver-neutral internal backend counters.
|
|
*
|
|
* This exposes implementation-level counters for internal tools only. Customer
|
|
* applications should use gvfg_get_channel_runtime_info() instead.
|
|
*/
|
|
GVFG_API gvfg_status_t gvfg_debug_get_channel_backend_stats(
|
|
GVFG_PARAM_IN gvfg_handle handle,
|
|
GVFG_PARAM_IN int channel_index,
|
|
GVFG_PARAM_OUT gvfg_debug_backend_stats_t *out_stats);
|
|
|
|
/* GIGABYTELIB GAP: GvfgSdk.lib 1.0.0 has no register-access API. */
|
|
GVFG_API gvfg_status_t gvfg_debug_read_register(
|
|
GVFG_PARAM_IN gvfg_handle handle,
|
|
GVFG_PARAM_IN uint32_t offset,
|
|
GVFG_PARAM_OUT uint32_t *out_value);
|
|
|
|
GVFG_API gvfg_status_t gvfg_debug_write_register(
|
|
GVFG_PARAM_IN gvfg_handle handle,
|
|
GVFG_PARAM_IN uint32_t offset,
|
|
GVFG_PARAM_IN uint32_t value);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|