- Posts: 2
- Joined: Sun May 08, 2016 2:12 pm
Hi Rehan,
On Windows, the DeckLink API is provided as a set of COM interfaces. It is possible to use the DeckLink API from C# as a normal COM library.
The DeckLink SDK package includes a C# sample - SignalGenCSharp (Win\Samples\SignalGenCSharp). That sample demonstrates the basics of interacting with the DeckLink API from C#.
The developer documentation presents examples in C++, however the content of the documentation applies equally to C# as it documents the interface and not a specific implementation.
Please see SDK manual section "2.4.2 Playback" for a high-level overview of the steps required to perform a playback operation.
Please note that the DeckLink API does not includes interfaces for file IO, software codecs, or video container formats. The application will need to implement / integrate code for these requirements.
As the application generates raw video frames from the input video (in a pixel format supported by the DeckLink API (see 2.7.4 Pixel Formats)), in the IDeckLinkVideoOutputCallback::ScheduledFrameCompleted callback, the application should fill the image buffer of the completed video frame with the data of the next video frame to be output (using IDeckLinkVideoFrame::GetBytes to obtain a pointer to the video frame buffer), and then schedule the frame for playback.
Please note that unlike the sample (which alternates between two static frames), your application will need to preroll an appropriate number of video frames for playback (see the 2.4.2 section mentioned for more information).
Hope that helps,
-nick