iVidCapPro has been updated to address the following issues:
- Blank/black frames at the start of the video should no longer appear.
- The performance improvements that were inadvertently lost from the Xcode project (native side of the plugin) have been restored.
- Numerous compiler warning messages have been eliminated from the Xcode project.
As usual, you can download the plugin here:
The change made for the black frames issue merits some discussion. First, thanks to Amir Alavi for sending me a test case that reliably reproduced the behavior. 8^)
The problem apparently arises from a race between the recording thread and the rendering thread, such that there are cases when the recording thread begins capturing frames before the rendertexture target has the scene rendered to it. I addressed this by inserting a delay between the time the BeginRecordingSession method is called and frame capture starts.
By default, this delay is 1/10 second. It can be adjusted by setting the syncTimeWait property on the iVidCapPro object. If you’re still getting black frames, increase this value. If you feel you don’t need the delay, you can set the value to zero.
I’m not entirely happy with this solution. In my experience, fixing an apparent race by adding a delay can be unreliable and/or finicky. I tried other solutions to ensure the frame capture processing between the threads was synchronized, but these proved unsuccessful. If you have any thoughts, suggestions, observations or, for preference, a fully worked out solution (hint, hint – all the source code is freely available on this site! 8^), do let me know.