keijiro / KlakHap

HAP video player plugin for Unity
Other
341 stars 27 forks source link

Feature Request: dropped frames or missed timing #31

Closed marijneken closed 4 years ago

marijneken commented 4 years ago

I would love to be able to do some performance testing in the field on the final hardware. Right now, I'm experiencing some performance problems and it's hard to pin point. The content is such that it's not always obvious to see if frames were skipped. Are frames actually skipped, or does the playback speed just suffer and the frame is delivered on the next refresh? Either way, I'd love to either have a dropped frames count, or a "missed timing" count (for when the appropriate timing for a frame was not reached). This way I can show this number in the UI and do various tests to see if I can improve playback performance. This would be highly appreciated. Thanks for all the work!

If there is another way for me to achieve this result, and I just missed it, please let me know too.

keijiro commented 4 years ago

KlakHap works synchronously (it uses background threads but do hard-sync on Update after all), so there is no such thing as frame dropping. If Unity drops frames, KlakHap drops frames too. If Unity runs without frame dropping, KalkHap never drops any frame.

I'd recommend using a more straightforward method, like showing Time.time or Time.deltaTime on the screen.

If you find a situation that KlakHap drops frames while Unity runs smoothly, please report it as an issue. That's not by design -- should be fixed.

keijiro commented 4 years ago

I'd like to close this issue at the moment. Please feel free to reopen it if you find any suspicious behavior.