Files
GVFG_Standalone/sdk/gvfg/include/gvfg_debug.h
T

78 lines
2.2 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_frame(). */
int height; /* Height of the most recent frame returned by gvfg_read_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_frames_dropped;
uint64_t backend_dma_errors;
uint64_t backend_interrupt_count;
uint64_t backend_wait_timeouts;
int backend_running;
int backend_capture_active;
uint32_t backend_pending_events;
uint64_t backend_latest_sequence;
uint64_t backend_delivered_sequence;
uint64_t backend_active_delivery_slot; /* UINT64_MAX when no frame is held by the caller. */
uint64_t backend_next_write_slot;
uint64_t backend_ring_size;
} 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_runtime_info() instead.
*/
GVFG_API gvfg_status_t gvfg_debug_get_backend_stats(
_In_ gvfg_handle handle,
_Out_ gvfg_debug_backend_stats_t *out_stats);
/*
* Copy the latest backend error detail into out_message.
*
* The message is UTF-8 and null-terminated when out_message_size is non-zero.
*/
GVFG_API gvfg_status_t gvfg_debug_get_last_error_detail(
_In_ gvfg_handle handle,
_Out_writes_to_opt_(out_message_size, out_message_size) char *out_message,
_In_ uint32_t out_message_size);
#ifdef __cplusplus
}
#endif