ViveMediaDecoder icon indicating copy to clipboard operation
ViveMediaDecoder copied to clipboard

Videoframe swapping in native script

Open spaul13 opened this issue 6 years ago • 1 comments

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.

spaul13 avatar Mar 15 '19 04:03 spaul13

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.

kyo8568131 avatar Mar 15 '19 05:03 kyo8568131