Decklink Video Source block
SDK contains a Decklink Video Source block, which allows the capture of video from Blackmagic Decklink devices.
You can use HDMI, SDI, and other inputs. The block supports all video modes and resolutions supported by the device.
Enumerating devices
To enumerate available devices, use the following code:
var devices = await DecklinkVideoSourceBlock.GetDevicesAsync();
foreach (var item in devices)
{
Debug.WriteLine(item.Name);
}
Creating a block
To create a block, use the following code:
// video source
DecklinkVideoSourceSettings videoSourceSettings = null;
// select the first device
var device = (await DecklinkVideoSourceBlock.GetDevicesAsync())[0];
if (device != null)
{
// create settings object
videoSourceSettings = new DecklinkVideoSourceSettings(device);
// set video mode
videoSourceSettings.Mode = DecklinkMode.HD1080i60;
}
// create the block
var videoSourceBlock = new DecklinkVideoSourceBlock(videoSourceSettings);
The block is created with the specified settings. If you want to change the settings, use the Settings
property.
The block must be added to the pipeline.
You can connect the Decklink Video Source block to other blocks, such as video processors, encoders, or renderers, using the Output
pad.