Table of Contents

Class GLDownloadBlock

Namespace
VisioForge.Core.MediaBlocks.OpenGL
Assembly
VisioForge.Core.dll

OpenGL GPU to system memory download block for transferring video frames from GPU memory to system memory. This block is essential for retrieving processed video data from GPU-accelerated OpenGL operations back to system memory for further CPU-based processing, encoding, or output operations. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class GLDownloadBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

GLDownloadBlock()

Initializes a new instance of the VisioForge.Core.MediaBlocks.OpenGL.GLDownloadBlock class for GPU to system memory transfers. Creates the necessary input and output pads for handling the memory transfer operation.

public GLDownloadBlock()

Properties

Input

Gets the primary input pad for receiving OpenGL video frames from GPU memory.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads available on this block (single input for GPU frames).

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary output pad for providing video frames in system memory.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads available on this block (single output for system memory frames).

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Type

Gets the media block type identifier for OpenGL download operations.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the OpenGL download block within the pipeline context. Creates the GStreamer download element and establishes the necessary pad connections for transferring video frames from GPU memory to system memory.

public override bool Build()

Returns

bool

true if the download block was successfully built and configured; otherwise, false.

CleanUp()

Cleans up all resources associated with the OpenGL download operation, including GStreamer elements and GPU memory allocations.

public void CleanUp()

Dispose(bool)

Releases unmanaged and managed resources used by the OpenGL download block. Properly disposes of GStreamer elements and GPU memory 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 for advanced configuration and monitoring.

public BaseElement GetCore()

Returns

BaseElement

The BaseElement wrapper providing access to the underlying GStreamer download element.

GetElement()

Gets the native GStreamer element for direct GStreamer pipeline integration.

public Element GetElement()

Returns

Element

The native Gst.Element representing the OpenGL download operation.

IsAvailable()

Determines whether OpenGL download functionality is available on the current system. Requires OpenGL support and appropriate GStreamer OpenGL plugins to be installed.

public static bool IsAvailable()

Returns

bool

true if OpenGL download operations are supported; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the pipeline context for this OpenGL download block, providing access to the parent pipeline and logging context.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The parent MediaBlocks pipeline containing this download block.

See Also