Class AMAScalerBlock
- Namespace
- VisioForge.Core.MediaBlocks
- Assembly
- VisioForge.Core.dll
AMD AMA (Alveo MA35D) hardware video scaler block for Linux systems. This block resizes video (and optionally halves the frame rate) on the AMD MA35D media accelerator. The scaling runs entirely in device memory; the block wraps the ama_scaler element in the chain ama_upload ! ama_scaler ! capsfilter ! ama_download so it accepts system-memory frames on its input and hands system-memory frames downstream. Requires the AMD AMA Video SDK (kernel driver + GStreamer plugins) to be installed. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class AMAScalerBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
AMAScalerBlock(AMAScalerSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.AMAScalerBlock class with the specified settings.
public AMAScalerBlock(AMAScalerSettings settings)Parameters
settingsAMAScalerSettings-
The scaler settings (output size, device, frame-rate mode).
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 or sets the scaler settings (output size, device, frame-rate mode).
public AMAScalerSettings Settings { get; set; }Property Value
Type
Gets the type.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Constructs and initializes the AMA scaler chain within the pipeline and wires the block pads.
public override bool Build()Returns
- bool
-
trueif the scaler was successfully built and configured;falseif initialization failed.
CleanUp()
Releases all resources and performs cleanup operations for this AMA scaler block.
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 that encapsulates the AMA scaler chain.
public BaseElement GetCore()Returns
- BaseElement
-
The BaseElement wrapper instance.
GetElement()
Gets the underlying GStreamer input element (ama_upload) of the scaler chain.
public Element GetElement()Returns
- Element
-
The GStreamer Element instance.
IsAvailable()
Determines whether this media block is available. Correct NuGet SDK redist should be included into your project.
public static bool IsAvailable()Returns
- bool
-
trueif the ama_upload, ama_scaler and ama_download elements are present; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Associates this AMA scaler 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
pipelineMediaBlocksPipeline-
The MediaBlocksPipeline instance that will manage this block.