Skip to content

NdiDriver

Source: NdiDriver.h

NdiDriver

class NdiDriver
src/light/drivers/NdiDriver.h:29

Inherits: DriverBase

Output driver: publishes the rendered frame as an NDI video source.

It reaches OBS, Resolume, TouchDesigner or any other receiver, on this machine or another.

NDI rather than Spout or Syphon because one implementation covers every desktop platform, discovers by name, and crosses machines. At LED-wall pixel counts the latency difference sits far below one frame, so coverage decides.

Prior art: the NDI protocol and SDK are NewTek and Vizrt's. This is our own code against the documented C API.

Public Attributes

char sourceName = "" : The name a receiver lists this source under; blank uses the device's own.

uint8_t fps = 30 : The frame-rate ceiling, declared in each frame; the link may deliver fewer.

Public Methods

inline NdiDriver() : Bind the two scratch buffers to this module, so their memory is accounted for.

virtual inline const char * tags() const override : The catalog tags shown on this driver's card.

virtual inline void setSourceBuffer(Buffer * buf) override : Point the driver at the shared source buffer.

virtual inline void defineDriverControls() override : Bind the source name a receiver lists, and the frame-rate ceiling.

virtual inline bool affectsPrepare(const char * name) const override : A geometry change resizes the frame; a name change re-creates the sender (NDI has no rename).

virtual inline void prepare() override : Open the sender and size the staging buffers for the current geometry.

virtual inline void release() override : Close the sender, so the source stops being advertised.

virtual inline void tick() override : The hot tick, which by default ticks every enabled child and times each.

Public Static Attributes

constexpr const char * kTags = "🖥️" : The catalog tag this driver carries.

More info

Desktop only

The NDI runtime is a closed binary built only for Intel and ARM. No ESP32 can load one, and there is no source to port. A board reaches the same receivers over the pixel protocols.

The runtime is the user's

MoonLight is GPL-3.0 and the runtime is proprietary, so it is never bundled or linked. The platform layer resolves it on demand. A machine without it runs normally and says so in the status, and no NDI type appears in this header.

NdiDriver card