Class NDISourceBlock
- Namespace
- VisioForge.Core.MediaBlocks.Sources
- Assembly
- VisioForge.Core.dll
NDI (Network Device Interface) source block for professional IP-based video streaming. Provides low-latency, high-quality video and audio streaming over IP networks for broadcast production, live events, and multi-camera setups with automatic source discovery and synchronization capabilities. Implements the VisioForge.Core.MediaBlocks.Sources.SourceMediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class NDISourceBlock : SourceMediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
NDISourceBlock(NDISourceSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.NDISourceBlock class with custom NDI settings. Configures the NDI source for professional IP video streaming with specified parameters.
public NDISourceBlock(NDISourceSettings settings)Parameters
settingsNDISourceSettings-
The NDI settings controlling source selection, bandwidth, and connection parameters.
Properties
AudioOutput
Gets the audio output pad that provides NDI audio stream to downstream blocks.
public MediaBlockPad AudioOutput { get; }Property Value
Input
Gets the primary input pad (none for source blocks that receive network streams).
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads available on this block (none for source blocks).
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary output pad (video output for NDI).
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block (video and audio outputs).
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the NDI configuration settings that control source selection and stream parameters.
public NDISourceSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for NDI source operations.
public override MediaBlockType Type { get; }Property Value
VideoOutput
Gets the video output pad that provides NDI video stream to downstream blocks.
public MediaBlockPad VideoOutput { get; }Property Value
Methods
Build()
Builds and initializes the NDI source within the pipeline context. Connects to NDI stream, configures video/audio outputs, and prepares synchronized playback for downstream processing.
public override bool Build()Returns
- bool
-
trueif the NDI source was successfully built and configured; otherwise,false.
CleanUp()
Cleans up all resources associated with the NDI operations, including network connections and stream buffers.
public void CleanUp()Dispose(bool)
Releases unmanaged and managed resources used by the NDI source. Properly closes network connections and disposes of GStreamer elements and streaming resources.
protected override void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
GetCore()
Gets the core GStreamer element wrapper for advanced configuration and monitoring.
public BaseElement GetCore()Returns
- BaseElement
-
Always null for composite source blocks with multiple internal elements.
GetElement()
Gets the native GStreamer element for direct GStreamer pipeline integration.
public Element GetElement()Returns
- Element
-
The NDI source GStreamer element.
IsAvailable()
Determines whether NDI support is available on the current system. Requires NDI runtime and GStreamer NDI plugins to be installed and licensed.
public static bool IsAvailable()Returns
- bool
-
trueif NDI support is available; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this NDI source, providing access to the parent pipeline and logging context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this NDI source.