Class GLColorBalanceBlock
- Namespace
- VisioForge.Core.MediaBlocks.OpenGL
- Assembly
- VisioForge.Core.dll
OpenGL color balance block for professional color correction and grading. This block provides GPU-accelerated color adjustment capabilities including hue, saturation, brightness, contrast, gamma correction, and white balance adjustments. Uses OpenGL shaders for real-time color manipulation with professional-grade precision. Essential for broadcast video production, color grading workflows, and correcting color cast issues. Supports RGB channel-specific adjustments and maintains color accuracy throughout the processing pipeline. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class GLColorBalanceBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
GLColorBalanceBlock(GLColorBalanceVideoEffect)
Initializes a new instance of the VisioForge.Core.MediaBlocks.OpenGL.GLColorBalanceBlock class with the specified color correction settings.
public GLColorBalanceBlock(GLColorBalanceVideoEffect settings)Parameters
settingsGLColorBalanceVideoEffect-
The color balance video effect settings containing color grading parameters.
Properties
Input
Gets the input pad for connecting video sources to be processed.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads for this color balance block.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the output pad for connecting to downstream processing blocks.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads for this color balance block.
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the color balance configuration settings. Defines color correction parameters including hue, saturation, brightness, and contrast adjustments.
public GLColorBalanceVideoEffect Settings { get; set; }Property Value
Type
Gets the media block type identifier.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Constructs and initializes the OpenGL color balance element within the pipeline. This method creates the color balance filter with the specified correction settings, establishes input and output pads, and prepares the block for GPU-accelerated processing.
public override bool Build()Returns
- bool
-
trueif the color balance element was successfully built and configured;falseif initialization failed.
CleanUp()
Releases all resources and performs cleanup operations for this OpenGL color balance block. This method disposes of the color balance filter and resets the build state.
public void 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 BaseElement wrapper that provides additional functionality around the OpenGL color balance filter.
public BaseElement GetCore()Returns
- BaseElement
-
The BaseElement wrapper instance that encapsulates the color balance functionality.
GetElement()
Gets the underlying GStreamer element that performs the color balance operation.
public Element GetElement()Returns
- Element
-
The GStreamer Element instance representing the OpenGL color balance filter.
IsAvailable()
Determines whether this media block is available. Correct NuGet SDK redist should be included into your project. Checks for OpenGL support and GPU shader capabilities.
public static bool IsAvailable()Returns
- bool
-
trueif OpenGL color balance functionality is available; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Associates this OpenGL color balance block with a pipeline and initializes its internal context. This method is called internally when the block is added to a pipeline.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The MediaBlocksPipeline instance that will manage this block.