Table of Contents

Class DecklinkVideoAudioSinkBlock

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

Provides combined video and audio output capabilities for Blackmagic DeckLink hardware devices. This block accepts synchronized video and audio streams and outputs them through professional DeckLink capture/playback cards, supporting high-quality output for broadcast and professional video production workflows. The block manages separate video and audio sinks internally to ensure proper synchronization. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class DecklinkVideoAudioSinkBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals, IMediaBlockDynamicInputs

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

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

public DecklinkVideoAudioSinkBlock(DecklinkVideoSinkSettings videoSinkSettings, DecklinkAudioSinkSettings audioSinkSettings)

Parameters

videoSinkSettings DecklinkVideoSinkSettings

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

audioSinkSettings DecklinkAudioSinkSettings

The configuration settings for audio output including format and synchronization.

Properties

Gets the audio input pad for receiving audio streams.

public MediaBlockPad AudioInput { get; }

Property Value

MediaBlockPad

Gets or sets the configuration settings for the DeckLink audio output. These settings control audio format, sample rate, channels, and other audio-specific parameters.

public DecklinkAudioSinkSettings AudioSinkSettings { get; set; }

Property Value

DecklinkAudioSinkSettings

Gets the primary input pad for this block, which is the video input pad. For audio input, use the AudioInput property.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

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

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Gets the primary output pad. Returns null as this is a sink block with no outputs. Video and audio data are sent directly to the DeckLink hardware.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Gets an array of output pads. Returns an empty array as this is a sink block.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

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

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Gets the video input pad for receiving video streams.

public MediaBlockPad VideoInput { get; }

Property Value

MediaBlockPad

Gets or sets the configuration settings for the DeckLink video output. These settings control video format, resolution, frame rate, and other video-specific parameters.

public DecklinkVideoSinkSettings VideoSinkSettings { get; set; }

Property Value

DecklinkVideoSinkSettings

Methods

Builds and initializes both DeckLink video and audio sink elements within the pipeline. This method creates the GStreamer elements for video and audio output, configures them with their respective settings, and establishes the input pad connections.

public override bool Build()

Returns

bool

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

Performs cleanup of internal resources including both video and audio sink elements. This method releases all DeckLink hardware resources and resets the build state.

public void CleanUp()

Creates a new dynamic input pad. Not implemented for this block as it has fixed video and audio inputs.

public MediaBlockPad CreateNewInput(MediaBlockPadMediaType mediaType)

Parameters

mediaType MediaBlockPadMediaType

The type of media for the new input pad.

Returns

MediaBlockPad

Not implemented - throws NotImplementedException.

Exceptions

NotImplementedException

This block does not support dynamic input creation.

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 sink properties to access specific elements.

public BaseElement GetCore()

Returns

BaseElement

Always returns null for this composite block.

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

public Element GetElement()

Returns

Element

Always returns null for this composite block.

Gets an existing input pad based on the specified media type. This block has fixed video and audio input pads.

public MediaBlockPad GetInput(MediaBlockPadMediaType mediaType)

Parameters

mediaType MediaBlockPadMediaType

The type of media pad to retrieve (Video or Audio).

Returns

MediaBlockPad

The corresponding input pad for the specified media type, or null if not found.

Determines whether DeckLink video and audio output functionality is available on the current system. This checks for the presence of required DeckLink drivers and both video and audio GStreamer plugins. Correct NuGet SDK redist should be included into your project.

public static bool IsAvailable()

Returns

bool

true if both DeckLink video and audio output are 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