Simplify the SDK around GigabyteLib

Compared with 0af70a5:

- Remove the generic backend directory and legacy PCIE S2MM naming so the SDK now has a direct gvfg facade to GigabyteCaptureSession to GvfgSdk.lib structure.

- Delete the unsupported video-format setter and direct register read/write APIs instead of retaining compatibility methods that cannot be implemented by the supplied GigabyteLib interface.

- Remove output-format controls and requested-format state from the Qt sample; capture now follows the native YUY2 or Y210 format reported by GvfgGetVideoInfo.

- Eliminate the placeholder stream descriptor and allocate copy buffers from current GigabyteLib video metadata when a frame becomes available.

- Rename the internal debug stats API and fields from backend terminology to channel/session terminology, while retaining capture, audio, event, timeout, timing, and zero-copy diagnostics.

- Update source paths and documentation to describe GigabyteLib as the only lower layer and remove stale format-setting, register, and direct IOCTL guidance.

Validation: git diff --cached --check passed. MSVC x64 Release and Debug gvfg.dll builds passed, the Release Qt sample rebuilt and linked successfully, dumpbin verified the intentional 29-export API, and the Release package script produced an archive containing the sample and gvfg.dll without private GigabyteLib files or giga_ioctl.dll. No runtime capture, audio, zero-copy, hot-plug, dual-channel, shutdown, MinGW, or hardware validation was run.
This commit is contained in:
Mark.lin
2026-09-14 10:05:54 +08:00
parent 0af70a59ca
commit a04bd611f9
26 changed files with 532 additions and 920 deletions
-12
View File
@@ -340,18 +340,6 @@ extern "C"
_In_ int channel_index,
_Out_ int *out_enabled);
/*
* Request the native capture format. Call after opening the device and
* before gvfg_start_channel(), or after gvfg_stop_channel(). A running stream
* rejects the change with GVFG_ESTATE. The GigabyteLib backend does not
* expose format conversion, so it returns GVFG_ENOTSUP when a connected
* input's native format differs from the requested format.
*/
GVFG_API gvfg_status_t gvfg_set_channel_video_format(
_In_ gvfg_handle handle,
_In_ int channel_index,
_In_ gvfg_pixel_format_t format);
/*
* Enable or disable audio for the next channel start. Video remains
* enabled; applications do not need to construct stream flag masks.
+14 -30
View File
@@ -34,17 +34,17 @@ typedef struct
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 session_state;
uint64_t session_frames_captured;
uint64_t session_frames_delivered;
uint64_t session_dma_errors;
uint64_t session_interrupt_count;
uint64_t session_wait_timeouts;
int backend_running;
int backend_capture_active;
uint64_t backend_latest_sequence;
uint64_t backend_delivered_sequence;
int session_running;
int session_capture_active;
uint64_t session_latest_sequence;
uint64_t session_delivered_sequence;
uint64_t audio_dma_event_wakes;
uint64_t extra_audio_event_wakes;
uint64_t audio_frames_from_driver;
@@ -55,34 +55,18 @@ typedef struct
double get_frame_timing_average_us;
double get_frame_timing_max300_us;
double get_frame_timing_max_us;
} gvfg_debug_backend_stats_t;
} gvfg_debug_channel_stats_t;
/*
* Query driver-neutral internal backend counters.
* Query driver-neutral internal session 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_API gvfg_status_t gvfg_debug_get_channel_stats(
_In_ gvfg_handle handle,
_In_ int channel_index,
_Out_ gvfg_debug_backend_stats_t *out_stats);
/*
* Read or write one 32-bit BAR-relative hardware register.
*
* The offset must be 4-byte aligned. Register writes can disrupt active DMA,
* interrupt handling, or video capture and are intended for internal tools.
*/
GVFG_API gvfg_status_t gvfg_debug_read_register(
_In_ gvfg_handle handle,
_In_ uint32_t offset,
_Out_ uint32_t *out_value);
GVFG_API gvfg_status_t gvfg_debug_write_register(
_In_ gvfg_handle handle,
_In_ uint32_t offset,
_In_ uint32_t value);
_Out_ gvfg_debug_channel_stats_t *out_stats);
#ifdef __cplusplus
}