Files
GVFG_Standalone/docs/GVFG_ARCHITECTURE_OVERVIEW.drawio
T
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

112 lines
10 KiB
Plaintext

<mxfile host="Electron" modified="2026-07-30T00:00:00.000Z">
<diagram id="gvfg-architecture-overview" name="Architecture Overview">
<mxGraphModel dx="1230" dy="1558" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1280" pageHeight="820" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="e2" edge="1" parent="1" source="customerApp" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;" target="publicHeader" value="include / link">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="title" parent="1" style="text;html=1;strokeColor=none;fillColor=none;fontSize=24;fontStyle=1;align=left;verticalAlign=middle;" value="GVFG Standalone SDK - Code Scope Overview" vertex="1">
<mxGeometry height="38" width="720" x="40" y="-38" as="geometry" />
</mxCell>
<mxCell id="appLayer" parent="1" style="swimlane;html=1;startSize=34;horizontal=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;align=left;" value="1. Top App / Sample" vertex="1">
<mxGeometry height="120" width="1180" x="40" y="40" as="geometry" />
</mxCell>
<mxCell id="apiLayer" parent="1" style="swimlane;html=1;startSize=34;horizontal=1;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;align=left;" value="2. Public API / gvfg.dll" vertex="1">
<mxGeometry height="230" width="1180" x="50" y="230" as="geometry" />
</mxCell>
<mxCell id="render" parent="appLayer" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#ffffff;strokeColor=#6c8ebf;fontSize=14;" value="helpers/gvfg_preview&lt;br&gt;optional gvfg_preview.dll" vertex="1">
<mxGeometry height="58" width="330" x="820" y="45" as="geometry" />
</mxCell>
<mxCell id="publicHeader" parent="apiLayer" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#ffffff;strokeColor=#82b366;fontSize=14;" value="sdk/gvfg/include/gvfg_capture.h&lt;br&gt;customer-facing C API" vertex="1">
<mxGeometry height="58" width="280" x="450" y="50" as="geometry" />
</mxCell>
<mxCell id="gpuConvert" parent="apiLayer" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#ffffff;strokeColor=#82b366;fontSize=14;" value="sdk/gvfg/src/gpu&lt;br&gt;D3D11 YUY2/Y210 conversion&lt;br&gt;BGRA8 / RGB10A2 readback" vertex="1">
<mxGeometry height="72" width="300" x="820" y="45" as="geometry" />
</mxCell>
<mxCell id="backendLayer" parent="1" style="swimlane;html=1;startSize=34;horizontal=1;fillColor=#fff2cc;strokeColor=#d6b656;fontStyle=1;align=left;" value="3. SDK Internal Backend / Data Flow" vertex="1">
<mxGeometry height="275" width="1180" x="50" y="515" as="geometry">
<mxRectangle height="34" width="240" x="50" y="515" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="backendTypes" parent="backendLayer" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#ffffff;strokeColor=#d6b656;fontSize=14;" value="GigabyteLib backend adapter&lt;br&gt;per-channel context / Windows HANDLE&lt;br&gt;GvfgSdk.lib" vertex="1">
<mxGeometry height="58" width="285" x="30" y="95" as="geometry" />
</mxCell>
<mxCell id="workers" parent="backendLayer" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#ffffff;strokeColor=#d6b656;fontSize=14;" value="per-channel workers&lt;br&gt;caller read thread waits DMA&lt;br&gt;event thread waits format / plug events" vertex="1">
<mxGeometry height="52" width="280" x="510" y="173" as="geometry" />
</mxCell>
<mxCell id="pcies2mmSession" parent="backendLayer" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#ffffff;strokeColor=#d6b656;fontSize=14;" value="CH0 + CH1 PcieS2mmCaptureSession&lt;br&gt;independent events / state / direct frame read" vertex="1">
<mxGeometry height="58" width="340" x="420" y="65" as="geometry" />
</mxCell>
<mxCell id="e6" edge="1" parent="backendLayer" source="pcies2mmSession" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;" target="backendTypes" value="uses">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e7" edge="1" parent="backendLayer" source="pcies2mmSession" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;" target="workers" value="owns">
<mxGeometry relative="1" x="-0.004" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="qtSample" parent="1" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#ffffff;strokeColor=#6c8ebf;fontSize=14;" value="samples/gvfg_qt_preview&lt;br&gt;MainWindow / PreviewWindow" vertex="1">
<mxGeometry height="52" width="270" x="275" y="85" as="geometry" />
</mxCell>
<mxCell id="customerApp" parent="1" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#ffffff;strokeColor=#6c8ebf;fontSize=14;" value="Customer application" vertex="1">
<mxGeometry height="52" width="230" x="715" y="85" as="geometry" />
</mxCell>
<mxCell id="facade" parent="1" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#ffffff;strokeColor=#82b366;fontSize=14;" value="gvfg_handle_t&lt;br&gt;shared device connection&lt;br&gt;channels[0] + channels[1] facade state" vertex="1">
<mxGeometry height="58" width="340" x="470" y="385" as="geometry" />
</mxCell>
<mxCell id="ring" parent="1" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#ffffff;strokeColor=#d6b656;fontSize=14;" value="one outstanding frame per channel&lt;br&gt;copy_buffer_ or driver pointer&lt;br&gt;read / held / release" vertex="1">
<mxGeometry height="58" width="270" x="880" y="610" as="geometry" />
</mxCell>
<mxCell id="eventFlow" parent="1" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#ffffff;strokeColor=#d6b656;fontSize=13;" value="Public event flow&lt;br&gt;driver format IRQ -&gt; FORMAT_CHANGE_BEGIN&lt;br&gt;first new frame published -&gt; STREAM_READY" vertex="1">
<mxGeometry height="82" width="330" x="850" y="690" as="geometry" />
</mxCell>
<mxCell id="externalBoundary" parent="1" style="rounded=1;whiteSpace=wrap;html=1;arcSize=8;fillColor=#f5f5f5;strokeColor=#666666;dashed=1;fontColor=#333333;fontSize=14;" value="vfg100.sys / FPGA / DMA frame and events" vertex="1">
<mxGeometry height="52" width="280" x="410" y="900" as="geometry" />
</mxCell>
<mxCell id="e1" edge="1" parent="1" source="qtSample" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;" target="publicHeader" value="include / link">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e3" edge="1" parent="1" source="publicHeader" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;" target="facade" value="exports">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="eGpu" edge="1" parent="1" source="publicHeader" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;" target="gpuConvert" value="gvfg_gpu_convert_to_buffer">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ePreviewGpu" edge="1" parent="1" source="render" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;dashed=1;" target="gpuConvert" value="shared pipeline source">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e4" edge="1" parent="1" source="qtSample" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;" target="render" value="private preview">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e5" edge="1" parent="1" source="facade" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;" target="pcies2mmSession" value="backend API calls">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e8" edge="1" parent="1" source="workers" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;" target="ring" value="">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e11" edge="1" parent="1" source="workers" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;" target="eventFlow" value="callback / queue">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e9" edge="1" parent="1" source="pcies2mmSession" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;dashed=1;" target="facade" value="frames / events / status">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="420" y="589" />
<mxPoint x="420" y="434" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="e10" edge="1" parent="1" source="externalBoundary" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;strokeWidth=2;dashed=1;" target="pcies2mmSession" value="input boundary">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="550" y="780" />
<mxPoint x="550" y="780" />
</Array>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>