Class AlphaCombineBlock
- Assembly
- VisioForge.Core.dll
Alpha combine block that merges a video stream with a separate alpha channel stream into a single video stream with transparency information. This block takes two input streams (one for RGB/YUV color data and one for alpha channel) and combines them into RGBA/YUVA output. Essential for compositing separate color and alpha streams into transparent video.
Supported features: Combining separate color and alpha streams into RGBA/YUVA
Use cases: Video compositing, merging decoded color and alpha streams, custom alpha processing
Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.public class AlphaCombineBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
AlphaCombineBlock()
Initializes a new instance of the VisioForge.Core.MediaBlocks.VideoProcessing.AlphaCombineBlock class. This constructor creates an alpha combine block that merges color and alpha streams.
public AlphaCombineBlock()Properties
AlphaInput
Gets the alpha input pad that accepts the alpha channel stream.
public MediaBlockPad AlphaInput { get; }Property Value
Input
Gets the primary input pad for receiving the color video stream.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets all input pads available on this block.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary output pad that provides the combined RGBA/YUVA stream.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets all output pads available on this block.
public override MediaBlockPad[] Outputs { get; }Property Value
Type
Gets the media block type identifier for this alpha combine block.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the alpha combine element within the pipeline, creating the necessary GStreamer elements and configuring the pads.
public override bool Build()Returns
- bool
-
trueif the block was successfully built and initialized;falseif an error occurred.
CleanUp()
Performs cleanup of internal resources, disposing of the element and resetting 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 underlying GStreamer element for advanced configuration and control.
public BaseElement GetCore()Returns
- BaseElement
-
The core alpha combine element instance.
GetElement()
Gets the native GStreamer element for direct manipulation and advanced use cases.
public Element GetElement()Returns
- Element
-
The underlying GStreamer alpha combine element.
IsAvailable()
Determines whether the alpha combine element is available on the current system. This method checks for the presence of the alphacombine GStreamer element. Ensure the appropriate GStreamer codec alpha plugin is installed.
public static bool IsAvailable()Returns
- bool
-
trueif the element is available and can be used; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this block, establishing the connection to the parent pipeline and enabling access to shared resources.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The parent MediaBlocksPipeline that contains this block.