Table of Contents

Class DecklinkVideoAudioSourceBlock

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

Provides combined video and audio input capabilities from Blackmagic DeckLink hardware devices. This block captures synchronized video and audio streams from professional DeckLink capture cards, supporting high-quality capture for broadcast and professional video production workflows. The captured streams are processed through a multi-queue element to maintain synchronization. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class DecklinkVideoAudioSourceBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

Initializes a new instance of the VisioForge.Core.MediaBlocks.Decklink.DecklinkVideoAudioSourceBlock class. Creates a new combined DeckLink video and audio source configured with the specified settings.

public DecklinkVideoAudioSourceBlock(DecklinkVideoSourceSettings videoSettings, DecklinkAudioSourceSettings audioSettings)

Parameters

videoSettings DecklinkVideoSourceSettings

The configuration settings for video capture including format and device selection.

audioSettings DecklinkAudioSourceSettings

The configuration settings for audio capture including format and synchronization.

Properties

Gets the audio output pad for providing captured audio streams.

public MediaBlockPad AudioOutput { get; }

Property Value

MediaBlockPad

Gets or sets the configuration settings for the DeckLink audio input. These settings control audio format, sample rate, channels, and capture parameters.

public DecklinkAudioSourceSettings AudioSettings { get; set; }

Property Value

DecklinkAudioSourceSettings

Gets the primary input pad. Returns null as this is a source block with no inputs. Video and audio are 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. Returns null as this block has multiple outputs. Use VideoOutput and AudioOutput properties to access specific output pads.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Gets an array containing all output pads for this block. DecklinkVideoAudioSource has two output pads: one for video and one for audio.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

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

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Gets the video output pad for providing captured video streams.

public MediaBlockPad VideoOutput { get; }

Property Value

MediaBlockPad

Gets or sets the configuration settings for the DeckLink video input. These settings control video format, resolution, frame rate, and capture parameters.

public DecklinkVideoSourceSettings VideoSettings { get; set; }

Property Value

DecklinkVideoSourceSettings

Methods

Builds and initializes both DeckLink video and audio source elements within the pipeline. This method creates the GStreamer elements for video and audio capture, configures them, establishes the multi-queue for synchronization, and sets up output pad connections.

public override bool Build()

Returns

bool

true if both video and audio sources were built successfully; false if initialization failed.

Performs cleanup of internal resources including video source, audio source, and multi-queue elements. This method releases all DeckLink hardware resources and resets the build state.

public void CleanUp()

Releases unmanaged and - optionally - managed resources. Ensures proper cleanup of both video and audio 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. Returns null as this block manages multiple elements. Use the individual video and audio source properties to access specific elements.

public BaseElement GetCore()

Returns

BaseElement

Always returns null for this composite block.

Asynchronously enumerates all available DeckLink video capture devices on the system. This method scans for DeckLink hardware capable of video input and returns device information. Note: Audio capture availability is determined by the same devices that support video.

public static Task<DecklinkVideoSourceInfo[]> GetDevicesAsync()

Returns

Task<DecklinkVideoSourceInfo[]>

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

Gets the raw GStreamer element. Returns null as this block manages multiple elements. Use the individual video and audio source properties to access specific elements.

public Element GetElement()

Returns

Element

Always returns null for this composite block.

Determines whether DeckLink video and 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 video 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