Class NdiSink
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
IsNetworkSink
Gets a value indicating whether it is a network or local sink.
Always false for this class.
public bool IsNetworkSink { get; }
Property Value
Parameters
Gets or sets the sink parameters.
public SinkParameters Parameters { get; set; }
Property Value
State
Gets the current sink state.
public MediaState State { get; }
Property Value
UniqueId
Gets or sets the unique identifier for this sink.
public Guid UniqueId { get; set; }
Property Value
Uri
Gets or sets the sink URI. The URI must use the ndi scheme.
public string Uri { get; set; }
Property Value
Methods
AddStream(int, MediaType)
Adds a media stream for pushing to the NDI output.
public void AddStream(int streamIndex, MediaType mediaType)
Parameters
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
streamIndexintThe stream index.
packetVersatileBufferThe media sample to push.
Start(bool)
Starts media pushing to the NDI output.
public void Start(bool delayedStart = false)
Parameters
delayedStartboolWhether 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
StateChanged
Occurs when the sink state changes.
public event EventHandler<MediaState> StateChanged