Videoframe swapping in native script
mVideoFrames.swap(decltype(mVideoFrames)());
function showing me some error of initial value of reference to non-constant must be lvalue and function overload. I commented this function and generate dll and use it on Unity. Although it works, the decoding and displaying process are really slow (~100ms) and in the native script, I found the actual decoding function takes much less time. Can anyone (@kyo8568131 ) please tell me about the purpose of mVideoFrames.swap() and how it can impact the performance? and how to solve the aforementioned issue.
Hi spaul13,
mVideoFrames.swap(decltype(mVideoFrames)()); This code is just init an default container and swap into mVideoFrame. The original container, which is swap out, is expected to be released in local scope. This is called in init function and does not influence the decoding time.