Add dual-slot font-selectable OSD and privatize playback diagnostics for SDK 3.0.0
- replace the single-overlay API with two independently configured OSD slots per channel, simplify NUL-terminated text/font settings, and add explicit visibility controls that preserve cached glyphs separately from Clear - enumerate installed Windows font families as an SDK-owned UTF-8 list without callbacks or caller-side free, refresh installed fonts on demand, and use the selected family consistently for measurement and rendering with invalid/missing-font rejection - retain per-slot YUV and A8 mask caches, blend slot 1 over slot 0 in one GPU dispatch/readback, preserve hidden surfaces, and skip oversized slots independently while capture and the other slot continue - move detailed playback core statistics to a private Debug-only header/export, remove the public legacy statistics query and compatibility layouts, and retain public preview/delivery statistics - bump the SDK major version to 3.0.0 for the breaking OSD and playback API changes and document matching header, import-library and runtime deployment requirements - refresh the capture/playback guides, internal build notes and API reference, document all 51 public Capture/Playback functions, add checked OSD usage examples, and regenerate the branded 23-page PDF Validation: git diff --cached --check and public API documentation coverage checks passed. The regenerated PDF passed text/content checks and visual review of its rendered pages, including the OSD types, API contracts and examples. Earlier session SDK Release compilation and synthetic YUY2/Y210 blending checks passed; no new build, hardware capture, FPGA upload or long-duration runtime validation was performed during this commit pass.
This commit is contained in:
@@ -6,12 +6,12 @@ live video frames, communicate with the driver, or present a preview. The
|
||||
library is linked into `gvfg.dll`; it is not installed or shipped as a
|
||||
separate customer DLL.
|
||||
|
||||
The initial API supports:
|
||||
The helper supports:
|
||||
|
||||
- YUY2 and Y210 output
|
||||
- printable ASCII text, up to 32 characters
|
||||
- Arial-preferred font with DirectWrite fallback, configurable pixel size,
|
||||
RGB color, and `(x, y)` position
|
||||
- caller-selected installed font family (UTF-8), configurable pixel size,
|
||||
RGB color, and `(x, y)` position; missing families are rejected
|
||||
- one non-wrapping line, with a shared DirectWrite layout for measurement and
|
||||
rendering at 96 DPI
|
||||
- BT.709 limited-range RGB-to-YUV conversion
|
||||
@@ -32,14 +32,20 @@ device. Font size must be non-zero; the SDK does not impose the viewer's
|
||||
to `[0, frame width - text width]` and `[0, frame height - text height]` so the
|
||||
complete box remains visible. The internal render function returns `EINVAL`
|
||||
if the text box is larger than the frame. For live capture, the GPU processor
|
||||
detects that case before rendering and temporarily bypasses OSD while keeping
|
||||
capture and the requested OSD settings active. It retries when the settings,
|
||||
detects that case before rendering and temporarily skips only the oversized slot,
|
||||
keeping capture, the other slot, and the saved settings active. It retries when the settings,
|
||||
frame dimensions, or pixel format change. It does not shrink, truncate, or wrap
|
||||
the text to make it fit.
|
||||
|
||||
For live SDK OSD, `GpuOsdProcessor` caches the non-zero mask bounds, aligned
|
||||
to complete YUV422 pixel pairs. Only this rectangle is uploaded, blended,
|
||||
and read back each frame. For non-zero-copy acquisition, the backend explicitly
|
||||
For live SDK OSD, each channel owns two independently configured slots. Each
|
||||
slot caches its YUV and A8 mask. The shared ROI is the union of both slots'
|
||||
non-zero mask bounds, aligned to complete YUV422 pixel pairs. A single compute
|
||||
dispatch blends slot 0 then slot 1, followed by one readback. Slot textures are
|
||||
uploaded on settings/geometry changes, not every frame. Hidden slots retain
|
||||
their rasterized surfaces and textures; shader visibility bits implement show/hide
|
||||
without rebuilding. If all slots are hidden, no blend or readback is performed.
|
||||
Clearing a slot discards its configuration and surfaces. An oversized slot is
|
||||
skipped independently, leaving capture and the other slot active. For non-zero-copy acquisition, the backend explicitly
|
||||
grants writable access to its currently held SDK-owned capture buffer: the
|
||||
GPU result replaces only that rectangle in place, retaining the original
|
||||
stride and size. No second full-frame copy or output-buffer resize is needed.
|
||||
|
||||
Reference in New Issue
Block a user