Class DecklinkHelper
- Namespace
- VisioForge.Core.Helpers
- Assembly
- VisioForge.Core.dll
Provides helper methods for working with Blackmagic DeckLink professional video hardware. This class contains extension methods and utilities for converting between DeckLink-specific formats and the framework's internal format representations.
public static class DecklinkHelperInheritance
Inherited Members
Methods
GetVideoInfoFromMode(DecklinkMode, out int, out int, out VideoFrameRate)
Extracts video format information from a DeckLink video mode. This method parses the DeckLink mode enumeration and returns the corresponding video resolution (width and height) and frame rate for the specified mode.
public static void GetVideoInfoFromMode(this DecklinkMode mode, out int width, out int height, out VideoFrameRate framerate)Parameters
modeDecklinkMode-
The DeckLink video mode to parse.
widthint-
When this method returns, contains the horizontal resolution in pixels for the specified mode.
heightint-
When this method returns, contains the vertical resolution in pixels for the specified mode.
framerateVideoFrameRate-
When this method returns, contains the frame rate information for the specified mode.
Remarks
Supports standard definition (NTSC/PAL), HD (720p/1080i/1080p), 2K DCI, and UHD 4K formats.
For VisioForge.Core.Types.X.Decklink.DecklinkMode.Unknown and unrecognized modes, returns width=0, height=0 and
VisioForge.Core.Types.VideoFrameRate.Empty.
The values follow the display mode table of the DeckLink SDK, and an interlaced mode reports
its frame rate, not its field rate: VisioForge.Core.Types.X.Decklink.DecklinkMode.HD1080i50 is 25 fps. A DeckLink
source block in an interlaced mode delivers twice that rate when its auto deinterlacing is
enabled with DeinterlaceFields.All, which is the default. That includes
VisioForge.Core.Types.X.Decklink.DecklinkMode.NTSC2398_Widescreen but not VisioForge.Core.Types.X.Decklink.DecklinkMode.NTSC2398, which
is not deinterlaced. In the VisioForge.Core.Types.X.Decklink.DecklinkMode.NTSC_P and VisioForge.Core.Types.X.Decklink.DecklinkMode.PAL_P
modes, including their widescreen variants, the caps of the GStreamer DeckLink plugin announce
half of the rate returned here. SD modes report the stored size: their non-square pixel aspect
ratio is not part of the result.
ToFormat(DecklinkAudioFormat)
Converts a DeckLink audio format to the framework's internal AudioFormatX representation.
public static AudioFormatX ToFormat(this DecklinkAudioFormat format)Parameters
formatDecklinkAudioFormat-
The DeckLink audio format to convert.
Returns
- AudioFormatX
-
The corresponding AudioFormatX format. Returns S16LE as the default if the format is not recognized.