Table of Contents

Class D3D12InterlaceBlock

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

Direct3D 12 block that converts progressive video to interlaced video on the GPU. This is the opposite of deinterlacing: the input must be progressive, and the output is interleaved interlaced video with the field order set by VisioForge.Core.Types.X.VideoEffects.D3D12InterlaceSettings.TopFieldFirst. The output frame rate follows from the input rate and VisioForge.Core.Types.X.VideoEffects.D3D12InterlaceSettings.FieldPattern. The block moves frames to and from the GPU itself: its input and its output each take system, D3D11 or D3D12 memory, whichever the neighbouring block uses, and D3D12 memory on the block's own adapter passes through without a copy on both sides. The output can be linked only to a consumer that accepts interlaced video. Requires a Direct3D 12 capable GPU. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals.

public class D3D12InterlaceBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

D3D12InterlaceBlock(D3D12InterlaceSettings)

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

public D3D12InterlaceBlock(D3D12InterlaceSettings settings)

Parameters

settings D3D12InterlaceSettings

The interlacing settings.

Exceptions

ArgumentNullException

settings is null.

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 the interlacing settings. They are applied when the block is built.

public D3D12InterlaceSettings Settings { get; }

Property Value

D3D12InterlaceSettings

Type

Gets the type.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds the block.

public override bool Build()

Returns

bool

true if successful, false otherwise.

CleanUp()

Releases the GStreamer elements and resets the build state.

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 of the upload, interlace and download elements.

GetElement()

Gets the underlying GStreamer d3d12interlace element.

public Element GetElement()

Returns

Element

The d3d12interlace element, or null before the block is built.

IsAvailable()

Determines whether this media block is available. Correct NuGet SDK redist should be included into your project. It does not check for a Direct3D 12 GPU: a missing device is reported as a pipeline error on start.

public static bool IsAvailable()

Returns

bool

true if this media block is available; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Associates this block with a pipeline.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The pipeline.

See Also