Capturing. Missed frames

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

An_private

  • Posts: 4
  • Joined: Sun Feb 19, 2023 9:40 am
  • Real Name: Andrey Korobeynikov

Capturing. Missed frames

PostSun Feb 19, 2023 9:57 am

Hello!
I'm writing an application for multichannel capture now and I've got strange problem:
sometimes I got empty both video frame and audio packet in VideoInputFrameArrived callback.
In my log it looks as:
2023-02-19 11:42:00:708 Main in: Video frame missed
2023-02-19 11:42:00:708 Main in: Audio packet missed
2023-02-19 11:43:51:669 Main in: Video frame missed
2023-02-19 11:43:51:669 Backup in: Video frame missed
2023-02-19 11:43:51:669 Main in: Audio packet missed
2023-02-19 11:43:51:669 Backup in: Audio packet missed
2023-02-19 11:44:56:428 Main in: Video frame missed
2023-02-19 11:44:56:428 Main in: Audio packet missed
2023-02-19 11:51:38:508 Main in: Video frame missed
2023-02-19 11:51:38:508 Main in: Audio packet missed
I'm writing in Delphi, so I just got nil in both Video frame in Audio packet:
Code: Select all
if not Assigned(videoFrame) then
        AddToLog('Video frame missed');
      if not Assigned(audioPacket) then
        AddToLog('Audio packet missed');

And it is not glitches - in this place must be the frame, but in callback I got nil instead of real frame data (I have checked it).
SDI signal is absolutely stable and REF signal provided. Format is 1080i 50. Decklink driver 12.4.2, Windows 10.
Any recommendations?
Offline

An_private

  • Posts: 4
  • Joined: Sun Feb 19, 2023 9:40 am
  • Real Name: Andrey Korobeynikov

Re: Capturing. Missed frames

PostMon Feb 20, 2023 6:09 pm

In fact - the problem is solved already. The problem is in a memory manager.
In callback procedure I copied raw video data from input frame to newly got memory (with GetMem) and then save it to queue. And I suppose - if second callback is happened in exactly same time - memory manager can't allocate memory for new frame, so I get callback with nil as data.
So I created intermediate queue - saved original video/audio frames from callback to this queue and then separate thread converts this data to raw data frames. And now I don't have any problems with missed frames.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 29 guests