Restore GVFG features missing from GigabyteLib

Compared with a04bd61:

- Restore the existing gvfg_set_channel_video_format API and the Qt sample YUY2/Y210 output-format controls with the original dual-channel Y210 restriction.

- Restore gvfg_debug_read_register, gvfg_debug_write_register, and the original gvfg_debug_get_channel_backend_stats names and fields so the established internal API remains compatible.

- Implement the three missing operations through a small in-process driver extension using the existing register read/write requests; capture, audio, events, signal queries, copy, and zero-copy paths continue to use GvfgSdk.lib.

- Mark every fallback as a GIGABYTELIB GAP and add a focused gap report requesting official format-selection and diagnostic register APIs from the GigabyteLib owner.

- Remove empty legacy backend and giga_ioctl directories without restoring giga_ioctl.dll or a second capture backend.

Validation: git diff --cached --check passed. MSVC x64 Release and Debug gvfg.dll builds passed, the Release Qt sample rebuilt and linked successfully, dumpbin confirmed all original 32 exports are present, and the Release package contains gvfg.dll without giga_ioctl.dll or private GigabyteLib files. The actual register operations, output-format switching, capture, audio, zero-copy, hot-plug, dual-channel behavior, shutdown, MinGW, and hardware behavior were not runtime-tested.
This commit is contained in:
Mark.lin
2026-09-14 10:22:09 +08:00
parent a04bd611f9
commit 9bc38c4862
20 changed files with 413 additions and 57 deletions
+10
View File
@@ -340,6 +340,16 @@ extern "C"
_In_ int channel_index,
_Out_ int *out_enabled);
/*
* Select the hardware output format before capture starts. This capability
* currently uses an isolated driver extension because GvfgSdk.lib 1.0.0
* does not expose an equivalent API.
*/
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.
+25 -14
View File
@@ -34,17 +34,17 @@ typedef struct
uint64_t frames_returned;
gvfg_debug_last_frame_info_t last_frame;
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_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_running;
int session_capture_active;
uint64_t session_latest_sequence;
uint64_t session_delivered_sequence;
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;
@@ -55,18 +55,29 @@ typedef struct
double get_frame_timing_average_us;
double get_frame_timing_max300_us;
double get_frame_timing_max_us;
} gvfg_debug_channel_stats_t;
} gvfg_debug_backend_stats_t;
/*
* Query driver-neutral internal session counters.
* 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_stats(
GVFG_API gvfg_status_t gvfg_debug_get_channel_backend_stats(
_In_ gvfg_handle handle,
_In_ int channel_index,
_Out_ gvfg_debug_channel_stats_t *out_stats);
_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(
_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);
#ifdef __cplusplus
}