RenderHeads/UnityPlugin-AVProDeckLink

GetLastFrameTimeCode Performance

BlueprintBen opened this issue · 3 comments

I've been profiling our project and have found that once DeckLinkPlugin.SetTimeCodeCaptureEnabled has been called to enable timecode capture, Device.UpdateTimeCode (specifically DeckLinkPlugin.GetLastFrameTimeCode) takes a significant amount of time (5-6ms) which I wasn't expecting and is definitely an obstacle to targeting 60fps.

  • Unity version: Unity 2020.3 LTS
  • AVPro DeckLink version: 1.9.1
  • Operating system version: Windows 19043
  • Hardware model: DeckLink 8K Pro
  • Cables used: SDI
  • Desktop Video version: 12.2.1
  • Video mode (resolution, frame-rate, pixel-format): 3840x2160 @30fps YUV422-10bit

image

Is this performance expected or could there be a bug with performance on the timecode code path?

Thanks!

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sorry for the slow response, will look into this as soon as we can and get back to you.

Hi @BlueprintBen,

Apologies it's taken a while to get back to you but I did manage to reproduce the issue - indeed we wouldn't expect the timecode retrieval to take 5-6ms!

I've optimised some of the concurrency code which has completely removed 'DeckLinkPlugin.GetLastFrameTimeCode()' from our profiles - this has just been released (https://github.com/RenderHeads/UnityPlugin-AVProDeckLink/releases/tag/1.9.2) and hopefully resolves your issue.

Cheers,