Class DecklinkVideoSourceBlock
- Namespace
- VisioForge.Core.MediaBlocks.Decklink
- Assembly
- VisioForge.Core.dll
Provides video input capabilities from Blackmagic DeckLink hardware devices. This block captures professional-quality video streams from DeckLink capture cards, supporting broadcast standards including SD/HD/4K/8K SDI and HDMI inputs. The captured video is processed through a queue and converter for optimal format compatibility with downstream pipeline elements. Common use cases include broadcast production, live streaming, video recording, and professional video capture workflows requiring frame-accurate synchronization and low latency. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.
public class DecklinkVideoSourceBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternalsInheritance
Implements
Inherited Members
Extension Methods
Constructors
DecklinkVideoSourceBlock(DecklinkVideoSourceSettings)
Initializes a new instance of the VisioForge.Core.MediaBlocks.Decklink.DecklinkVideoSourceBlock class. Creates a new DeckLink video source block configured with the specified settings.
public DecklinkVideoSourceBlock(DecklinkVideoSourceSettings settings)Parameters
settingsDecklinkVideoSourceSettings-
The configuration settings specifying device, format, resolution, and video capture parameters.
Properties
Input
Gets the primary input pad. Returns null as this is a source block with no inputs. Video is 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 for providing captured video data. This source block has a single output pad for video streams.
public override MediaBlockPad Output { get; }Property Value
Outputs
Gets an array containing all output pads for this block. DecklinkVideoSource has a single video output pad.
public override MediaBlockPad[] Outputs { get; }Property Value
Settings
Gets or sets the configuration settings for the DeckLink video input. These settings control device selection, video format (SDI/HDMI), resolution, frame rate, color space, and other capture parameters specific to professional video workflows.
public DecklinkVideoSourceSettings Settings { get; set; }Property Value
Type
Gets the media block type identifier for this DeckLink video source.
public override MediaBlockType Type { get; }Property Value
Methods
Build()
Builds and initializes the DeckLink video source element within the pipeline. This method creates the GStreamer elements (source, queue, converter), configures them with capture settings, establishes internal links, and sets up the output pad connection.
public override bool Build()Returns
- bool
-
trueif the build was successful;falseif initialization failed.
CleanUp()
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()Dispose(bool)
Releases unmanaged and - optionally - managed resources.
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 GetElement() to access the primary DecklinkVideoSource element.
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 including model names, supported formats, and connection types (SDI/HDMI).
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 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 video 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.