- Posts: 1
- Joined: Wed Apr 29, 2015 3:57 pm
Hi Alexey,
There is a C# example in the Desktop Video SDK, see Win/Samples/SignalGenCSharp for the project.
While this example demonstrates playback, the interfaces for capture are very similar and importantly, the SDK manual is also applicable to C#.
See section "2.4.1 Capture" (reproduced below) for a high-level overview of the steps necessary to capture video.
Cheers,
-nick
2.4.1 Capture
An application performing a standard streaming capture operation should perform the following steps:
• If desired, enumerate the supported capture video modes by calling IDeckLinkInput::GetDisplayModeIterator. For each reported capture mode, call IDeckLinkInput::DoesSupportVideoMode to check if the combination of the video mode and pixel format is supported.
• IDeckLinkInput::EnableVideoInput
• IDeckLinkInput::EnableAudioInput
• IDeckLinkInput::SetCallback
• IDeckLinkInput::StartStreams
• While streams are running:
- receive calls to IDeckLinkInputCallback::VideoInputFrameArrived with video frame and corresponding audio packet
IDeckLinkInput::StopStreams
Audio may be “pulled” from a separate thread if desired.
If audio is not required, the call to IDeckLinkInput::EnableAudioInput may be omitted and the IDeckLinkInputCallback::VideoInputFrameArrived callback will receive NULL audio packets.