Commit Graph
29 Commits
Author SHA1 Message Date
Mark.lin 1574e90b49 Refactor GVFG channel and driver access flow
- support only the new vfg100_0821c driver; legacy drivers and IOCTL contracts are intentionally unsupported
- use one SDK handle per physical device with independent CH0/CH1 sessions and selectable event masks
- expose Device Manager friendly names and remove redundant enumerated device indices
- align active capture IOCTLs with the new driver while omitting unsupported OPEN_VIDEO/CLOSE_VIDEO calls
- isolate IOCTL codes, request layouts, and DeviceIoControl calls in the new giga_ioctl DLL
- block reads of pure write-only registers while preserving dual-semantics interrupt status reads
- reduce duplicate signal register queries during open/start
- add zero-copy/copy driver GetFrame timing in microseconds and show it in the preview status
- update public/internal documentation for the revised lifecycle and channel APIs

Validation: static searches and git diff --check only; build intentionally not run.
2026-08-21 17:52:04 +08:00
Mark.lin 024df690c3 Fix zero-copy frame lifecycle
Enable zero-copy through the public API before opening the device and configure a driver-owned zero-copy ring slot.

Return every delivered frame through IOCTL_GIGA_RELEASE_VIDEO_FRAME and validate the complete frame token before release.

Preserve ownership when the release IOCTL fails so stop, close, or the next start can retry instead of discarding the driver pointer.

Stop DMA and join the backend acquire/event thread before draining frames, preventing acquire from racing stop or disable.

Drain caller-held, ready, unread, and pending zero-copy frames before stop, restart, disable, device close, or process destruction.

Block restart and zero-copy disable when outstanding frames cannot be released successfully.

Release unread frames on signal unplug and before format or resolution changes rebuild the frame ring.

Propagate stop and release errors through the public API and report release failures in the standalone preview.

Document zero-copy ownership, lifecycle requirements, diagnostics, and data flow.

Verified with Standalone Debug and Release builds.
2026-08-19 15:34:37 +08:00
Mark.lin 61da467d83 Update GVFG for new driver capture flow
Use driver-managed video start/stop IOCTLs and request completed frames with MAXULONG instead of querying the done index. Add 300-frame timing statistics, lock format changes during GVFG streaming, and clear stale preview frames to black on signal loss. Document that this SDK revision requires the new PCIE S2MM driver.
2026-08-18 15:45:00 +08:00
Mark.lin d7500ed9fd feat(gvfg): add event-driven signal and format control
Expose gvfg_set_video_format() so applications select YUY2 or Y210 through the SDK while the backend temporarily writes absolute register 0x80 (0=YUY2, 1=Y210).

Define RX mode/timing lock registers and treat the input as connected only when both lock values equal one. Keep plug/unplug/format monitoring active for the complete open-channel lifetime, cache signal metadata, and avoid unnecessary resolution/format register queries.

Keep the driver-compatible GET_VIDEO_DONE_INDEX then GET_FRAME sequence, reject repeated consecutive DMA done indexes, and calculate capture FPS over a one-second delivery window instead of adjacent-frame timing.

Update the standalone Qt sample with YUY2/Y210 selection, event-driven signal state, no-signal Start blocking, streamlined diagnostics, and monitoring that remains active while capture is stopped.

Validation: Release builds completed for the Visual Studio and Qt Creator build trees; the Qt Creator DLL relink requires the consuming viewer to be closed when it is running.
2026-08-14 16:36:38 +08:00
Mark.lin 17fb9bfabd feat: align GVFG output with YUY2
- expose YUY2 across the public API, preview helper, backend, and GPU conversion paths while translating the legacy FPGA format value internally
- correct YUY2 chroma byte interpretation and update customer/internal documentation
- centralize the Standalone SDK version and expose it through gvfg_get_version
- show the SDK version in the sample and enable preview-window controls only after the first valid frame
- close and disable external preview windows when capture stops
2026-08-13 16:14:16 +08:00
Mark.lin a5b86e5872 Decouple preview presentation from capture 2026-08-13 13:55:03 +08:00
Mark.lin bab59efcb5 Diagnose preview stalls and FIFO frame loss
- add detailed FIFO loss and frame-hold timing diagnostics
- report slow preview calls and per-stage GPU timing
- reduce redundant preview pipeline and DXGI setup work
- move preview performance metrics into the sample status display
- avoid duplicate frame-loss warnings
2026-08-13 10:49:09 +08:00
Mark.lin aad8419c2a Improve capture startup, frame loss reporting, and preview diagnostics
- defer DMA capture until the first frame reader is waiting
- deliver FIFO frames in sequence order and overwrite the oldest unread frame
  when the three-slot FIFO is full
- report known frame loss through GVFG_EVENT_FRAME_LOSS and runtime statistics
- replace the enum-only event API with the extensible gvfg_event_t structure
- expose per-handle public error details
- add preview GPU resource preparation before capture starts
- move GPU preview timing from periodic logs to the status display
- remove the redundant stream descriptor channel field
- reorganize customer and internal documentation
- add a complete customer API reference
2026-08-12 17:30:56 +08:00
Mark.lin 3309f822ec Integrate GPU conversion and update capture pipeline 2026-08-06 10:03:32 +08:00
Mark.lin 175cd83043 Add GPU preview frame timing 2026-08-04 10:33:35 +08:00
Mark.lin 6bc7dd6815 Simplify frame layout metadata 2026-07-31 13:59:43 +08:00
Mark.lin 2b5e75ade9 Simplify GVFG API and frame diagnostics 2026-07-30 16:43:30 +08:00
Mark.lin 9124930e98 Remove obsolete capture pause events 2026-07-29 15:52:51 +08:00
Mark.lin d9f194c1ab Refine GVFG capture API 2026-07-28 17:38:44 +08:00
Mark.lin 5662d74df9 feat: separate customer and internal diagnostics 2026-07-27 14:49:57 +08:00
Mark.lin 747209fa87 feat: harden capture API and preview diagnostics 2026-07-27 11:10:59 +08:00
Mark.lin 2b2eeb7302 refactor: simplify PCIES2MM capture backend 2026-07-23 08:54:43 +08:00
Mark.lin 8914281d2e feat: migrate CaptureDemo capture flow into SDK 2026-07-22 09:23:26 +08:00
Mark.lin 634c02b1f6 refactor: make preview helper standalone
Define a preview-owned frame descriptor with explicit row stride, remove the runtime dependency on gvfg.dll, and update CaptureDemo and the Qt sample to use the standalone API.
2026-07-21 09:09:43 +08:00
Mark.lin 9639a797aa Rename backend to PCIES2MM and handle events 2026-07-13 16:56:03 +08:00
Mark.lin f21c0b651f refactor(qt-preview): clarify debug status output
- Reformat debug status into readable Input/App/Capture/Flow/Buffer sections
- Collapse duplicated frame counters into flow and buffer summaries
- Replace low-level names like held_slot and wait_timeout with clearer labels
- Include backend last-error details when available
- Prefix each line of multiline log snapshots consistently
2026-07-02 09:59:20 +08:00
Mark.lin 92b5fb1464 Add backend diagnostics for capture stalls
- add rotating XDMA backend and Qt preview logs
- expose IRQ, DMA, ring, and delivery debug state
- record IRQ wait heartbeats and register state
- make XDMA tracing configurable through CMake
- prevent preview status queries from blocking rendering
- recover from D3D swapchain and Present failures
- add debug API struct size validation
- avoid stale MainWindow object-size stack corruption
2026-06-18 10:24:34 +08:00
Mark.lin d2657a69cb Split GVFG customer API and preview helper
Refactor GVFG into a pull-based customer API with internal debug diagnostics in gvfg_debug.h. Move preview rendering into the separate gvfg_preview helper DLL and update the Qt sample to link it explicitly. Clean legacy callback/preview docs and removed SDK-internal render/log helper sources from the core GVFG DLL.
2026-06-15 17:06:12 +08:00
Mark.lin 97971e6242 Refactor SDK to pure pull-based capture API
- Remove customer-facing SDK preview APIs and preview structs
- Strip D3D preview/render pipeline from gvfg.dll
- Keep gvfg.dll focused on capture, frame ownership, runtime status, and events
- Move Qt preview rendering into sample-owned private renderer
- Update Qt preview sample to render frames after gvfg_read_frame()
- Refresh customer API docs around read_frame/release_frame/poll_event flow
- Update architecture notes to mark preview as app/internal-tool code
2026-06-15 14:03:21 +08:00
Mark.lin 6120a6b74f Refine GVFG customer API surface 2026-06-11 10:25:50 +08:00
Mark.lin 7918b79480 Simplify XDMA types and add fullscreen preview 2026-06-09 17:41:06 +08:00
Mark.lin 739d1fcf32 Deliver native callback frames 2026-06-09 16:05:27 +08:00
Mark.lin 31ace3693f Refine signal status API layout 2026-06-09 15:02:05 +08:00
Mark.lin 53378c6495 Initial standalone GVFG SDK 2026-06-09 10:02:10 +08:00