libgdx / gdx-video

A libGDX cross platform video rendering extension
Apache License 2.0
145 stars 50 forks source link

Android / iOS: Improve loading performance and reduce race conditions #80

Closed dasisdormax closed 8 months ago

dasisdormax commented 9 months ago

For Android ...

Work is now more clearly split between the Android Main thread and the libGDX Rendering thread. As a quick overview:

This improves the 'felt' performance (less noticeable stutters) when loading and playing video on some weaker devices I tested.

Maybe this is enough to fix #32

For iOS ...

In general ...

The changes work with the assumptions:

  1. that public VideoPlayer functions are only called on the libGDX Rendering Thread. (I think we can make this assumption similar to the rest of the libGDX World)
  2. that callbacks may run on any Thread. (I added this to the documentation of the setListener functions)