Table of Contents

Class DecklinkAudioSourceBlock

Namespace
VisioForge.Core.MediaBlocks.Decklink
Assembly
VisioForge.Core.dll

Provides audio input capabilities from Blackmagic DeckLink hardware devices. This block captures audio streams from professional DeckLink capture cards, supporting high-quality audio capture for broadcast and professional video production workflows. The captured audio is processed through a queue and converter for optimal format compatibility. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class DecklinkAudioSourceBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

Initializes a new instance of the VisioForge.Core.MediaBlocks.Decklink.DecklinkAudioSourceBlock class. Creates a new DeckLink audio source block configured with the specified settings.

public DecklinkAudioSourceBlock(DecklinkAudioSourceSettings settings)

Parameters

settings DecklinkAudioSourceSettings

The configuration settings specifying device, format, and audio capture parameters.

Properties

Gets the primary input pad. Returns null as this is a source block with no inputs. Audio is captured directly from the DeckLink hardware.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Gets an array of input pads. Returns an empty array as this is a source block.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Gets the primary output pad for providing captured audio data. This source block has a single output pad for audio streams.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Gets an array containing all output pads for this block. DecklinkAudioSource has a single audio output pad.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Gets or sets the configuration settings for the DeckLink audio input. These settings control device selection, audio format, channel configuration, and capture parameters.

public DecklinkAudioSourceSettings Settings { get; set; }

Property Value

DecklinkAudioSourceSettings

Gets the media block type identifier for this DeckLink audio source.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Builds and initializes the DeckLink audio source element within the pipeline. This method creates the GStreamer elements (source, queue, converter), configures them, establishes internal links, and sets up the output pad connection.

public override bool Build()

Returns

bool

true if the build was successful; false if initialization failed.

Performs cleanup of internal resources including all GStreamer elements. This method releases the DeckLink hardware resources, queue, converter, and resets the build state.

public void CleanUp()

Releases unmanaged and - optionally - managed resources. Ensures proper cleanup of DeckLink hardware resources and GStreamer elements.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Gets the core GStreamer element wrapper for advanced manipulation. This provides access to the underlying DecklinkAudioSource element for direct GStreamer operations.

public BaseElement GetCore()

Returns

BaseElement

The BaseElement wrapper containing the DecklinkAudioSource GStreamer element.

Asynchronously enumerates all available DeckLink audio capture devices on the system. This method scans for DeckLink hardware capable of audio input and returns device information.

public static Task<DecklinkAudioSourceInfo[]> GetDevicesAsync()

Returns

Task<DecklinkAudioSourceInfo[]>

A task that returns an array of VisioForge.Core.Types.X.Decklink.DecklinkAudioSourceInfo objects describing available devices.

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.

Determines whether DeckLink audio capture 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

true if DeckLink audio capture is available; otherwise, false.

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

pipeline MediaBlocksPipeline

The MediaBlocksPipeline that owns this block.

See Also