Commit Graph
3 Commits
Author SHA1 Message Date
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 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