Class GLOverlayBlock
- Namespace
- VisioForge.Core.MediaBlocks.OpenGL
- Assembly
- VisioForge.Core.dll
OpenGL-accelerated image overlay block for compositing static images and graphics onto video streams. Provides GPU-accelerated overlay capabilities with alpha blending, positioning, scaling, and rotation support for watermarks, logos, graphics overlays, and picture-in-picture compositions with real-time performance. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class GLOverlayBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
GLOverlayBlock(GLOverlaySettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.OpenGL.GLOverlayBlock class with the specified overlay settings. Creates the necessary input and output pads for video processing with image overlay composition.
public GLOverlayBlock(GLOverlaySettings settings)Parameters
settingsGLOverlaySettings-
The overlay settings that define the image source, positioning, and blending parameters.
Properties
Input
Gets the primary input pad for receiving base video frames for overlay composition.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads available on this block (single input for video processing).
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary output pad for providing overlay-composited video frames.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block (single output for processed video).
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the overlay settings that control image positioning, scaling, alpha blending, and transformation parameters.
public GLOverlaySettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for OpenGL overlay operations.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the OpenGL overlay block within the pipeline context. Creates the GStreamer overlay element, configures the overlay settings, and establishes the necessary pad connections for processing video frames with image composition.
public override bool Build()Returns
- bool
-
trueif the overlay block was successfully built and configured; otherwise,false.
CleanUp()
Cleans up all resources associated with the OpenGL overlay operation, including GStreamer elements and GPU compositing resources.
public void CleanUp()Dispose(bool)
Releases unmanaged and managed resources used by the OpenGL overlay block. Properly disposes of GStreamer elements and GPU compositing 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 for advanced configuration and monitoring.
public BaseElement GetCore()Returns
- BaseElement
-
The BaseElement wrapper providing access to the underlying GStreamer overlay element.
GetElement()
Gets the native GStreamer element for direct GStreamer pipeline integration.
public Element GetElement()Returns
- Element
-
The native Gst.Element representing the image overlay compositor.
IsAvailable()
Determines whether OpenGL overlay functionality is available on the current system. Requires OpenGL support and appropriate GStreamer OpenGL compositing plugins to be installed.
public static bool IsAvailable()Returns
- bool
-
trueif overlay composition operations are supported; otherwise,false.
UpdateSettings()
Updates the overlay settings in real-time, allowing dynamic changes to image position, scale, rotation, and alpha blending.
public void UpdateSettings()IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this OpenGL overlay block, providing access to the parent pipeline and logging context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this overlay block.