Class VideoPaddingChangerBlock
- Assembly
- VisioForge.Core.dll
Video padding changer block for dynamic video positioning and animated transitions. This Windows-specific block enables dynamic padding adjustments to reposition and scale video within its frame, supporting smooth animated transitions. Features include real-time position changes, size adjustments, alpha blending during transitions, and precise timing control. Essential for picture-in-picture effects, animated video layouts, dynamic compositions, and professional presentations requiring smooth video repositioning and scaling animations. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class VideoPaddingChangerBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
VideoPaddingChangerBlock(VideoPaddingChangerSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.VideoProcessing.VideoPaddingChangerBlock class with specified padding settings.
public VideoPaddingChangerBlock(VideoPaddingChangerSettings settings)Parameters
settingsVideoPaddingChangerSettings-
The video padding changer configuration settings.
Properties
Input
Gets the input.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets the inputs.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the output.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets the outputs.
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the video padding changer settings. Contains the position, size, and animation parameters for dynamic video positioning.
public VideoPaddingChangerSettings Settings { get; set; }Property Value
Type
Gets the type.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Constructs and initializes the video padding changer and its associated elements. This method creates the padding changer with the specified settings, establishes input and output pads, and prepares the block for dynamic video positioning.
public override bool Build()Returns
- bool
-
trueif the padding changer was successfully built and configured;falseif initialization failed.
CleanUp()
Releases all resources and performs cleanup operations for this video padding changer block. This method resets the build state but does not dispose elements as they are handled in Dispose.
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. Returns null as this uses a custom element.
public BaseElement GetCore()Returns
- BaseElement
-
Always returns null for this custom element.
GetElement()
Gets the underlying GStreamer element that performs the padding changes.
public Element GetElement()Returns
- Element
-
The GStreamer Element instance representing the padding changer.
Input_Move(Rect, TimeSpan, double?, double?)
Animates the video position and opacity to a new location over the specified duration.
public void Input_Move(Rect rect, TimeSpan duration, double? startAlpha, double? endAlpha)Parameters
rectRect-
The target rectangle defining the new position and size.
durationTimeSpan-
The duration of the animation transition.
startAlphadouble?-
Optional starting opacity value (0.0-1.0).
endAlphadouble?-
Optional ending opacity value (0.0-1.0).
IsAvailable()
Determines whether this media block is available. Correct NuGet SDK redist should be included into your project.
public static bool IsAvailable()Returns
- bool
-
trueif this media block is available; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Associates this video padding changer 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.