Frame Bus & Plugins
Frame Bus & Plugins
Section titled “Frame Bus & Plugins”Everything in Phrame moves media the same way: raw frames over a shared-memory bus, through native plugins that all speak one stable interface. Add a new transport or codec, and every service can use it — no rewrites.
Why it matters
Section titled “Why it matters”The reason Phrame’s services are so interchangeable is a single architectural decision: one plugin interface for every transport and codec.
- Future-proof I/O. New standards (a codec, a transport) arrive as a plugin, not a platform rewrite — every service gains it at once.
- Best-of-breed transports. VDI and MXL for the live bus, NDI and SMPTE 2110 for standards interop, HLS and JPEG-XS for delivery — mixed and matched.
- Shared-memory speed. Frames move between services through shared memory, not copies over sockets — the performance headroom that makes software-defined broadcast viable.
- Stable contract. A versioned C ABI means the host code and the plugins can evolve independently.
In one line: one interface behind every format — the seam that lets the whole platform stay simple and keep up with the standards.
How it works
Section titled “How it works”The plugins/ directory holds the native shared libraries (.so) every
service loads to move media in and out. A host:
dlopens a plugin (e.g.libplugin-mxl.so) and resolves its functions;- calls
plugin_open(name, json_config)to get a handle; - reads/writes
PluginFrames (plugin_read/plugin_write, withplugin_free_frame); plugin_closes it.
Configuration is always a single JSON string the plugin parses itself, so each plugin defines its own config shape. The plugins available:
.so | Plugin |
|---|---|
libvdi.so | VDI — local frame bus |
libplugin-mxl.so | MXL — media exchange |
libphramendi.so | NewTek NDI |
libst2110.so | SMPTE ST 2110 |
libplugin-tr07.so | VSF TR-07 (JPEG-XS / TS / SRT) |
libSvtJpegxs.so | SVT JPEG-XS codec |
libplugin-hls.so | HLS output |
libplugin-dektec.so | DekTec DVB-ASI / SDI |
libplugin-null.so | null sink / source (testing) |
Build order matters.
plugins/is a prerequisite of every consumer image. If anything inplugins/orcommon/changed, build the plugins first (plugins/phrame-make.sh <TAG> build-image).
Under the hood
Section titled “Under the hood”The C ABI is defined in common/plugin-api/plugins.h (v0.0.2). Exported
functions include plugin_open / plugin_close, plugin_read /
plugin_read_timeout / plugin_write, plugin_is_frame_ready,
plugin_free_frame, plugin_seek, plugin_query_uuid,
plugin_query_config, and plugin_get_queue_depth.
Key data structures:
PluginFrame— one media unit:data_type(video/audio/ancillary), dimensions/channels/nb_samples,colour_format,components[4](planes), a 32-charformatstring (e.g.v210,yuv422p10le,pcm_s24be),is_compressed/has_alpha,buffer/buffer_size, and metadata (stream_uuid,frame_index,origination_time,time_base, …).PluginComponent— one plane:data,stride, dimensions,bytes_per_element,bit_depth.PluginReturnCode—prcOK(0) plus negative error codes.
C++ plugins inherit PluginInterface::Base and implement
init(config_json), Read_impl, Write_impl, Free_Frame, QueryUUID,
is_valid, is_frame_ready, Seek; a C shim dispatches the C ABI to a
16-slot array of instances.
Also staged in plugins/: libPhrameImageUtils.so (SIMD image utilities) and
the MXL/NDI runtime libs.
Part of the Phrame documentation system — one Markdown source, four audiences, a code-generated house-style diagram.
