Class GLVideoRendererBlock
- Namespace
- VisioForge.Core.MediaBlocks.OpenGL
- Assembly
- VisioForge.Core.dll
OpenGL-accelerated video renderer block for high-performance video display and presentation. Provides GPU-accelerated video rendering capabilities with direct OpenGL texture rendering to display surfaces, enabling hardware-accelerated video playback, real-time preview, and efficient video output with cross-platform support. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class GLVideoRendererBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals, IMediaBlockRendererInheritance
Implements
Inherited Members
Extension Methods
Constructors
GLVideoRendererBlock(IVideoView)
Initializes a new instance of the VisioForge.Core.MediaBlocks.OpenGL.GLVideoRendererBlock class with the specified video view. Creates the necessary input pad for receiving video frames and associates the renderer with the provided display surface.
public GLVideoRendererBlock(IVideoView videoView)Parameters
videoViewIVideoView-
The video view control that provides the display surface for rendering.
Properties
Input
Gets the primary input pad for receiving video frames to be displayed.
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
IsSync
Gets or sets a value indicating whether to synchronize video frames with the pipeline clock. True for playback applications to maintain proper timing, false for transcoding applications where speed is prioritized.
public bool IsSync { get; set; }Property Value
Output
Gets the primary output pad (none for renderer blocks that display content).
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block (none for renderer blocks).
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the video renderer settings that control display properties, aspect ratio, and rendering behavior.
public GLVideoRendererSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for OpenGL video renderer operations.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the OpenGL video renderer block within the pipeline context. Creates the GStreamer video renderer element, configures the display surface, applies the renderer settings, and establishes the necessary input pad connections for receiving video frames to display.
public override bool Build()Returns
- bool
-
trueif the video renderer block was successfully built and configured; otherwise,false.
CleanUp()
Cleans up all resources associated with the OpenGL video renderer, including GStreamer elements and display surface connections.
public void CleanUp()Dispose(bool)
Releases unmanaged and managed resources used by the OpenGL video renderer 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
-
The BaseElement wrapper providing access to the underlying GStreamer video renderer.
GetElement()
Gets the native GStreamer element for direct GStreamer pipeline integration.
public Element GetElement()Returns
- Element
-
The native Gst.Element representing the OpenGL video renderer.
GetVideoView()
Gets the video view control that provides the display surface for video rendering.
public IVideoView GetVideoView()Returns
- IVideoView
-
The IVideoView interface for the associated display surface.
IsAvailable()
Determines whether OpenGL video renderer functionality is available on the current system. Requires OpenGL support and appropriate GStreamer OpenGL video rendering plugins to be installed.
public static bool IsAvailable()Returns
- bool
-
trueif video rendering operations are supported; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this OpenGL video renderer block, providing access to the parent pipeline and logging context.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocks pipeline containing this video renderer block.