Table of Contents

Class PanZoomBlock

Namespace
VisioForge.Core.MediaBlocks.VideoProcessing
Assembly
VisioForge.Core.dll

MediaBlock that applies pan and zoom transformations to video frames using Cairo. This block provides static and dynamic zoom and pan effects for video streams. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class PanZoomBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

PanZoomBlock()

Initializes a new instance of the VisioForge.Core.MediaBlocks.VideoProcessing.PanZoomBlock class.

public PanZoomBlock()

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[]

Type

Gets the type.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Constructs and initializes the pan zoom filter and its associated GStreamer elements.

public override bool Build()

Returns

bool

true if successful; false if initialization failed.

CleanUp()

Releases all resources and performs cleanup operations.

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.

public BaseElement GetCore()

Returns

BaseElement

The BaseElement wrapper instance.

GetElement()

Gets the underlying GStreamer element.

public Element GetElement()

Returns

Element

The GStreamer Element instance.

IsAvailable()

Determines whether the pan zoom filter is available on the current system.

public static bool IsAvailable()

Returns

bool

true if available; otherwise, false.

SetDynamicPan(VideoStreamDynamicPanSettings)

Sets the dynamic pan (translation) settings for the video stream. Dynamic pan interpolates between start and stop values based on the video timestamp.

public void SetDynamicPan(VideoStreamDynamicPanSettings settings)

Parameters

settings VideoStreamDynamicPanSettings

The dynamic pan settings to apply, or null to disable dynamic pan.

SetDynamicZoom(VideoStreamDynamicZoomSettings)

Sets the dynamic zoom settings for the video stream. Dynamic zoom interpolates between start and stop values based on the video timestamp.

public void SetDynamicZoom(VideoStreamDynamicZoomSettings settings)

Parameters

settings VideoStreamDynamicZoomSettings

The dynamic zoom settings to apply, or null to disable dynamic zoom.

SetPan(VideoStreamPanSettings)

Sets the static pan (translation) settings for the video stream.

public void SetPan(VideoStreamPanSettings settings)

Parameters

settings VideoStreamPanSettings

The pan settings to apply, or null to disable pan.

SetRect(VideoStreamRectSettings)

Sets the target rectangle settings for drawing the video into a specific rectangle. The video will be resized and positioned to fit within the specified rectangle. When enabled, this takes precedence over pan and zoom settings.

public void SetRect(VideoStreamRectSettings settings)

Parameters

settings VideoStreamRectSettings

The rect settings to apply, or null to disable rect mode.

SetZoom(VideoStreamZoomSettings)

Sets the static zoom settings for the video stream.

public void SetZoom(VideoStreamZoomSettings settings)

Parameters

settings VideoStreamZoomSettings

The zoom settings to apply, or null to disable zoom.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Associates this block with a pipeline and initializes its internal context.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The MediaBlocksPipeline instance that will manage this block.

See Also