get bytes of a frame using csharp

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

tomsap

  • Posts: 3
  • Joined: Tue Mar 03, 2020 4:17 pm
  • Real Name: Tom Saplonsky

get bytes of a frame using csharp

PostTue Mar 03, 2020 4:30 pm

Hello,

I am trying to use my blackmagic 4k extreme with the latest SDK to get the value of a frame in bytes from a camera that i connect to him.
I try to use the example program that in the SDK folder that called csharpstills, but when I compile and run it, it crashed with the error that say there is a counter of an event that is blow zero.
Maybe someone know how to solve it or why this is happend?
or there is a simple option or an example that I can get the bytes of a frame without using csharpstills program?

Thank you!
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 246
  • Joined: Mon Sep 04, 2017 4:05 am

Re: get bytes of a frame using csharp

PostTue Mar 03, 2020 10:05 pm

Hi Tom,

Can you share what you capture interval and number of stills you have set in StillsCSharp? There is a countdown that is decremented for each frame captured, but it is not expected to fall below zero.

To get raw buffer of the frame, you should call IDeckLinkVideoFrame.GetBytes. This is demonstrated on the BGRA converted frame in the VideoFrameArrived event handler in Stills.cs.

Regards
Cameron
Offline

tomsap

  • Posts: 3
  • Joined: Tue Mar 03, 2020 4:17 pm
  • Real Name: Tom Saplonsky

Re: get bytes of a frame using csharp

PostMon Mar 09, 2020 7:56 am

Thank you for your replay,

I want to capture one frame, so I set the Frame Interval and the Number Stills to be with the value of 1.
After that I get the message that the m_captureCountdown count below zero and the program crash. Why is it happening?

Tom.
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 246
  • Joined: Mon Sep 04, 2017 4:05 am

Re: get bytes of a frame using csharp

PostFri Mar 13, 2020 5:41 am

Hi Tom,

What is the incoming video mode and pixel format that you are receiving?

Regards
Cameron
Offline

tomsap

  • Posts: 3
  • Joined: Tue Mar 03, 2020 4:17 pm
  • Real Name: Tom Saplonsky

Re: get bytes of a frame using csharp

PostFri Mar 13, 2020 8:26 pm

Hi Nichols,

I use standard pal for video mode. I get the same error for 8 bit pixel format and also for 10 bit pixel format.

Thank you,

Tom.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 2 guests