Video I/O Vendor Implementation Guide
Video I/O Vendor Implementation Guide
Video I/O Vendor Implementation Guide
This guide describes how capture-card vendors subclass the Holoscan SDK
VideoAcquisitionOperator and VideoTransmissionOperator to provide
SDK-native multi-stream video capture and playout.
The base class handles:
The vendor subclass provides:
setup() — Register Vendor ParametersCall the base setup() first. This registers all common parameters (uri, width, etc.)
and the correct number of I/O ports based on num_streams(). Then add your vendor-specific
parameters.
For transmission:
start() and stop()start() is called once after initialize(). Open the device, allocate buffers,
configure the hardware. stop() tears everything down.
compute() — The Frame Loopcompute() is called by the scheduler on every tick. For acquisition, dequeue frames from
the hardware and emit them via emit_capture_stream(). For transmission, receive frames via
receive_transmit_stream() and queue them to the hardware.
compute()compute()The default query_capture_capabilities() derives a minimal snapshot from configured
parameters. Override it to query the actual hardware for supported modes, resolutions,
frame rates, and features.
The registry allows applications to discover available hardware before creating
operator instances. Register an enumerator at library load time (or from a static
initializer) using your vendor backend_id.
Applications can then discover devices without instantiating any operator:
The recommended deployment pattern: each operator instance owns one hardware channel. A shared device resource (vendor-specific) ensures safe access to the underlying SDK handle with per-channel reservation.
When the vendor SDK manages multiple channels through a single handle and
does not support independent per-channel initialization, use one operator
with num_streams > 1 to expose each channel on a separate output port.
Use capture_output_port_name(i) / transmit_input_port_name(i) if you need the
string programmatically. The base caches these in a vector for zero-allocation lookup
in the hot path (emit_capture_stream / receive_transmit_stream).
num_streams vs. channel_indices — When to Use WhichThese serve different purposes:
Common patterns:
VideoAcquisitionOperator and/or VideoTransmissionOperatornum_streams, num_streams + args)setup() first in your override, then add vendor parameterscompute() — use emit_capture_stream() / receive_transmit_stream()note_acquired_frame() / note_transmitted_frame() on successnote_dropped_frame() on timeout or errorstart() to open device, stop() to close devicequery_capture_capabilities() to return real hardware capabilitiesbackend_id = "vendor.<yourname>" for capability reportingholoscan::ops::video_ionum_streams = 1 (backward compat) and > 1 (multi-stream)signal, signal_1, …, signal_{N-1}setup())