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, IMediaBlockInternalsInheritance
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
outputTypeMediaBlockPadMediaType
Properties
AudioOutput
Gets the primary audio output pad.
public MediaBlockPad AudioOutput { get; }Property Value
Input
Gets the primary input pad.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary output pad.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads.
public override MediaBlockPad[] Outputs { get; }Property Value
Strategy
Gets or sets the decoder selection strategy.
public UniversalDecoderBlock.DecoderStrategy Strategy { get; set; }Property Value
SubtitleOutput
Gets the primary subtitle output pad.
public MediaBlockPad SubtitleOutput { get; }Property Value
Type
Gets the type of this media block.
public override MediaBlockType Type { get; }Property Value
VideoOutput
Gets the primary video output pad.
public MediaBlockPad VideoOutput { get; }Property Value
Methods
Build()
Builds the decoder block.
public override bool Build()Returns
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
disposingbool
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
padPad-
The pad from the demuxer.
HandleNewPad(Pad)
Handles new pad from input.
public void HandleNewPad(Pad pad)Parameters
padPad
SetContext(MediaBlocksPipeline)
Sets the pipeline context for this block.
public void SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The MediaBlocksPipeline instance.