Commit Graph
100 Commits
Author SHA1 Message Date
Mark.lin f0beaff35f Add GPU text overlays and streamline SDK conversion paths
- add an internal DirectWrite/Direct2D OSD core for YUY2 and Y210 with configurable position, font size, RGB color, and up to 32 printable ASCII characters

- expose per-channel OSD set/clear APIs and blend only the visible overlay rectangle on the GPU while preserving the frame read/release contract and tracking native versus processed buffer ownership

- convert native YUY2/Y210 directly to BGRA8, RGB10A2, or NV12 with reusable output resources, avoiding unnecessary FP16 intermediates and scene copies

- draw native-size and reduced previews directly to the swapchain and allocate an FP16 intermediate only for enlarged previews while retaining the existing upload queue and format support

- bump the SDK version to 1.0.2, fix the installed customer API reference path, update conversion and OSD documentation, and remove the old 0922 SDK archive

Validation: git diff --cached --check passed before commit. No SDK rebuild or hardware runtime validation was performed in this commit pass.
2026-10-15 16:18:30 +08:00
Mark.lin b3aecf4c6d Finalize unified SDK exports and customer documentation
- remove the obsolete internal-export build switch so diagnostic symbols consistently use the single gvfg.dll export profile

- keep the standalone SDK version as one explicit string that supports release-candidate suffixes

- correct the public event polling documentation and reorganize the API reference and GigabyteLib gap notes under the customer documentation folder

- add the branded DOCX/PDF API reference, reproducible generation scripts, source archive, and supporting assets

- ignore generated Python bytecode from the documentation toolchain

Validation: git diff --cached --check passed before commit. No SDK rebuild or hardware runtime validation was performed in this commit pass.
2026-10-07 10:11:19 +08:00
Mark.lin 6c0990ea00 Use a single SDK export profile for all consumers 2026-10-02 22:12:25 +08:00
Mark.lin bf7be73457 Move Sample tools to shared sample repository and archive old packages 2026-10-02 09:39:36 +08:00
Mark.lin 90035bc5b8 Point sample packaging to shared branch checkout 2026-10-02 09:33:03 +08:00
Mark.lin 51991b82a0 Remove superseded standalone Qt sample 2026-10-02 09:17:50 +08:00
Mark.lin d17628981c Package manually built customer sample 2026-10-02 09:11:02 +08:00
Mark.lin 13ccadc0ea Update customer sample path after folder rename 2026-10-02 09:09:49 +08:00
Mark.lin a3cc2f7102 Add internal audio diagnostics and isolate customer SDK exports 2026-10-01 18:01:26 +08:00
Mark.lin 663804469f Move capture safeguards into the SDK
Compared with 0fc22a1:

- normalize public pixel-format values and keep release diagnostics backend-neutral

- enforce the cross-channel Y210 constraint in the SDK and simplify the customer-facing contract
2026-09-22 14:29:52 +08:00
Mark.lin 0fc22a1646 Refine backend status handling
Compared with 5ee2ee1:

- update the bundled GigabyteLib interface and binary, reset backend events across stream transitions, and wait for requested video format changes before reporting refreshed signal state

- translate private GigabyteLib results into stable public GVFG errors, including GVFG_EBUSY, while keeping vendor API names, enum values, and raw codes in internal diagnostics

- keep customer-facing error strings and detailed faults backend-neutral, and show the original library failure only in the Debug internal Sample

- update the public and internal error-handling documentation to match the new ownership boundary

Validation: git diff --check passed. The SDK MSVC Release build and Qt Sample MSVC Release and Debug builds completed successfully. Hardware behavior was not tested.
2026-09-22 10:15:49 +08:00
Mark.lin 5ee2ee12e6 Separate internal Sample diagnostics
Compared with 83be436:

- move private backend, DMA, delivery, startup, and frame timing diagnostics into a dedicated InternalDiagnostics module

- keep the capture controller independent from gvfg_debug.h and private backend baseline structures

- compile the diagnostics module and diagnostic signal path only for Debug builds

- keep Release builds free of diagnostic collection and aligned with the customer-facing capture flow

Validation: git diff --check passed. MSVC Release and Debug clean builds completed successfully, and the updated Sample behavior was tested on hardware.
2026-09-21 15:24:59 +08:00
Mark.lin 83be436e71 Extend preview formats and refine SDK internals
Compared with 55dfed7:

- add GRAY16, RGBA16, and native DICOM YBR_FULL_422 formats to the shared preview API with format-specific upload layouts

- add GPU shaders and FP16 conversion paths for high-precision grayscale, RGBA, and full-range DICOM YBR_FULL_422 rendering

- propagate source bit depth through the DICOM YBR conversion parameters and refresh cached shader parameters when it changes

- remove unnecessary const and mutable qualifiers from Gigabyte capture session operations that open channels or refresh cached device state

- package the Release SDK runtime DLLs with the Debug Sample and document the runtime selection policy

Validation: git diff --check passed. The full SDK build, DICOM sample matrix, and hardware runtime behavior were not rerun for this commit.
2026-09-21 14:47:27 +08:00
Mark.lin 55dfed73ec Update Qt Sample capture handling
- accept only the supported 48 kHz stereo 16-bit audio format

- preserve the last signal, SDI, preview, and audio information after Stop

- refresh signal and SDI state when channel Start times out

- retain the existing internal diagnostics and timing statistics

Validation: git diff --check passed. The MSVC Release gvfg_qt_preview build completed successfully, and the updated Sample behavior was tested on hardware.
2026-09-21 14:46:44 +08:00
Mark.lin 7fb0028ba6 Refine signal caching and Sample device lifecycle
Compared with 350e8e5:

- perform one fresh GigabyteLib signal query for each explicit channel Start and reject a no-lock request with GVFG_ETIMEOUT instead of entering a placeholder monitoring stream

- keep running signal-status reads on the SDK cache and synchronize format-change, input plug-in, and input unplug state before publishing the corresponding event

- invalidate cached video information when the output depth changes so format selection does not cause an extra immediate hardware read

- make the Qt Sample refresh SDI information after a successful Start and on signal events without polling it from the periodic status timer

- close the Sample device session after the final running channel stops or an idle Start path fails, while preserving the selected device for the next Start

- document the updated Start result, event/cache ordering, query boundaries, and Sample ownership policy across the public API and internal flow guides

Validation: git diff --check passed. The SDK and Qt Sample builds completed successfully during this change. Hardware no-signal, plug/unplug, dual-process handoff, and recording tests were not rerun for this commit.
2026-09-16 10:37:18 +08:00
Mark.lin 350e8e519c Streamline GigabyteLib capture control and diagnostics
Compared with d652f15:

- set the SDK release version to 1.0.0 for the new GigabyteLib backend and its required matching driver

- preserve GigabyteLib result codes and event names through the public SDK instead of translating vendor semantics

- expose cached Lib signal, SDI string fields, ErrorCount, and separate video/audio event counters for direct diagnostics

- serialize GigabyteLib capture calls and recover an active stream internally after a video input plugin event

- keep the SDK frame lifetime fence while following the current zero-copy contract without a vendor release call

- separate Sample logging and presentation counters from capture control, and report Lib-owned fields with explicit source names

- remove the manual Open Device control so Start lazily opens the selected device and revalidates VideoSignalLock once per request

- keep format selection side-effect free until Start opens the channel, then apply the selected output depth through GigabyteLib

- update the public API, diagnostics, architecture, error-handling, and build documentation for the simplified ownership model
2026-09-15 16:52:19 +08:00
Mark.lin d652f15369 Make capture metadata event-driven
Stop querying GigabyteLib video and audio information for every captured frame. Refresh cached video metadata at open, start, format changes, and signal events, and refresh audio metadata at stream start.

Ignore the vendor FrameCount fields as requested by the driver and library owner. Generate independent SDK delivery IDs for video and audio, reset them for every channel start, and document the new public frame_id semantics.

Clarify diagnostic ownership with LIB, SDK, and APP log prefixes. Add frame-only video and audio path counters, separate application and SDK failures, remove redundant byte and timeout counters, and keep vendor GetFrame timing tightly scoped to the actual API calls.

Update customer documentation and internal diagnostic text to match the event-driven metadata and SDK-owned frame IDs.
2026-09-15 10:04:59 +08:00
Mark.lin 268335bd40 Bump the GVFG SDK version to 0.3.0
Compared with 7082ebe:

- set the single public SDK version source to 0.3.0 in GVFG_SDK/CMakeLists.txt

- continue injecting PROJECT_VERSION into the gvfg DLL at build time

- keep the public header free of a duplicate compile-time version definition

- update API examples and the internal build guide to reference 0.3.0 and the correct CMake source
2026-09-14 16:50:18 +08:00
Mark.lin 7082ebed35 Update GigabyteLib to the vfg100 0914-b package
Compared with f5311e9:

- replace the vendored headers and x64 static library with supervisor package version 1.0.2

- record the corrected source location and SHA-256 checksum

- route YUY2 and Y210 selection through the now-linked GvfgSetVideoColorDepth API

- remove the output-format register fallback and the SDK-owned dual-Y210 restriction

- retain only diagnostic register read and write in the isolated driver extension

- document the undeclared GvfgGetAVStats binary symbol as an upstream header and ABI gap
2026-09-14 15:25:06 +08:00
Mark.lin f5311e9834 Expose GigabyteLib SDI value enums
Compared with a8fe173:

- publish SDK-owned mode, resolution, and frame-rate enums for gvfg_sdi_info_t

- type the public SDI fields with those enums while preserving GigabyteLib values

- keep customer code independent from the private vendor header

- document that applications use enum values for logic and the existing names for display
2026-09-14 15:02:33 +08:00
Mark.lin a8fe1739f8 Use all GigabyteLib frame metadata
Compared with 13aad44:

- size video buffers from GVFG_VIDEO_INFO.cbBufSize instead of recalculating them in the SDK

- expose the GigabyteLib video interface through channel signal status and display it in the Qt sample

- use GVFG_VIDEO_INFO.FrameCount and GVFG_AUDIO_INFO.FrameCount as the public frame identifiers

- expose all four formatted ST 352 payload descriptions returned by GvfgStringifySdiVideoInputInfo

- remove the redundant SDK-owned video and audio frame counters and the local frame-size helper

- update the customer and frame-flow documentation to identify the GigabyteLib metadata source
2026-09-14 14:51:47 +08:00
Mark.lin 13aad44361 Separate public runtime data from debug diagnostics
Compared with 90af75c:

- keep only application-facing capture FPS and delivered-frame count in gvfg_runtime_info_t

- move GigabyteLib frame-acquire timing exclusively to the internal debug statistics

- remove duplicated runtime, zero-copy, and last-frame fields from the debug structure

- remove synthetic backend DMA, interrupt, sequence, and capture counters not supplied by GigabyteLib

- retain uniquely useful wait, event, audio, frame-hold, and timing diagnostics plus register access

- update the Qt sample and documentation for the clarified ownership boundary
2026-09-14 14:31:13 +08:00
Mark.lin 90af75cdd1 Adopt the GigabyteLib parameter annotation style
Compared with 2a3ad7a:

- replace Microsoft SAL annotations in the public capture and debug headers with GVFG_PARAM_IN, GVFG_PARAM_OUT, and GVFG_PARAM_INOUT

- remove the explicit sal.h include and the non-MSVC SAL compatibility block

- guard the lightweight parameter macros so the public header can coexist with the supervisor-provided framework header

- include gvfgsdkapi.h first inside the private Gigabyte capture session to reuse the vendor definitions without redefinition warnings

- preserve every API signature, ABI layout, export, and runtime behavior
2026-09-14 12:23:10 +08:00
Mark.lin 2a3ad7aa6d Match the GigabyteLib event model
Compared with 82933f8:

- remove the public event-mask setter, getter, mask type, exports, and per-channel mask state

- always register and forward the complete event set created by GvfgCreateEvents

- keep audio enablement as the only event-creation choice exposed to applications

- preserve event polling, signal recovery, format notifications, capture, format switching, zero-copy, and register access

- update customer and architecture documentation to remove the obsolete event-mask controls
2026-09-14 12:16:53 +08:00
Mark.lin 82933f8967 Expose the remaining GigabyteLib queries
Compared with aac4edd:

- expose optional device capability and SDI detail queries through the public GVFG API

- use GvfgGetDevInfo only when an application requests device capabilities

- use GvfgGetSdiVideoInputInfo and GvfgStringifySdiVideoInputInfo only when an application requests SDI details

- return both native SDI values and the vendor-formatted mode, resolution, frame-rate, and scan strings

- source the device interface GUID directly from the supervisor-provided gvfgsdkapi.h

- preserve the existing capture path and all previous public exports
2026-09-14 10:59:37 +08:00
Mark.lin aac4eddaf7 Remove the redundant Gigabyte type layer
Compared with 9bc38c4:

- delete the duplicate gigabyte_types.h status, frame, signal, format, event, and debug model

- let GigabyteCaptureSession use the stable public gvfg types and status codes directly

- replace the one-field shared connection wrapper with the selected device interface path

- keep frame-token validation in the public session while the Gigabyte session owns only the vendor frame hold

- fill the existing debug statistics structure directly instead of translating duplicate structures

- preserve all capture, audio, event, zero-copy, GPU conversion, format-switch, and register-access APIs
2026-09-14 10:49:42 +08:00
Mark.lin 9bc38c4862 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.
2026-09-14 10:22:09 +08:00
Mark.lin a04bd611f9 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.
2026-09-14 10:05:54 +08:00
Mark.lin 0af70a59ca Replace the legacy backend with GigabyteLib
Compared with 5f74655:

- Preserve the public gvfg C API while replacing the direct PCIE S2MM register, IOCTL, and giga_ioctl.dll implementation with a per-channel adapter around the supervisor-provided GvfgSdk.lib API.

- Route device open, event creation, video/audio capture, copy and zero-copy frame delivery, zero-copy release, signal metadata, and stream teardown through GigabyteLib while retaining the existing facade ownership and timeout contracts.

- Remove the obsolete giga_ioctl target and legacy register/video-format backend files, and stop requiring or packaging giga_ioctl.dll in the Qt sample and customer archives.

- Vendor the matched GigabyteLib 1.0.0 headers and static library with provenance and checksum documentation, and update build, architecture, frame-flow, and customer deployment documentation for the new boundary.

- Keep gvfg_set_channel_video_format source-compatible, but report GVFG_ENOTSUP when the connected native input format differs because the supplied GigabyteLib API does not expose output-format conversion. Direct debug register reads and writes are likewise unsupported by this backend.

Validation: git diff --cached --check passed. MSVC x64 Release and Debug gvfg.dll builds passed, the Release Qt sample linked successfully, dumpbin confirmed gvfg.dll has no giga_ioctl.dll dependency and retains all 32 public exports, and the Release package script produced an archive without giga_ioctl.dll or private GigabyteLib files. No runtime capture, audio, zero-copy, hot-plug, dual-channel, device shutdown, MinGW, or hardware validation was run.
2026-09-14 09:46:37 +08:00
Mark.lin 5f74655b51 Refresh the native preview window handle
Compared with cde6c89:

- Refresh the controller preview target immediately after the Qt preview window is shown during capture startup.

- Refresh the target again after normal or fullscreen preview presentation before attaching the D3D preview renderer.

- Restore the pre-refactor behavior of obtaining the current native window handle at each preview attachment instead of relying on the handle captured during MainWindow construction.

Validation: git diff --cached --check passed. MSVC Release compilation completed, but final linking could not replace gvfg_qt_preview.exe because the currently running sample process held the output file open (LNK1104). No runtime preview, capture, audio playback, device-event, shutdown, MinGW, or hardware validation was run.
2026-09-11 17:38:29 +08:00
Mark.lin cde6c89a83 Use one Release SDK build for Qt samples
Compared with 8282724:

- Replace configuration-dependent SDK build discovery with one explicit GVFG_SDK_RELEASE_DIR used by every Qt sample configuration.

- Default the SDK Release directory to the existing Qt Creator MSVC Release build, which contains the shared runtime DLLs plus both MSVC and MinGW import libraries.

- Keep MSVC and MinGW sample builds selecting only their corresponding import-library filename while loading the same Release gvfg, gvfg_preview, and giga_ioctl DLLs.

- Simplify the documented internal workflow to Release SDK and Release sample builds, leaving customer-package filtering and internal/public artifact separation for the release stage.

Validation: git diff --cached --check passed. CMake configure completed for MSVC Release and MinGW Release samples against the same existing SDK Release directory. No compilation, linking, runtime launch, capture, audio playback, device-event, shutdown, or hardware validation was run.
2026-09-11 17:32:27 +08:00
Mark.lin 8282724e47 Simplify Qt sample controller boundaries
Compared with 57ad00c:

- Remove the redundant GvfgClient and gvfg_api forwarding layer so the sample calls the public GVFG capture and preview C APIs directly from CaptureController.

- Keep MainWindow limited to widget state, user actions, preview-window presentation, and option synchronization while CaptureController continues to own device, channel, worker, delivery, and logging state.

- Restore the f612cfd customer-visible behavior for hidden CH1 status, Y210 option tooltips, startup log-path reporting, contextual preview errors, timestamped error logging, and zero-copy option status synchronization.

- Preserve the requested device-name number suffixes, MinGW consumer support, video frame release handling, audio read-copy-release queue, QAudioSink playback-thread ownership, delivery accounting, and diagnostic output.

- Destroy and disconnect CaptureController while MainWindow and its UI are still valid, preventing destructor-time callbacks from reaching an object whose derived destructor has completed.

- Use supported QString multi-argument formatting to satisfy clazy without mixing numeric arguments into QString-only overloads.

Validation: git diff --cached --check and focused source/API parity inspection against f612cfd passed. No configure, build, runtime launch, capture, audio playback, device-event, shutdown, or hardware validation was run.
2026-09-11 16:32:58 +08:00
Mark.lin 57ad00c40e Separate Qt capture control from the UI
Compared with 1214e72:

- Move device discovery, channel lifecycle, signal monitoring, frame delivery, preview submission, runtime logging, and shutdown coordination from MainWindow into a dedicated CaptureController.

- Add a GvfgClient RAII wrapper and gvfg_api namespace so one application module owns all direct calls to the public capture and preview C APIs.

- Keep MainWindow focused on widget creation, user actions, option synchronization, preview-window presentation, and UI state updates through controller signals.

- Preserve per-channel video workers, exact frame release handling, preview delivery accounting, startup timing, signal recovery, and diagnostic reporting while removing their implementation details from the UI class.

- Preserve the audio read-copy-release path, bounded playback queue, playback-thread QAudioSink ownership, recovery behavior, and byte/frame accounting inside the controller.

- Register the new source files in the standalone Qt sample target and document the resulting UI, capture-control, and API-adapter source boundaries.

Validation: git diff --cached --check passed before commit. No build, runtime launch, capture, audio playback, device-event, shutdown, or hardware validation was run.
2026-09-11 16:03:26 +08:00
Mark.lin 1214e720d2 Support MSVC and MinGW SDK consumers
Compared with dc08a95:

- Add explicit module-definition files for the capture and preview DLLs so their public C export names remain stable and can be consumed without compiler-specific C++ symbol conventions.

- Keep the SDK implementation built with MSVC while automatically using MinGW dlltool to generate libgvfg.dll.a and libgvfg_preview.dll.a alongside the existing MSVC import libraries.

- Make the public capture header portable by including SAL only under MSVC and defining no-op annotations required by non-MSVC C and C++ compilers.

- Replace the Qt sample's compiler-specific wait on std::thread::native_handle() with an explicit atomic worker-completion state while preserving synchronous window-message servicing during shutdown.

- Document that MSVC and MinGW consumers use different import libraries while loading the same gvfg.dll and gvfg_preview.dll at runtime.

Validation: MSVC Debug and Release SDK builds passed and produced both MSVC and MinGW import libraries. Qt MSVC Debug, Qt MinGW Debug, and Qt MinGW Release sample builds and links passed. MinGW C and C++ public-header syntax checks passed, the MinGW executable import table references the expected GVFG DLLs and C exports, and git diff --check passed. No runtime launch, capture, audio playback, clean-machine deployment, or hardware validation was run.
2026-09-11 14:52:24 +08:00
Mark.lin dc08a953fa Add stable suffixes to enumerated device names
Compared with cae4a04:

- Append a one-based numeric suffix to every device name returned by gvfg_enumerate_devices so otherwise identical capture devices remain distinguishable in upper-layer selectors.

- Truncate the original display name when necessary so the suffix and null terminator always fit within the fixed public name buffer.

- Preserve the existing fallback name and device enumeration count behavior.

Validation: git diff --check and focused source inspection passed. No configure, build, runtime enumeration, capture, or hardware validation was run for this change.
2026-09-11 13:30:49 +08:00
Mark.lin cae4a04612 Separate the SDK and Qt sample build projects
Compared with f612cfd:

- Move the capture SDK, private IOCTL wrapper, and optional preview helper under GVFG_SDK with an independent top-level CMake project and version source.

- Move the Qt preview application into GVFG_Qt_Sample and consume prebuilt SDK DLLs and compiler-specific import libraries through imported CMake targets instead of compiling SDK sources as subdirectories.

- Resolve Qt Creator configuration-specific SDK build directories automatically, copy the three runtime DLLs beside the sample executable, and keep missing MSVC or MinGW artifacts as explicit configure errors.

- Update Release and Debug packaging scripts to read SDK and sample outputs separately, and update the repository build instructions for the two-project workflow.

- Preserve the pre-existing uncommitted device display-name suffix change outside this commit.

Validation: independent MSVC SDK configure/build and independent Qt MSVC sample configure/build passed; the sample build graph contains no SDK implementation sources; git diff --check passed. No MinGW link, runtime launch, capture, audio playback, or hardware validation was run.
2026-09-11 13:28:56 +08:00
Mark.lin f612cfd11b Show received audio frames and remove unused sample state
Compared with cdd2f8a:

- Show the number of audio frames successfully returned to the Qt sample directly on the normal Audio status line, making the count available in Release as well as Debug builds.

- Keep the detailed audio event and byte-flow diagnostics Debug-only while reusing the received-frame count for the SDK-to-APP diagnostic boundary.

- Remove write-only audio playback counters, queue-drop metadata, read/write gap maxima, and the unused audio packet ID field without changing the byte-accounting safeguards.

- Remove the unused preview-call timing accumulators and stored values while preserving Read timing, Driver GetFrame timing, startup latency, delivery accounting, and failure recovery.

Validation: git diff --check and focused source/reference inspection passed. No configure, build, runtime capture, audio playback, or hardware validation was run.
2026-09-10 14:23:26 +08:00
Mark.lin cdd2f8a75b Release SDK 0.2.1 with unplug-safe zero-copy handling
Compared with SDK 0.2.0 (3cd7fbbb):

- Handle the zero-copy release race where the driver clears frame ownership before the SDK receives the unplug event. Wait up to 100 ms only after ERROR_BAD_COMMAND, accept the release as revoked only after a confirmed disconnect, and preserve all other release failures.

- Apply the same confirmed-unplug handling to normal frame release and pending-frame teardown without adding latency to successful per-frame releases.

- Add Debug-only audio event, frame, and byte counters across the Driver-to-SDK, SDK-to-APP, and APP-to-output boundaries, and show the concise totals in the internal diagnostic sample.

- Rename Release and Debug customer packages to the requested GVFG_Sample labels, use minute-resolution timestamps, and derive the package suffix from the root CMake project version.

- Bump the standalone SDK version to 0.2.1 and synchronize the public API examples and internal build guide.

Validation: git diff --check and focused source/diff inspection passed. No build, package generation, runtime capture, unplug stress test, or hardware validation was run.
2026-09-10 11:36:17 +08:00
Mark.lin 3cd7fbbb3f Expose common delivery timestamps for A/V sync
Compared with 7e5d3d2:

- Add monotonic timestamp_ns fields to public video and audio frame tokens so applications can compare delivery timing in one SDK clock domain.

- Stamp video delivery in the PCIe backend and audio delivery in the GVFG facade while preserving complete read/release token validation.

- Update x64 ABI assertions and bump the standalone SDK version to 0.2.0 for the public frame-structure change.

- Document timestamp semantics and limitations across the README, customer API references, internal ABI notes, and build guidance.

- Leave the standalone preview sample behavior unchanged; timestamp-based synchronization remains an application policy.

Validation: git diff --check and focused source inspection passed; no build, ABI consumer rebuild, recording, or hardware capture validation was run.
2026-09-08 15:20:40 +08:00
Mark.lin 7e5d3d2cca Recover monitoring audio without stopping capture
Compared with 8cde31f:

- Keep transient zero-byte QAudioSink writes retryable while detecting two seconds of continuous no-progress as a playback stall.

- Rebuild only the monitoring QAudioSink after write failure, output-device loss, or sustained backpressure instead of stopping the channel capture.

- Drop stale queued monitoring PCM before recovery and reacquire the current default audio output on bounded retry intervals.

- Preserve video capture, audio acquisition, SDK frame ownership, and stop-time worker wakeups while playback recovers independently.

- Update the README and customer API guidance to document playback isolation and recovery responsibilities.

Validation: git diff --check and focused source inspection passed; no build, audio-device removal, or hardware capture validation was run.
2026-09-08 14:05:58 +08:00
Mark.lin 8cde31feaf Harden GVFG signal recovery and preview lifecycle
Compared with d03f064:

- Pause the sample video and audio readers after signal disconnect events and resume them only after reconnect or stream-ready notification.

- Serialize plug, unplug, and format transitions against active reads and held zero-copy frames while keeping stop and close able to interrupt lifecycle waits.

- Treat ERROR_BAD_COMMAND as unplug-revoked zero-copy ownership only after the backend has confirmed signal loss, while preserving all other release failures for retry and diagnosis.

- Stop submitting frames when the user closes an independent preview window, account those frames as intentionally skipped, and resume submission when preview is reopened.

- Emit UTF-16 Windows debug output so localized Win32 error messages remain readable in Qt and debugger output.

- Add startup and first-frame timing diagnostics, reduce routine stream-ready logging, and update public and internal documentation for the new disconnect and ownership behavior.

Validation: git diff --check and focused symbol/document consistency searches passed; no build or hardware validation was run.
2026-09-08 12:20:39 +08:00
Mark.lin d03f064b4f Refine GVFG preview pacing and error reporting
- Replace non-blocking Present retries with Present(0, 0), allowing DXGI to
  wait for presentation dependencies on the dedicated preview worker.
- Change preview admission from newest-frame replacement to bounded FIFO
  delivery with three pending/upload reservations and one presenting slot.
- Expire queued preview frames after 50 ms before GPU processing and skip new
  preview submissions only when the bounded slot capacity is full.
- Track queue order and queue age without retaining SDK-owned frame memory;
  capture continues releasing each SDK frame after the synchronous upload.
- Service only synchronous Windows sent messages while waiting for preview
  mutexes, worker shutdown, idle drain, and capture-thread join to avoid an
  HWND-owner/DXGI deadlock without dispatching queued application callbacks.
- Preserve internal preview pacing and audio queue counters while removing
  expected busy, expired, and audio-eviction reports from the normal UI log.
- Reserve delivery error logs for preview/render failures, video or audio
  frame-ID anomalies, audio write failures, and final accounting mismatches.
- Remove the normal stop summary and the audio queue-drop field from the
  status display so expected pacing adjustments are not presented as faults.
- Update the public preview comments and diagnostic documentation for the FIFO
  capacity, queue-age boundary, blocking Present behavior, and log policy.
- Keep the capture SDK, driver interfaces, frame ownership, GPU conversion
  precision, and public delivery-statistics structure unchanged.

Validation:
- User testing reported approximately 18% GPU utilization for one 1920x1080
  Y210 10-bit preview channel. This was not independently benchmarked.
- A user-provided long-run log contained 13,715,695 received video frames with
  no preview render failures; periodic preview skips matched the confirmed
  60.000 FPS versus 59.94 Hz pacing difference.
- The same log showed periodic audio playback-queue eviction without audio
  frame-ID gaps or write failures; this is retained as internal diagnostic
  accounting rather than reported as a source-delivery error.
- Static source review and git diff --check passed. No application, shader, or
  driver build was performed by the agent, and runtime deadlock behavior has
  not been independently reproduced or validated.
2026-09-07 10:28:03 +08:00
Mark.lin 29b449fc6e Optimize GVFG GPU preview and clarify delivery diagnostics
- Render preview directly from the FP16 conversion target into the selected
  8-bit or 10-bit swapchain, removing the full-frame scene copy and the
  intermediate BGRA8 preview pass without capture-frame decimation.
- Simplify neutral YUY2/Y210 shaders to one packed texture load per pixel;
  preserve BT.709 conversion, 10-bit unpacking and odd-width chroma handling.
- Cache shader resource views per upload slot and update constant-buffer
  contents only when source dimensions change.
- Allocate only preview resources and skip export-only shader compilation
  for preview; retain the full BGRA8/RGB10A2/NV12 buffer conversion path.
- Unbind render targets before swapchain resize/release and serialize preview
  configuration and resource changes with GPU rendering.
- Bound startup Present retries and retry presentation without redrawing;
  retain actual skipped-frame counts when presentation remains busy.
- Add preview delivery counters for presented, replaced, busy, failed,
  cancelled and pending frames, including busy source and affected frame ID.
- Fix an uncounted pending-frame replacement and drain pending preview work
  at Stop and before a new run to keep per-run accounting separate.
- Track application audio delivery, dropped duration, read/write stalls and
  frame-ID anomalies while retaining the original 10-block audio queue.
- Stop the channel on audio write failure or two seconds of zero-write
  progress; distinguish cancelled data from runtime drops.
- Keep the existing compact UI; aggregate delivery issue logs at most once
  per five seconds and emit a stop summary with accounting errors only.
- Document diagnostic interpretation, GPU changes and validation boundaries.

Validation:
- User testing reported approximately 15% lower GPU utilization after the
  optimization. Baseline/final readings and relative versus percentage-point
  interpretation were not supplied; no independent benchmark was performed.
- Static source checks and git diff --check passed. No application or shader
  build was performed by the agent; 10-bit startup resolution and long-run
  zero-loss behavior have not been confirmed.
- Rebuild the preview DLL with its matching APP; the SDK GPU buffer converter
  also shares the modified shader source. Capture APIs and driver are unchanged.
2026-09-04 16:02:33 +08:00
Mark.lin 2b62a85912 Improve GVFG audio playback and event shutdown
- Split PCM acquisition from Qt audio playback in the preview sample.
- Copy SDK-owned audio frames into a bounded application queue before release.
- Track and display dropped audio queue entries.
- Add a dedicated stop event for the SDK event-monitor thread.
- Replace periodic event-monitor wakeups with an interruptible infinite wait.
- Poll public channel events every 200 ms for responsive format and signal updates.
- Preserve finite 200 ms video and audio reads for ownership-safe worker shutdown.
2026-09-03 18:34:39 +08:00
Mark.lin 29444470db Keep unsupported channel 1 UI hidden
Move the channel 1 visibility gate to shared scope and skip channel 1 signal refresh while its UI is disabled, keeping the temporary restriction consistent across UI updates.
2026-09-01 17:10:25 +08:00
Mark.lin bfc598ed4d Redesign audio capture around frame ownership
- Remove the public stream-mask and caller-buffer audio APIs.
- Add explicit audio enable, format query, and frame read/release APIs.
- Move PCM buffer ownership into the SDK.
- Allow each channel to hold at most one audio frame at a time.
- Validate the complete audio frame token during release.
- Reset the audio frame ID when capture starts.
- Invalidate any held audio frame when capture stops.
- Migrate the Qt preview sample to the new audio frame API.
- Update the README, Customer API guide, API Reference, and giga_ioctl boundary documentation.
2026-09-01 17:10:25 +08:00
Mark.lin 3f905d8a09 Add CH0 audio capture and customer runtime diagnostics
Extend the internal driver ABI and public GVFG API for combined CH0 video/audio capture, PCM format discovery, blocking copy-out reads, extra-frame wake events, and coordinated teardown of video and audio readers.

Update the Qt sample with optional CH0 audio playback on a dedicated thread, customer-visible copy/zero-copy timing telemetry, mutually exclusive CH0/CH1 Y210 selection, and a refresh-safe temporary hide for the unsupported CH1 panel.

Harden Win32 error text conversion, document the new stream and ownership contracts, and package giga_ioctl plus the VC143 runtime in customer Debug/Release bundles.

Validation: git diff --check passed before commit. No build, package execution, runtime, audio-device, or capture-hardware test was run.
2026-09-01 12:26:27 +08:00
Mark.lin 226369df0e Add independent dual-channel preview controls
Compared with f380a8a:

- Let CH0 and CH1 open, start, stop, and preview independently while sharing one device connection.

- Give each channel its own capture worker, preview window, frame ownership, runtime status, and failure reporting.

- Expose channel-indexed zero-copy selection to match the driver IOCTL contract and keep output format selection independent per channel.

- Prevent immediate timeout responses from hot-looping and flooding the Qt event queue.

- Align the CH0 and CH1 controls in equal-width channel panels and update the public and internal documentation.

Validation: Qt uic parsing and git diff --check passed; no build or hardware validation was run.
2026-08-27 17:13:22 +08:00
Mark.lin f380a8a143 Simplify dual-channel capture and error handling
Compared with b5b045a:

- Model CH0 and CH1 as independent channel sessions sharing one device connection.

- Keep one outstanding frame per channel and tighten read/release ownership validation.

- Unify facade and PCIES2MM diagnostic details in a per-channel ChannelErrorState.

- Treat polling timeouts and stop wakeups as expected control flow instead of persistent faults.

- Report detailed errors only when an API operation actually fails.

- Remove obsolete preview timing/error diagnostics and the redundant debug error API.

- Refresh the public and internal API references, architecture diagrams, and learning guides.
2026-08-27 11:10:51 +08:00
Mark.lin b5b045a41a Refine giga_ioctl DLL boundary
Keep giga_ioctl as an independently maintained driver ABI DLL while simplifying its implementation around shared DeviceIoControl helpers and named request layouts.

Preserve the existing C exports, IOCTL values, GetLastError behavior, and GVFG capture ownership. Add concise maintainer guidance and document that capture state remains outside this module.

Validation: MSVC Release giga_ioctl target built successfully; dumpbin confirmed all 10 exports; git diff --check passed.
2026-08-25 09:40:00 +08:00