Table of Contents

Class AggregatedNetworkSource

Namespace
VAST.Network
Assembly
VAST.Common.dll

Represents a network source that aggregates multiple media sources into a single virtual source.

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

Constructors

AggregatedNetworkSource()

Initializes a new instance of the AggregatedNetworkSource class.

public AggregatedNetworkSource()

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 capabilities supported by this source.

public List<SourceCapability> Capabilities { get; }

Property Value

List<SourceCapability>

EndPoint

Gets the connected endpoint information.

public IPProtoEndPoint EndPoint { get; }

Property Value

IPProtoEndPoint

IsDisposed

Gets a value indicating whether this object has been disposed and can no longer be used.

public bool IsDisposed { get; }

Property Value

bool

IsNetworkSource

Gets a value indicating whether this is a network source rather than a local source.

public bool IsNetworkSource { get; }

Property Value

bool

Parameters

Gets or sets the source configuration parameters.

public SourceParameters Parameters { get; set; }

Property Value

SourceParameters

PublishingPath

Gets or sets the publishing point name extracted from the source URI or by other means.

public string PublishingPath { get; set; }

Property Value

string

ReceivedUri

Gets or sets the source URI when present.

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 number of streams in the source.

public int StreamCount { get; }

Property Value

int

UniqueId

Gets or sets the unique identifier for this source.

public Guid UniqueId { get; set; }

Property Value

Guid

Uri

Gets or sets the source URI.

public string Uri { get; set; }

Property Value

string

Remarks

Setting this property is not supported and will throw NotSupportedException.

Methods

AddRef()

Adds a reference to this object.

public void AddRef()

AddSource(IMediaSource)

Adds a media source to the aggregated source.

public void AddSource(IMediaSource source)

Parameters

source IMediaSource

The media source to add.

Remarks

At least one media source must be added before starting the aggregated source. Typically, one video and/or one audio source should be added. Multiple video or audio sources are supported, but whether they all appear in the output depends on the sink implementation.

Exceptions

Exception

Thrown if the aggregated source is already running.

Dispose()

Releases all resources used by this aggregated network source.

public void Dispose()

GetMediaType(int)

Gets the media type of the specified stream.

public MediaType GetMediaType(int streamIndex)

Parameters

streamIndex int

The index of the stream 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 all aggregated sources.

public void Open()

Release()

Releases a reference to this object.

public void Release()

Remarks

If the reference count reaches zero, Dispose() is called automatically. The caller must not use this object after calling this method.

SetDesiredOutputType(int, MediaType)

Sets the desired output media type for the specified stream.

public Task SetDesiredOutputType(int streamIndex, MediaType mediaType)

Parameters

streamIndex int

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

mediaType MediaType

The desired media type.

Returns

Task

Exceptions

NotImplementedException

This method is not implemented for aggregated sources.

Start()

Starts all aggregated sources and begins pushing media data.

public void Start()

Stop()

Stops all aggregated sources.

public void Stop()

Events

Error

Occurs when an error is encountered.

public event EventHandler<ErrorEventArgs> Error

Event Type

EventHandler<ErrorEventArgs>

NewSample

Occurs when a new sample is ready to be consumed.

public event EventHandler<NewSampleEventArgs> NewSample

Event Type

EventHandler<NewSampleEventArgs>

NewStream

Occurs when a new stream is created or stream information becomes available.

public event EventHandler<NewStreamEventArgs> NewStream

Event Type

EventHandler<NewStreamEventArgs>

StateChanged

Occurs when the source state changes.

public event EventHandler<MediaState> StateChanged

Event Type

EventHandler<MediaState>