Class GLVirtualVideoSourceBlock
- Namespace
- VisioForge.Core.MediaBlocks.OpenGL
- Assembly
- VisioForge.Core.dll
OpenGL-accelerated virtual video source block for generating programmable GPU-based video content. Provides high-performance virtual video generation capabilities using OpenGL shaders and GPU rendering to create synthetic video content, test patterns, procedural animations, and custom graphics for pipeline processing. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class GLVirtualVideoSourceBlock : SourceMediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
GLVirtualVideoSourceBlock(GLVirtualVideoSourceSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.OpenGL.GLVirtualVideoSourceBlock class with the specified generation settings. Creates the necessary output pad for providing virtual video content generated using OpenGL GPU rendering.
public GLVirtualVideoSourceBlock(GLVirtualVideoSourceSettings settings)Parameters
settingsGLVirtualVideoSourceSettings-
The virtual video source settings that define the content generation and rendering parameters.
Properties
Input
Gets the primary input pad (none for source blocks that generate content).
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads available on this block (none for source blocks).
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary output pad for providing generated virtual video frames.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block (single output for generated video).
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the virtual video source settings that control content generation, resolution, frame rate, and rendering parameters.
public GLVirtualVideoSourceSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for OpenGL virtual video source operations.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the OpenGL virtual video source block within the pipeline context. Creates the GStreamer virtual video source, applies the generation settings, configures the video queue, and establishes the necessary output pad connections for providing generated virtual video content.
public override bool Build()Returns
- bool
-
trueif the virtual video source block was successfully built and configured; otherwise,false.
CleanUp()
Cleans up all resources associated with the OpenGL virtual video source, including GStreamer elements and GPU rendering contexts.
public void CleanUp()Dispose(bool)
Releases unmanaged and managed resources used by the OpenGL virtual video source block. Properly disposes of GStreamer elements and GPU rendering 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
-
Always null for composite source blocks with internal elements.
GetElement()
Gets the native GStreamer element for direct GStreamer pipeline integration.
public Element GetElement()Returns
- Element
-
The native Gst.Element representing the virtual video source.
IsAvailable()
Determines whether OpenGL virtual video source functionality is available on the current system. Requires OpenGL support and appropriate GStreamer OpenGL video generation plugins to be installed.
public static bool IsAvailable()Returns
- bool
-
trueif virtual video generation is supported; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this OpenGL virtual video source block, providing access to the parent pipeline and logging context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this virtual video source block.