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, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
DecklinkVideoAudioSourceBlock(DecklinkVideoSourceSettings, DecklinkAudioSourceSettings)
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
videoSettingsDecklinkVideoSourceSettings-
The configuration settings for video capture including format and device selection.
audioSettingsDecklinkAudioSourceSettings-
The configuration settings for audio capture including format and synchronization.
Properties
AudioOutput
Gets the audio output pad for providing captured audio streams.
public MediaBlockPad AudioOutput { get; }Property Value
AudioSettings
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
Input
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
Inputs
Gets an array of input pads. Returns an empty array as this is a source block.
public override MediaBlockPad[] Inputs { get; }Property Value
Output
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
Outputs
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
Type
Gets the media block type identifier for this DeckLink video and audio source.
public override MediaBlockType Type { get; }Property Value
VideoOutput
Gets the video output pad for providing captured video streams.
public MediaBlockPad VideoOutput { get; }Property Value
VideoSettings
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
Methods
Build()
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
-
trueif both video and audio sources were built successfully;falseif initialization failed.
CleanUp()
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()Dispose(bool)
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
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
GetCore()
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.
GetDevicesAsync()
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.
GetElement()
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.
IsAvailable()
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
-
trueif DeckLink video capture 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.