Table of Contents

Class TsSink

Namespace
VAST.TS
Assembly
VAST.TS.dll

Provides a transport stream UDP sink that sends media data over a UDP connection.

public class TsSink : INetworkSink, IMediaSink, IDisposable, INetworkEndPoint
Inheritance
TsSink
Implements
Inherited Members

Constructors

TsSink()

Initializes a new instance of the TsSink class.

public TsSink()

Properties

Accept

Gets or sets a value indicating whether the sink is accepted.

public bool Accept { get; set; }

Property Value

bool

Capabilities

Gets the list of sink capabilities

public List<SinkCapability> Capabilities { get; }

Property Value

List<SinkCapability>

EndPoint

Gets the connected end point information.

public IPProtoEndPoint EndPoint { get; }

Property Value

IPProtoEndPoint

IsNetworkSink

Gets a value indicating whether this is a network sink. Always returns true.

public bool IsNetworkSink { get; }

Property Value

bool

Parameters

Gets or sets sink parameters

public SinkParameters Parameters { get; set; }

Property Value

SinkParameters

PublishingPath

Gets or sets the publishing point name extracted from the sink URI or by any other means (depends on the protocol).

public string PublishingPath { get; set; }

Property Value

string

ReceivedUri

Gets or sets the end point URI used when connected (depends on the protocol).

public string ReceivedUri { get; set; }

Property Value

string

SocketError

Gets the socket error received on disconnection.

public ExtendedSocketError SocketError { get; }

Property Value

ExtendedSocketError

State

Gets the current sink state.

public MediaState State { get; }

Property Value

MediaState

UniqueId

Gets or sets the unique identifier of this sink.

public Guid UniqueId { get; set; }

Property Value

Guid

Uri

Gets or sets the URI to be opened. Exact URI syntax depends on the implementation.

public string Uri { get; set; }

Property Value

string

Methods

AddStream(int, MediaType)

Adds a media stream for pushing.

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 TsSink class.

public void Dispose()

Open()

Opens the sink using the specified URI and establishes a UDP connection.

public void Open()

PushMedia(int, VersatileBuffer)

Pushes a media sample over the UDP connection.

public void PushMedia(int streamIndex, VersatileBuffer packet)

Parameters

streamIndex int

The stream index.

packet VersatileBuffer

The media sample to send.

Start(bool)

Starts media pushing over UDP.

public void Start(bool delayedStart = false)

Parameters

delayedStart bool

false if media samples are expected immediately; true if the first media sample is expected after a significant time interval (e.g. tens of seconds).

Stop()

Stops media pushing and closes the UDP connection.

public void Stop()

Events

Error

Occurs when an error has occurred during sink operation.

public event EventHandler<ErrorEventArgs> Error

Event Type

EventHandler<ErrorEventArgs>

StateChanged

Occurs when the sink state has changed.

public event EventHandler<MediaState> StateChanged

Event Type

EventHandler<MediaState>