Re: TextureNames creation failed when calling GLMediaPlayer.initGL with multiple players
Posted by Peter F on Sep 03, 2014; 9:49am
URL: https://forum.jogamp.org/TextureNames-creation-failed-when-calling-GLMediaPlayer-initGL-tp4033009p4033014.html
Update:
Instead of the above, sometimes I'm getting lock-wait time out exceptions from the StreamWorker threads:
Exception in thread "Thread-16-StreamWorker_1" java.lang.RuntimeException: Waited 5000ms for: <245e7588, 3576465f>[count 1, qsz 0, owner <Thread-14-StreamWorker_0>] - <Thread-16-StreamWorker_1>
at jogamp.common.util.locks.RecursiveLockImpl01Unfairish.lock(RecursiveLockImpl01Unfairish.java:198)
at jogamp.nativewindow.ProxySurfaceImpl.lockSurface(ProxySurfaceImpl.java:189)
at jogamp.opengl.GLDrawableImpl.lockSurface(GLDrawableImpl.java:310)
at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:654)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:563)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:520)
at jogamp.opengl.util.av.GLMediaPlayerImpl$StreamWorker.makeCurrent(GLMediaPlayerImpl.java:1101)
at jogamp.opengl.util.av.GLMediaPlayerImpl$StreamWorker.run(GLMediaPlayerImpl.java:1235)
As in post 1, this happens when I try to play another video on a second media player while the first media player is currently in the 'playing' state.
A quick timeline of events to show where the exception kicks in:
Media player 1 - call 'initStream' : state change Uninitialized -> Initialized
Media player 1 - call 'initGL' : state change Initialized -> Paused
Media player 1 - call 'play' : state change Paused -> Playing
A few seconds later while media player 1 is still in state 'Playing':
Media player 2 - call 'initStream' : state change Uninitialized -> Initialized
Media player 2 - call 'initGL' : exception thrown.