optris::sdk::PipelineInfo
What the SDK chose for one camera, and why.
Not fixed for as long as the camera is open. The pipeline is chosen per camera while it opens, by the first of these rules that decides: a sample-point calibration (CPU), OTC_FORCE_CPU (CPU), a caller's preference (no public API sets one), a measured table of camera modes, the size rule (below gpu_min_pixels the CPU, at or above it the GPU), and whether a usable GPU exists. It is chosen from the mode the camera opens in, and a later mode switch keeps it; nothing in the choice looks at how busy the GPU is or how many cameras it carries. During the open it is chosen twice (on frame size, then again once the calibration has been read), so read this after the open returns, not from an open-progress callback.
After the open it changes in one case: the GPU pipeline fails to initialize, or has not returned within the time bound (OTC_GPU_INIT_TIMEOUT_MS, 15 s by default), when the camera connects, when an operation-mode switch or a frame-format change rebuilds the pipeline, or on a reconnect. The camera is then moved to the CPU pipeline with its processing and picture settings, and reports kGpuInitFailed. Processing::SetPipelineChangeCallback() is told.
Every public feature works on both pipelines. What still differs: a noise filter gives slightly different numbers at a temperature edge (the GPU filters energy, the CPU temperature), the region outlines are drawn into the delivered picture by default on the GPU pipeline only (Display::SetOverlayCompositing()), and direct GPU rendering (Display::GetGpuInstance(), ConfigureSurface()) needs the GPU pipeline.
A default-constructed instance has valid == false and answers nothing, which is what a camera that is not open reports.
Public attributes
valid
bool valid = false
False when there was nothing to report: no camera attached, or an imager with no pipeline behind it. Every other field is then at its default and means nothing.
kind
PipelineKind kind = PipelineKind::kNone
Which pipeline computes this camera's frames.
reason
PipelineReason reason = PipelineReason::kNotApplicable
Which rule put it there.
explanation
std::string explanation
The reason in words, naming the numbers behind it. Never empty when valid is true.
frame_width
std::uint32_t frame_width = 0
The frame geometry the size rule was applied to, and the threshold it was compared against. These are the SDK's own inputs, so a report that says "CPU for a 4032-pixel frame" can be checked rather than believed.
frame_height
std::uint32_t frame_height = 0
As frame_width.
frame_rate
std::uint32_t frame_rate = 0
As frame_width.
gpu_min_pixels
std::uint32_t gpu_min_pixels = 0
OTC_GPU_MIN_PIXELS, or the built-in 65536 when it is unset.
gpu_api
std::string gpu_api
"D3D12", "Vulkan", "Metal", "OpenGL", or empty.
gpu_adapter
std::string gpu_adapter
The adapter's own name, e.g. "NVIDIA RTX A1000".
Falls back to the vendor's name, and then to empty. Nothing else: the driver's description used to sit in that chain, and on Vulkan it holds a version string, so an adapter could be reported as named "550.54.14". The driver is reported under its own names on GpuInfo instead.
gpu_vendor_id
std::uint32_t gpu_vendor_id = 0
PCI vendor id, or zero.
gpu_device_id
std::uint32_t gpu_device_id = 0
PCI device id, or zero.
gpu_adapter_is_software
bool gpu_adapter_is_software = false
A software rasteriser rather than real hardware. The SDK refuses these for the GPU pipeline, so this is false in practice and present so that a refusal can be reported as what it was.
streaming_backend
std::string streaming_backend
The backend actually in use: "hal-mf", "directshow", "hal-v4l2", "hal-libusb", "v4l2", "usb-bulk", "udp", "simulated", "playback". This is what was built, not what was asked for.
streaming_backend_requested
std::string streaming_backend_requested
What was asked for, when that differs from what was built -- otherwise empty. A request the platform could not honour is the one streaming fact worth a second field: "asked for hal-v4l2, got usb-bulk" is a supportable report and "usb-bulk" alone is not.
streaming_backend_source
StreamingBackendSource streaming_backend_source = StreamingBackendSource::kNone
Who named the streaming backend.