Table of Contents

Interface IDiscardable

Namespace
VAST.Media
Assembly
VAST.Common.dll

Defines the contract for media sources that support discarding certain streams.

public interface IDiscardable

Properties

AllowAdaptiveStreamSwitch

Gets or sets a value indicating whether to apply automatic adaptive stream switching in the source. Only applicable when IsAdaptiveStreamSwitchSupported returns true. Can be changed at any time before or after the source is opened.

bool AllowAdaptiveStreamSwitch { get; set; }

Property Value

bool

DiscardMode

Gets or sets the discarding mode. Can only be set before the Open() call; setting afterwards has no effect.

DiscardMode DiscardMode { get; set; }

Property Value

DiscardMode

DiscardState

Gets the current discard state of all original streams. The number of elements equals OriginalStreamCount. Returns an empty list if the source is not yet opened, is stopped, or has errored.

List<bool> DiscardState { get; }

Property Value

List<bool>

IsAdaptiveStreamSwitchSupported

Gets a value indicating whether adaptive stream switching is supported by the source.

bool IsAdaptiveStreamSwitchSupported { get; }

Property Value

bool

OriginalStreamCount

Gets the original stream count of the source before any discarding.

int OriginalStreamCount { get; }

Property Value

int

Methods

Discard(Dictionary<int, bool>)

Applies discard flags for the specified streams. This is a smooth discard request that should not produce significant interruptions in playback. Can be called any time after the source state becomes Opened.

void Discard(Dictionary<int, bool> values)

Parameters

values Dictionary<int, bool>

A dictionary mapping stream indices to their discard values (true to discard, false to include).

GetOriginalMediaType(int)

Gets the media type of the specified original stream.

MediaType GetOriginalMediaType(int streamIndex)

Parameters

streamIndex int

The original stream index to get the media type for.

Returns

MediaType

The media type of the requested stream.