Table of Contents

Class VC1ParseBlock

Namespace
VisioForge.Core.MediaBlocks.Parsers
Assembly
VisioForge.Core.dll

Parses VC-1/WMV3 (Windows Media Video) bitstreams for frame boundary detection and codec parameter extraction.

public class VC1ParseBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Remarks

The VC1ParseBlock processes VC-1 encoded video streams, parsing Sequence Layer Headers, Entry Point Headers, and Picture Headers to ensure proper frame boundaries. VC-1 is Microsoft's video codec standard (SMPTE 421M) used in WMV9, HD DVD, and Blu-ray.

Key features: - Sequence Layer Header parsing for codec profile and level detection - Entry Point Header processing for display parameters - Picture Header analysis for frame type determination (I, P, B, BI) - Support for Simple, Main, and Advanced Profiles - Handles both ASF encapsulated and raw VC-1 bitstreams - Frame boundary detection based on VC-1 specification - Interlaced and progressive content support

Common use cases: - Streaming: Processing WMV content for adaptive streaming - Muxing: Packaging VC-1 into ASF, MP4, or MKV containers - Transcoding: Providing properly parsed frames to VC-1 decoders - Broadcast: Handling VC-1 streams in broadcast applications - Media analysis: Extracting codec parameters and stream properties

The parser handles all VC-1 profiles including Simple Profile (WMV9 Simple), Main Profile (WMV9 Main), and Advanced Profile (WVC1), automatically adapting to the stream characteristics and ensuring compliance with SMPTE 421M.

Constructors

VC1ParseBlock()

Initializes a new instance of the VisioForge.Core.MediaBlocks.Parsers.VC1ParseBlock class.

public VC1ParseBlock()

Remarks

Creates input and output pads configured for video media type. The parser will automatically detect the VC-1 profile (Simple, Main, or Advanced) and stream format (raw or ASF-encapsulated) upon receiving data.

Properties

Input

Gets the primary input pad for receiving VC-1 bitstream data.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads available on this block.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary output pad that provides parsed VC-1 frames.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads available on this block.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Type

Gets the type of this media block.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the VC-1 parser element within the media pipeline.

public override bool Build()

Returns

bool

true if the parser was successfully created and configured; false if initialization failed or required plugins are missing.

Remarks

This method creates the GStreamer VC-1 parser element, initializes it within the pipeline context, and connects the input/output pads. The parser will begin processing VC-1 frames once the pipeline transitions to the playing state.

CleanUp()

Performs cleanup of the parser resources and resets the build state.

public void CleanUp()

Remarks

This method disposes of the GStreamer element and resets internal state. It is called during disposal to ensure proper resource 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 GStreamer element wrapper.

public BaseElement GetCore()

Returns

BaseElement

The base element wrapper providing access to common GStreamer functionality.

GetElement()

Gets the underlying native GStreamer element.

public Element GetElement()

Returns

Element

The native GStreamer element instance used for VC-1 bitstream parsing.

IsAvailable()

Determines whether the VC-1 parser is available in the current GStreamer installation.

public static bool IsAvailable()

Returns

bool

true if the VC-1 parser plugin is available; otherwise, false. This requires the GStreamer bad plugins to be installed.

Remarks

The VC-1 parser is provided by the GStreamer bad plugins collection. Ensure the appropriate VisioForge SDK redistribution package is included in your project.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the media pipeline context for this block.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The media pipeline that will contain this parser block.

See Also