Table of Contents

Class QTDemuxBlock

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

QuickTime/MP4/MOV demultiplexer block for extracting individual streams from container files. This block parses QuickTime-based container formats (MP4, MOV, M4A, 3GP) and separates them into individual video, audio, subtitle, and metadata streams. Supports advanced features including fragmented MP4, multiple tracks, chapter information, and embedded metadata. Essential for playback applications, transcoding workflows, stream analysis, and any scenario requiring access to individual streams within QuickTime containers. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class QTDemuxBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

QTDemuxBlock(bool, bool, bool, bool)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Sources.QTDemuxBlock class with configurable stream extraction options.

public QTDemuxBlock(bool renderVideo = true, bool renderAudio = true, bool renderSubtitle = false, bool renderMetadata = false)

Parameters

renderVideo bool

if set to true extract and output video streams.

renderAudio bool

if set to true extract and output audio streams.

renderSubtitle bool

if set to true extract and output subtitle streams.

renderMetadata bool

if set to true extract and output metadata streams.

Properties

AudioOutput

Gets the audio output pad for extracted audio streams. Only available when audio rendering is enabled.

public MediaBlockPad AudioOutput { get; }

Property Value

MediaBlockPad

Input

Gets the input.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets the inputs.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

MetadataOutput

Gets the metadata output pad for extracted metadata streams. Only available when metadata rendering is enabled.

public MediaBlockPad MetadataOutput { get; }

Property Value

MediaBlockPad

Output

Gets the output.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets the outputs.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

SubtitleOutput

Gets the subtitle output pad for extracted subtitle streams. Only available when subtitle rendering is enabled.

public MediaBlockPad SubtitleOutput { get; }

Property Value

MediaBlockPad

Type

Gets the type.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

VideoOutput

Gets the video output pad for extracted video streams. Only available when video rendering is enabled.

public MediaBlockPad VideoOutput { get; }

Property Value

MediaBlockPad

Methods

Build()

Constructs and initializes the QuickTime demux and associated queue elements. This method creates the demux element, sets up dynamic pad handlers for each stream type, creates queue elements for enabled streams, and establishes output pad connections.

public override bool Build()

Returns

bool

true if the demux was successfully built and configured; false if initialization failed.

CleanUp()

Releases all resources and performs cleanup operations for this QuickTime demux block. This method disposes of the demux element and all queue elements, then resets the build state.

public void CleanUp()

Dispose(bool)

Releases unmanaged and - optionally - managed 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 BaseElement wrapper. Returns null as the demux element is accessed directly without a wrapper.

public BaseElement GetCore()

Returns

BaseElement

Always returns null for this implementation.

GetElement()

Gets the underlying GStreamer element that performs the QuickTime demuxing.

public Element GetElement()

Returns

Element

The GStreamer Element instance representing the QT demux.

IsAvailable()

Determines whether this media block is available. Correct NuGet SDK redist should be included into your project.

public static bool IsAvailable()

Returns

bool

true if this media block is available; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Associates this QuickTime demux block with a pipeline and initializes its internal context. This method is called internally when the block is added to a pipeline.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The MediaBlocksPipeline instance that will manage this block.

See Also