Table of Contents

Class DemuxerSourceBlock

Namespace
VisioForge.Core.MediaBlocks.Sources
Assembly
VisioForge.Core.dll

Demuxer source block for container format parsing without automatic decoding capabilities. Provides raw stream extraction from multimedia containers (MP4, AVI, MKV, WebM) with separate video, audio, and subtitle outputs for advanced processing pipelines requiring manual decoder selection and stream manipulation in professional media workflows. Implements the VisioForge.Core.MediaBlocks.Sources.SourceMediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class DemuxerSourceBlock : SourceMediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

DemuxerSourceBlock(DemuxerSourceSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.DemuxerSourceBlock class with container parsing settings. Configures the demuxer for multimedia container analysis and stream separation with specified file and rendering options.

public DemuxerSourceBlock(DemuxerSourceSettings settings)

Parameters

settings DemuxerSourceSettings

The demuxer settings containing file path, stream selection, and rendering configuration parameters.

Properties

Input

Gets the primary input pad (none for source blocks that read from files).

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads available on this block (none for source blocks).

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary output pad (first available stream from container).

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads available on this block (multiple outputs for separated streams).

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Type

Gets the media block type identifier for demuxer source operations.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the demuxer source within the pipeline context. Opens container file, analyzes streams, and establishes dynamic outputs for discovered video, audio, and subtitle tracks.

public override bool Build()

Returns

bool

true if the demuxer source was successfully built and configured; otherwise, false.

CleanUp()

Cleans up all resources associated with the demuxer operations, including container file handles and stream buffers.

public void CleanUp()

Dispose(bool)

Releases unmanaged and managed resources used by the demuxer source. Properly closes container file and disposes of GStreamer elements and stream processing resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

GetCore()

Gets the core GStreamer element wrapper for advanced configuration and monitoring.

public BaseElement GetCore()

Returns

BaseElement

Always null for composite source blocks with multiple internal elements.

GetElement()

Gets the native GStreamer element for direct GStreamer pipeline integration.

public Element GetElement()

Returns

Element

The demuxer source GStreamer element.

IsAvailable(DemuxerSourceSettings)

Determines whether demuxer functionality is available for the specified container format. Requires GStreamer demuxer plugins for the target container format to be installed and functional.

public static bool IsAvailable(DemuxerSourceSettings settings)

Parameters

settings DemuxerSourceSettings

The demuxer settings containing the container file to be analyzed for format compatibility.

Returns

bool

true if demuxer support is available for the specified format; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the pipeline context for this demuxer source, providing access to the parent pipeline and logging context.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The parent MediaBlocks pipeline containing this demuxer source.

See Also