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.
This commit is contained in:
Mark.lin
2026-09-11 14:52:24 +08:00
parent dc08a953fa
commit 1214e720d2
9 changed files with 133 additions and 2 deletions
@@ -0,0 +1,15 @@
LIBRARY gvfg_preview
EXPORTS
gvfg_preview_get_delivery_stats
gvfg_preview_wait_idle
gvfg_preview_create
gvfg_preview_destroy
gvfg_preview_attach_window
gvfg_preview_prepare
gvfg_preview_render_frame
gvfg_preview_clear
gvfg_preview_get_info
gvfg_preview_get_stats
gvfg_preview_shutdown
gvfg_preview_strerror