[help] screen capture - intensity 4k pro

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

Seowoo Jang

  • Posts: 1
  • Joined: Wed Dec 14, 2016 8:14 am

[help] screen capture - intensity 4k pro

PostWed Dec 14, 2016 8:27 am

Hello, I am new here and I am having difficulty capturing screen.

What I would like to do is to capture each frame from the capture card and process something, then save the frame as a image file.

I have browed through the sample codes provided in BlackMagic DeckLink SDK (10.8.3) along with the forum but cannot get any clue so far.

For starter, I tried to modify "capture preview" sample code but ended up having null unsigned char data from the IDeckLinkVideoFrame -> GetBytes() method.

Can anyone tell me where to start?

Thank you in advance.
Offline

Waqqas Sharif

Blackmagic Design

  • Posts: 21
  • Joined: Tue Oct 04, 2016 1:47 am

Re: [help] screen capture - intensity 4k pro

PostFri Dec 30, 2016 12:15 am

Hello Seowoo,

I would recommend the Windows CapturePreview sample (Win\Samples\CapturePreview\) as a starting point to capture an image.

In the CapturePreview sample, file DeckLinkDevice.cpp, please see function DeckLinkDevice::VideoInputFrameArrived [1] which is the callback which receives captured video frames.

The IDeckLinkVideoInputFrame parameter to the callback is a reference to the captured video frame. The GetBytes [2] method of the videoFrame parameter can be used to obtain access to the raw video buffer.

To get an overall understanding of the process, see SDK Manual section "2.4.1 Capture" for a high level overview of the steps required to perform a capture operation.

Please see SDK Manual section "2.7.4 Pixel Formats", and the other methods in the IDeckLinkVideoFrame interface (GetHeight, GetRowBytes, etc.) for the information required to interpret the raw video buffer.

Regarding capturing an image as BMP or JPG, please note that the DeckLink SDK provides access to the raw video data, but does not include interfaces for file IO, video codecs or image file formats. Writing the captured video frames to disc is an application concern.

Your application will then need to implement / integrate code to store the raw video buffer in the required file format (BMP/JPG).

Could you please share the code snippet where you are calling the IDeckLinkVideoFrame->GetBytes() method?

Regards
Waqqas

[1] 2.5.10.1 IDeckLinkInputCallback::VideoInputFrameArrived method
[2] 2.5.5.6 IDeckLinkVideoFrame::GetBytes method

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 31 guests