Table of Contents

Class VideoPaddingChangerBlock

Namespace
VisioForge.Core.MediaBlocks.VideoProcessing
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, IMediaBlockInternals

Inheritance

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

settings VideoPaddingChangerSettings

The video padding changer configuration settings.

Properties

Input

Gets the input.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets the inputs.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the output.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets the outputs.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

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

VideoPaddingChangerSettings

Type

Gets the type.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

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

true if the padding changer was successfully built and configured; false if 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

disposing bool

true to release both managed and unmanaged resources; false to 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

rect Rect

The target rectangle defining the new position and size.

duration TimeSpan

The duration of the animation transition.

startAlpha double?

Optional starting opacity value (0.0-1.0).

endAlpha double?

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

true if 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

pipeline MediaBlocksPipeline

The MediaBlocksPipeline instance that will manage this block.

See Also