Table of Contents

Class TsSource

Namespace
VAST.TS
Assembly
VAST.TS.dll

Provides a transport stream UDP source that receives media data over a UDP connection.

public class TsSource : INetworkSource, IMediaSource, IReferenceable, IDisposable, INetworkEndPoint
Inheritance
TsSource
Implements
Inherited Members

Constructors

TsSource()

Initializes a new instance of the TsSource class.

public TsSource()

Properties

Accept

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

public bool Accept { get; set; }

Property Value

bool

Capabilities

Gets the list of source capabilities

public List<SourceCapability> Capabilities { get; }

Property Value

List<SourceCapability>

EndPoint

Gets the connected end point information.

public IPProtoEndPoint EndPoint { get; }

Property Value

IPProtoEndPoint

IsDisposed

Gets a value indicating whether the object is already disposed and cannot be used anymore.

public bool IsDisposed { get; }

Property Value

bool

IsNetworkSource

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

public bool IsNetworkSource { get; }

Property Value

bool

Parameters

Gets or sets source parameters

public SourceParameters Parameters { get; set; }

Property Value

SourceParameters

PublishingPath

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

public string PublishingPath { get; set; }

Property Value

string

ReceivedUri

Gets or sets the source URI when present (depends on the protocol).

public string ReceivedUri { get; set; }

Property Value

string

RefCount

Gets the current reference count of the object.

public int RefCount { get; }

Property Value

int

SocketError

Gets the socket error received on disconnection.

public ExtendedSocketError SocketError { get; }

Property Value

ExtendedSocketError

State

Gets the current source state.

public MediaState State { get; }

Property Value

MediaState

StreamCount

Gets the total stream count of the source.

public int StreamCount { get; }

Property Value

int

UniqueId

Gets or sets the unique source identifier.

public Guid UniqueId { get; set; }

Property Value

Guid

Uri

URI to be opened to pull data from

public string Uri { get; set; }

Property Value

string

Methods

AddRef()

Adds a reference to the object.

public void AddRef()

Dispose()

Releases all resources used by the TsSource class.

public void Dispose()

GetMediaType(int)

Gets the media type of the specified stream.

public MediaType GetMediaType(int streamIndex)

Parameters

streamIndex int

The stream index to get the media type for.

Returns

MediaType

The media type of the requested stream, or null if the index is out of range.

Open()

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

public void Open()

Release()

Releases a reference to the object. If the reference count becomes 0 then the Dispose() method is called. The calling object must not use the current object after this call.

public void Release()

SetDesiredOutputType(int, MediaType)

Sets the desired output media type of the specified stream. Not supported by this source.

public Task SetDesiredOutputType(int streamIndex, MediaType mediaType)

Parameters

streamIndex int

The stream index to set the desired output media type for.

mediaType MediaType

The desired media type.

Returns

Task

This method always throws NotImplementedException.

Start()

Starts media pushing from the UDP source.

public void Start()

Stop()

Stops media pushing and closes the source.

public void Stop()

Events

Error

Occurs when an error has occurred during source operation.

public event EventHandler<ErrorEventArgs> Error

Event Type

EventHandler<ErrorEventArgs>

NewSample

Occurs when a new media sample is ready.

public event EventHandler<NewSampleEventArgs> NewSample

Event Type

EventHandler<NewSampleEventArgs>

NewStream

Occurs when a new stream has been created.

public event EventHandler<NewStreamEventArgs> NewStream

Event Type

EventHandler<NewStreamEventArgs>

StateChanged

Occurs when the source state has changed.

public event EventHandler<MediaState> StateChanged

Event Type

EventHandler<MediaState>