Class AV1ParseBlock
- Namespace
- VisioForge.Core.MediaBlocks.Parsers
- Assembly
- VisioForge.Core.dll
Parses AV1 (AOMedia Video 1) bitstreams for frame boundary detection and metadata extraction.
public class AV1ParseBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Remarks
The AV1ParseBlock analyzes AV1 bitstreams to identify frame boundaries, extract metadata, and prepare the stream for further processing. AV1 uses OBU (Open Bitstream Unit) structures to organize video data, including sequence headers, frame headers, and tile data.
Key features: - OBU parsing and validation - Frame boundary detection for proper packetization - Sequence and frame header extraction - Temporal unit and frame group identification - Profile and level verification - HDR metadata extraction when present
Common use cases: - Streaming: Preparing AV1 streams for RTP/WebRTC transmission - Muxing: Packaging AV1 video into container formats (MP4, WebM, MKV) - Analysis: Extracting codec configuration and stream properties - Transcoding: Providing properly parsed frames to decoders
The parser handles both Annex B format (with temporal unit delimiters) and raw OBU streams, automatically detecting the input format and processing accordingly.
Constructors
AV1ParseBlock()
Initializes a new instance of the VisioForge.Core.MediaBlocks.Parsers.AV1ParseBlock class.
public AV1ParseBlock()Remarks
Creates input and output pads configured for video media type. The parser will automatically detect the AV1 stream format (Annex B or raw OBU) during processing.
Properties
Input
Gets the primary input pad for receiving AV1 bitstream data.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads available on this block.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary output pad that provides parsed AV1 frames.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block.
public override MediaBlockPad[] Outputs { get; }Property Value
Type
Gets the type of this media block.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the AV1 parser element within the media pipeline.
public override bool Build()Returns
- bool
-
trueif the parser was successfully created and configured;falseif initialization failed or required plugins are missing.
Remarks
This method creates the GStreamer AV1 parser element, initializes it within the pipeline context, and connects the input/output pads. The parser will begin processing data 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
disposingbool-
trueto release both managed and unmanaged resources;falseto 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 AV1 parsing.
IsAvailable()
Determines whether the AV1 parser is available in the current GStreamer installation.
public static bool IsAvailable()Returns
- bool
-
trueif the AV1 parser plugin is available; otherwise,false. This requires the GStreamer libav or bad plugins to be installed.
Remarks
The AV1 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
pipelineMediaBlocksPipeline-
The media pipeline that will contain this parser block.