Table of Contents

Class H265ParseBlock

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

Parses H.265/HEVC (High Efficiency Video Coding) bitstreams for NAL unit processing and frame boundary detection.

public class H265ParseBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Remarks

The H265ParseBlock processes H.265/HEVC encoded video streams, parsing NAL (Network Abstraction Layer) units, extracting VPS/SPS/PPS parameters, and ensuring proper access unit boundaries. H.265 offers approximately 50% better compression than H.264 while maintaining similar video quality.

Key features: - NAL unit parsing with support for multi-layer extensions - VPS (Video Parameter Set), SPS, and PPS extraction - Access unit boundary detection per HEVC specification - Temporal layer identification and scalability support - SEI message parsing including HDR metadata (HDR10, HLG) - Support for both Annex B and HVCC (length-prefixed) formats - Slice segment header analysis for frame type detection

Common use cases: - Streaming: Preparing HEVC for HLS, DASH, or RTP transmission - Muxing: Packaging HEVC into MP4, MKV, or TS containers - HDR processing: Extracting and preserving HDR metadata - Transcoding: Providing properly parsed NAL units to HEVC decoders - 4K/8K video: Handling high-resolution video streams efficiently

The parser handles various HEVC profiles including Main, Main 10, Main Still Picture, and Range Extensions. It automatically detects stream characteristics including bit depth, chroma format, and HDR signaling.

Constructors

H265ParseBlock()

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

public H265ParseBlock()

Remarks

Creates input and output pads configured for video media type. The parser will automatically detect the H.265 stream format (Annex B with start codes or HVCC with length prefixes) and handle HDR metadata when present.

Properties

Input

Gets the primary input pad for receiving H.265/HEVC 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 H.265/HEVC access units.

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 H.265/HEVC 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 H.265 parser element, initializes it within the pipeline context, and connects the input/output pads. The parser will begin processing NAL units 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 H.265/HEVC NAL unit parsing.

IsAvailable()

Determines whether the H.265/HEVC parser is available in the current GStreamer installation.

public static bool IsAvailable()

Returns

bool

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

Remarks

The H.265 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