Class D3D12InterlaceBlock
- 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, IMediaBlockInternalsInheritance
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
settingsD3D12InterlaceSettings-
The interlacing settings.
Exceptions
- ArgumentNullException
-
settingsisnull.
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 the interlacing settings. They are applied when the block is built.
public D3D12InterlaceSettings Settings { get; }Property Value
Type
Gets the type.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds the block.
public override bool Build()Returns
- bool
-
trueif successful,falseotherwise.
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
disposingbool-
trueto release both managed and unmanaged resources;falseto 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
nullbefore 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
-
trueif this media block is available; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Associates this block with a pipeline.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The pipeline.