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:
@@ -0,0 +1,22 @@
|
||||
# GigabyteLib 1.0.0 integration gaps
|
||||
|
||||
Capture, audio, events, signal information, copy mode, and zero-copy mode use
|
||||
the supervisor-provided `GvfgSdk.lib` API directly.
|
||||
|
||||
## Action required from the GigabyteLib owner
|
||||
|
||||
The following existing GVFG capabilities are not exposed by `GvfgSdk.lib 1.0.0`:
|
||||
|
||||
| GVFG capability | Current temporary implementation | Requested GigabyteLib API |
|
||||
|---|---|---|
|
||||
| Select YUY2 or Y210 output | Write global register `0x080` through the isolated driver extension | Add a channel-aware `GvfgSetVideoFormat` or equivalent |
|
||||
| Read a diagnostic register | Driver read-register request in `gigabyte_driver_extensions.cpp` | Add a supported diagnostic register-read API |
|
||||
| Write a diagnostic register | Driver write-register request in `gigabyte_driver_extensions.cpp` | Add a supported diagnostic register-write API |
|
||||
|
||||
These are marked `GIGABYTELIB GAP` in source. They intentionally do not use
|
||||
the removed `giga_ioctl.dll`; the minimal fallback is compiled into `gvfg.dll`.
|
||||
Once official `Gvfg*` functions exist, replace the three extension calls and
|
||||
delete `gigabyte_driver_extensions.*`.
|
||||
|
||||
The library owner should also confirm whether output-format register `0x080`
|
||||
is global or channel-specific and whether CH0 and CH1 may both select Y210.
|
||||
@@ -231,8 +231,8 @@ Zero-copy mode 的 driver lifecycle 由 SDK 管理:open 時 enable,每次成
|
||||
|
||||
成功 read 後,不論 PCM 是送往播放、錄音或被丟棄,都必須正好 release 一次。
|
||||
|
||||
Video format 由 `GvfgGetVideoInfo()` 回報的原生輸入格式決定。GigabyteLib 沒有
|
||||
輸出格式切換 API,因此 GVFG 不提供格式 setter。
|
||||
`gvfg_set_channel_video_format()` 可在 stream 尚未開始或已 stop 時選擇 YUY2/Y210。
|
||||
目前 GigabyteLib 1.0.0 沒有對應 API,因此此功能由隔離的 driver extension 暫時補足。
|
||||
|
||||
### 查詢
|
||||
|
||||
|
||||
@@ -263,7 +263,21 @@ gvfg_status_t gvfg_get_channel_zero_copy_enabled(gvfg_handle handle, int channel
|
||||
呼叫 `gvfg_release_channel_frame()`,且每個 channel 同時最多持有一張 frame。
|
||||
- SDK 在 open 時 enable driver zero-copy,在 destroy/close 前 disable。
|
||||
|
||||
### 1.19 Audio capture selection and frame ownership
|
||||
### 1.19 `gvfg_set_channel_video_format`
|
||||
|
||||
```c
|
||||
gvfg_status_t gvfg_set_channel_video_format(gvfg_handle handle,
|
||||
int channel_index,
|
||||
gvfg_pixel_format_t format);
|
||||
```
|
||||
|
||||
- 支援 `GVFG_PIXFMT_YUY2` 與 `GVFG_PIXFMT_Y210`。
|
||||
- Channel 必須已 open,且 capture 必須尚未 start 或已 stop。
|
||||
- 目前透過隔離的 driver extension 寫入 output-format register;這是
|
||||
`GvfgSdk.lib 1.0.0` 尚未提供的功能。
|
||||
- 同一裝置 CH0、CH1 不可同時設定 Y210。
|
||||
|
||||
### 1.20 Audio capture selection and frame ownership
|
||||
|
||||
```c
|
||||
gvfg_status_t gvfg_set_channel_audio_enabled(gvfg_handle handle,
|
||||
|
||||
@@ -122,8 +122,10 @@ x64 `gvfg_frame_t` ABI 已在 `gvfg_capture.cpp` 以 static assertions 固定為
|
||||
|
||||
## GigabyteLib requirement
|
||||
|
||||
GVFG 不再保存或操作 private IOCTL、register offset 或 DMA request layout。
|
||||
Driver ABI 相容性由主管提供的 `GvfgSdk.lib` 負責。
|
||||
Capture、audio、event 與 frame ownership 的 driver ABI 由主管提供的
|
||||
`GvfgSdk.lib` 負責。例外只有 library 1.0.0 尚未提供的 output-format selection
|
||||
與 diagnostic register R/W;它們集中在 `gigabyte_driver_extensions.*`,不得擴大
|
||||
成第二套 capture backend。待主管補上正式 `Gvfg*` API 後應刪除此 extension。
|
||||
|
||||
目前原生格式:
|
||||
|
||||
@@ -159,7 +161,7 @@ non-blocking、有限 timeout 與 infinite wait;stop 透過 `eventCv` 喚醒 w
|
||||
|
||||
`gvfg_debug.h` 僅供內部工具,包含:
|
||||
|
||||
- `gvfg_debug_get_channel_stats()`:指定 channel 的 facade/backend state、
|
||||
- `gvfg_debug_get_channel_backend_stats()`:指定 channel 的 facade/backend state、
|
||||
captured/delivered frame、DMA error、IRQ、timeout、sequence 與 GetFrame timing。
|
||||
|
||||
客戶診斷使用 `gvfg_get_channel_signal_status()`、`gvfg_get_channel_runtime_info()`、event、
|
||||
|
||||
@@ -125,7 +125,7 @@ Debug 診斷會增加 log 與檢查成本,不應拿來判斷正式版本效能
|
||||
- signal status、runtime FPS 與 channel event。
|
||||
- GPU conversion:BGRA8、RGB10A2、NV12。
|
||||
- 公開詳細錯誤 API:`gvfg_get_channel_last_error_detail()`。
|
||||
- 內部 debug API:session stats、register read/write。
|
||||
- 內部 debug API:backend stats、register read/write。
|
||||
|
||||
目前 FPGA 的 8-bit format register 仍可能回報舊 `YVYU` 值;SDK 只把它當作 legacy register identifier,對外格式與實際 DMA layout一律是 YUY2(`Y0 U0 Y1 V0`)。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user