Table of Contents

Class GPUPixelBeautyBlock

Namespace
VisioForge.Core.MediaBlocks.GPUPixel
Assembly
VisioForge.Core.dll

Beauty-face block backed by GPUPixel (skin smoothing and whitening). Requires the VisioForge.CrossPlatform.GPUPixel.* redistributable. Face slimming, eye enlarge, lipstick and blusher are forwarded to the native element but are no-ops on Windows until a 106-point face detector ships with that redistributable. Implements VisioForge.Core.MediaBlocks.IVideoProcessingBlock so it can be inserted into a VideoCaptureCoreX / MediaPlayerCoreX chain with Video_Processing_AddBlock.

public class GPUPixelBeautyBlock : MediaBlock, IMediaBlockInternals, IVideoProcessingBlock, IMediaBlock, IDisposable

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

GPUPixelBeautyBlock(GPUPixelBeautySettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.GPUPixel.GPUPixelBeautyBlock class.

public GPUPixelBeautyBlock(GPUPixelBeautySettings settings)

Parameters

settings GPUPixelBeautySettings

The settings. A null value is replaced with defaults.

GPUPixelBeautyBlock()

Initializes a new instance of the VisioForge.Core.MediaBlocks.GPUPixel.GPUPixelBeautyBlock class with default settings.

public GPUPixelBeautyBlock()

Properties

Input

Gets the input pad.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets the input pads.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the output pad.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets the output pads.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the beauty settings.

public GPUPixelBeautySettings Settings { get; set; }

Property Value

GPUPixelBeautySettings

Type

Gets the media block type identifier.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

ApplySettings()

Pushes the current VisioForge.Core.MediaBlocks.GPUPixel.GPUPixelBeautyBlock.Settings onto the running element. No-op until the block has been built, and after it has been disposed.

public void ApplySettings()

Build()

Constructs the videoconvert + gpupixelbeauty chain.

public override bool Build()

Returns

bool

true if the chain was built; otherwise, false.

CleanUp()

Releases the native element.

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.

GetCore()

Gets the core element wrapper.

public BaseElement GetCore()

Returns

BaseElement

The wrapper, or null before VisioForge.Core.MediaBlocks.GPUPixel.GPUPixelBeautyBlock.Build / after dispose.

GetElement()

Gets the underlying GStreamer element.

public Element GetElement()

Returns

Element

The native element, or null before VisioForge.Core.MediaBlocks.GPUPixel.GPUPixelBeautyBlock.Build / after dispose.

IsAvailable()

Determines whether the gpupixelbeauty element is registered. The correct GPUPixel NuGet redistributable must be referenced.

public static bool IsAvailable()

Returns

bool

true if the element is available; otherwise, false.

RemoveElementsFromPipeline()

Removes the owned elements from the pipeline. Idempotent.

public override void RemoveElementsFromPipeline()

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Associates this block with a pipeline.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The pipeline.