We are trying to render into an AVAssetWriter, for that we need to know when the frame is completed.
We are trying to use swapChain->setFrameCompletedCallback for that purpose.
The frame callback is called once, but after that we get an assertion error:
Assertion failed: (mInvoker && mInvocable), function operator(), file Invocable.h, line 134.
To Reproduce
Set a frame completed callback using the metal backend:
auto swapChain = _engine->createSwapChain(nativeWindow, SwapChain::CONFIG_APPLE_CVPIXELBUFFER);
swapChain->setFrameCompletedCallback(
nullptr, [](SwapChain* UTILS_NONNULL swapChain) {
// note: we pass a completely empty callback, and it still crashes
});
Expected behavior
The callback gets called continuously while rendering.
Screenshots
Logs
If applicable, copy full logs from your console here. Please do not
use screenshots of logs, copy them as text, use gist or attach an uncompressed file.
Desktop (please complete the following information):
OS: iOS
GPU: Apple GPU
Backend: Metal
Smartphone (please complete the following information):
Describe the bug
We are trying to render into an
AVAssetWriter
, for that we need to know when the frame is completed. We are trying to useswapChain->setFrameCompletedCallback
for that purpose. The frame callback is called once, but after that we get an assertion error:To Reproduce
Expected behavior
The callback gets called continuously while rendering.
Screenshots
Logs If applicable, copy full logs from your console here. Please do not use screenshots of logs, copy them as text, use gist or attach an uncompressed file.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
n/a