Class DecklinkAudioSinkBlock
- Namespace
- VisioForge.Core.MediaBlocks.Decklink
- Assembly
- VisioForge.Core.dll
Provides audio output capabilities for Blackmagic DeckLink hardware devices. This block accepts audio streams and outputs them through professional DeckLink capture/playback cards, supporting high-quality audio output for broadcast and professional video production workflows. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class DecklinkAudioSinkBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
DecklinkAudioSinkBlock(DecklinkAudioSinkSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Decklink.DecklinkAudioSinkBlock class. Creates a new DeckLink audio sink block configured with the specified settings.
public DecklinkAudioSinkBlock(DecklinkAudioSinkSettings settings)Parameters
settingsDecklinkAudioSinkSettings-
The configuration settings specifying device, format, and audio output parameters.
Properties
Input
Gets the primary input pad for receiving audio data. This sink block has a single input pad for audio streams.
public override MediaBlockPad Input { get; }Property Value
Inputs
Gets an array containing all input pads for this block. DecklinkAudioSink has a single audio input pad.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
Gets the primary output pad. Returns null as this is a sink block with no outputs. Audio data is sent directly to the DeckLink hardware.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets an array of output pads. Returns an empty array as this is a sink block.
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the configuration settings for the DeckLink audio output. These settings control device selection, audio format, channel configuration, and other output parameters.
public DecklinkAudioSinkSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for this DeckLink audio sink.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the DeckLink audio sink element within the pipeline. This method creates the GStreamer element, configures it with the specified settings, and establishes the input pad connections.
public override bool Build()Returns
- bool
-
trueif the build was successful;falseif initialization failed.
CleanUp()
Performs cleanup of internal resources including the GStreamer element. This method releases the DeckLink hardware resources and resets the build state.
public void CleanUp()Dispose(bool)
Releases unmanaged and - optionally - managed resources. Ensures proper cleanup of DeckLink hardware resources and GStreamer elements.
protected override void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
GetCore()
Gets the core GStreamer element wrapper for advanced manipulation. This provides access to the underlying DecklinkAudioSink element for direct GStreamer operations.
public BaseElement GetCore()Returns
- BaseElement
-
The BaseElement wrapper containing the DecklinkAudioSink GStreamer element.
GetDevicesAsync()
Asynchronously enumerates all available DeckLink audio output devices on the system. This method scans for DeckLink hardware capable of audio output and returns device information.
public static Task<DecklinkAudioSinkInfo[]> GetDevicesAsync()Returns
- Task<DecklinkAudioSinkInfo[]>
-
A task that returns an array of VisioForge.Core.Types.X.Decklink.DecklinkAudioSinkInfo objects describing available devices.
GetElement()
Gets the raw GStreamer element for direct GStreamer API access. Use with caution as direct manipulation may interfere with the MediaBlocks pipeline.
public Element GetElement()Returns
- Element
-
The underlying GStreamer Gst.Element instance.
IsAvailable()
Determines whether DeckLink audio output functionality is available on the current system. This checks for the presence of required DeckLink drivers and GStreamer plugins. Correct NuGet SDK redist should be included into your project.
public static bool IsAvailable()Returns
- bool
-
trueif DeckLink audio output is available; otherwise,false.
IMediaBlockInternals.SetContext(MediaBlocksPipeline)
Sets the pipeline context for this media block. This internal method is called by the MediaBlocks framework to establish the pipeline relationship.
void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)Parameters
pipelineMediaBlocksPipeline-
The MediaBlocksPipeline that owns this block.