Crate ndi_sdk_sys

Crate ndi_sdk_sys 

Source
Expand description

Safe and ergonomic Rust bindings for the NDI (ndi.video) SDK, enabling high-performance video, audio, and metadata transmission over IP networks.

Unlike other bindings this never exposes any raw pointers and uses correct Rust types for everything (timeouts are handled as std::time::Duration, not time_in_ms: u32)

Despite its name this is not affiliated with ndi, ndi-sdk, ndi-sys crates.

§Building

  1. Make sure to have the NDI SDK installed
  2. Make sure to have Clang/LLVM installed. see rust-bindgen requirements

§Docs

This library aims to be as close to the C SDK as possible while still providing a safe abstraction. In many cases the original documentation is still useful. If you have already worked with it, look out for C Equivalent: ... comments, as they are intended to help selecting the right Rust equivalent of C structs and functions

§Cargo features

§strict_assertions

This crate uses a lot of unsafe ffi bindings and therefore a lot of assertions.

You can turn on this feature to ensure debug assertions are in place even for release builds. During development and testing it is highly recommended to turn this on, as it sometimes also outputs more diagnostics.

There are some (unsafe) APIs that are not really necessary, but might in some rare case be useful. Use only if you REALLY know what you do. For example there are APIs that allow to change the resolution of a video frame while it is allocated, which may lead to out-of-bounds memory access by safe code.

Modules§

blocking_update
Helper for results of blocking operations with timeout
buffer_info
Contains information about the memory layout of video frame buffers
enums
find
NDI source finder
four_cc
FourCC (Four Character Code) is a sequence of four bytes used to uniquely identify data formats.
frame
Handling and manipulation of video/audio/metadata frames
receiver
NDI Receiver
resolution
router
NDI Router
sdk
Contains methods for the whole SDK like startup/shutdown, CPU support tests and version lookup
sender
NDI Sender
source
Source descriptors are used to get the name of local and discovered senders as well as telling a receiver unambiguously which source to connect to
subsampling
Chroma subsampling
tally
Tally indicator
timecode
util