Table of Contents

Class UniversalDecoderBlock

Namespace
VisioForge.Core.MediaBlocks.Special
Assembly
VisioForge.Core.dll

A universal decoder block that replaces decodebin with controlled decoder management. This block automatically selects appropriate decoders for input streams and provides explicit control over memory management to avoid the uncontrolled memory leaks of decodebin.

public class UniversalDecoderBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

UniversalDecoderBlock(MediaBlockPadMediaType)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Special.UniversalDecoderBlock class.

public UniversalDecoderBlock(MediaBlockPadMediaType outputType)

Parameters

outputType MediaBlockPadMediaType

Properties

AudioOutput

Gets the primary audio output pad.

public MediaBlockPad AudioOutput { get; }

Property Value

MediaBlockPad

Input

Gets the primary input pad.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary output pad.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Strategy

Gets or sets the decoder selection strategy.

public UniversalDecoderBlock.DecoderStrategy Strategy { get; set; }

Property Value

UniversalDecoderBlock.DecoderStrategy

SubtitleOutput

Gets the primary subtitle output pad.

public MediaBlockPad SubtitleOutput { get; }

Property Value

MediaBlockPad

Type

Gets the type of this media block.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

VideoOutput

Gets the primary video output pad.

public MediaBlockPad VideoOutput { get; }

Property Value

MediaBlockPad

Methods

Build()

Builds the decoder block.

public override bool Build()

Returns

bool

CleanUp()

Cleans up the block's internal resources.

public void CleanUp()

Dispose(bool)

Cleans up the decoder block.

protected override void Dispose(bool disposing)

Parameters

disposing bool

GetCore()

Gets the core BaseElement wrapper.

public BaseElement GetCore()

Returns

BaseElement

Not applicable for this block, returns null.

GetElement()

Gets the main GStreamer element for this block.

public Element GetElement()

Returns

Element

The multiqueue element.

HandleDynamicPad(Pad)

Handles dynamic pad connection from the demuxer.

public void HandleDynamicPad(Pad pad)

Parameters

pad Pad

The pad from the demuxer.

HandleNewPad(Pad)

Handles new pad from input.

public void HandleNewPad(Pad pad)

Parameters

pad Pad

SetContext(MediaBlocksPipeline)

Sets the pipeline context for this block.

public void SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The MediaBlocksPipeline instance.

See Also