Table of Contents

Class NdiSink

Namespace
VAST.NDI
Assembly
VAST.NDI.dll

NDI media sink implementation for sending video and audio over NDI. Implements IMediaSink.

public class NdiSink : IMediaSink, IDisposable
Inheritance
NdiSink
Implements
Inherited Members

Constructors

NdiSink()

Initializes a new instance of the NdiSink class.

public NdiSink()

Properties

Capabilities

Gets the list of sink capabilities.

public List<SinkCapability> Capabilities { get; }

Property Value

List<SinkCapability>

IsNetworkSink

Gets a value indicating whether it is a network or local sink. Always false for this class.

public bool IsNetworkSink { get; }

Property Value

bool

Parameters

Gets or sets the sink parameters.

public SinkParameters Parameters { get; set; }

Property Value

SinkParameters

State

Gets the current sink state.

public MediaState State { get; }

Property Value

MediaState

UniqueId

Gets or sets the unique identifier for this sink.

public Guid UniqueId { get; set; }

Property Value

Guid

Uri

Gets or sets the sink URI. The URI must use the ndi scheme.

public string Uri { get; set; }

Property Value

string

Methods

AddStream(int, MediaType)

Adds a media stream for pushing to the NDI output.

public void AddStream(int streamIndex, MediaType mediaType)

Parameters

streamIndex int

The stream index.

mediaType MediaType

The stream media type.

Dispose()

Releases all resources used by the NdiSink class.

public void Dispose()

Open()

Opens the sink using the specified Uri.

public void Open()

PushMedia(int, VersatileBuffer)

Pushes a media sample to the NDI output.

public void PushMedia(int streamIndex, VersatileBuffer packet)

Parameters

streamIndex int

The stream index.

packet VersatileBuffer

The media sample to push.

Start(bool)

Starts media pushing to the NDI output.

public void Start(bool delayedStart = false)

Parameters

delayedStart bool

Whether media samples are expected immediately or after a significant time interval. Not used in the current sink.

Stop()

Stops media pushing and releases all native resources.

public void Stop()

Events

Error

Occurs when an error is encountered during sink operations.

public event EventHandler<ErrorEventArgs> Error

Event Type

EventHandler<ErrorEventArgs>

StateChanged

Occurs when the sink state changes.

public event EventHandler<MediaState> StateChanged

Event Type

EventHandler<MediaState>