Use SDK in c# project

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Rehan Nadeem

  • Posts: 2
  • Joined: Sun May 08, 2016 2:12 pm

Use SDK in c# project

PostFri May 13, 2016 8:59 am

Hello,

I want to send vedio's to decklink playout card. My questions are:

1) How to use this sdk in c#? Like how to import it?
2) Does anyone have sample code for it?
3) Please help me in making a player which send video's to decklink playout card from my own software.

Regards,
Rehan
Offline

Nicholas Gill

Blackmagic Design

  • Posts: 169
  • Joined: Mon May 04, 2015 10:28 pm

Re: Use SDK in c# project

PostWed May 18, 2016 6:25 am

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

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 17 guests