Class GLUploadBlock
- Namespace
- VisioForge.Core.MediaBlocks.OpenGL
- Assembly
- VisioForge.Core.dll
OpenGL-accelerated video data upload block for transferring video frames from system memory to GPU memory. Provides high-performance video frame upload operations that transfer video data from CPU memory to OpenGL textures on the GPU, enabling GPU-accelerated video processing, effects, and transformations within the OpenGL pipeline. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class GLUploadBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
GLUploadBlock()
Initializes a new instance of the VisioForge.Core.MediaBlocks.OpenGL.GLUploadBlock class for GPU memory upload operations. Creates the necessary input and output pads for transferring video frames from system memory to GPU memory.
public GLUploadBlock()Properties
Input
Gets the primary input pad for receiving video frames from system memory.
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 video frames in GPU memory.
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
Type
Gets the media block type identifier for OpenGL upload operations.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the OpenGL upload block within the pipeline context. Creates the GStreamer upload element and establishes the necessary pad connections for transferring video frames from system memory to GPU memory.
public override bool Build()Returns
- bool
-
trueif the upload block was successfully built and configured; otherwise,false.
CleanUp()
Cleans up all resources associated with the OpenGL upload operations, including GStreamer elements and GPU memory allocations.
public void CleanUp()Dispose(bool)
Releases unmanaged and managed resources used by the OpenGL upload block. Properly disposes of GStreamer elements and GPU memory transfer 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 upload element.
GetElement()
Gets the native GStreamer element for direct GStreamer pipeline integration.
public Element GetElement()Returns
- Element
-
The native Gst.Element representing the OpenGL upload filter.
IsAvailable()
Determines whether OpenGL upload functionality is available on the current system. Requires OpenGL support and appropriate GStreamer OpenGL memory transfer plugins to be installed.
public static bool IsAvailable()Returns
- bool
-
trueif upload operations are supported; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this OpenGL upload block, providing access to the parent pipeline and logging context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this upload block.