Strange behavior loading video files from data path


#1

I’m making a script that mixes different videos on screen. The script works if I load the videos from the “data” path, but if i use subfolders like “data/something” I get an error (despite the files are loading correctly):

finishLifecycleAction(com.jogamp.opengl.util.FPSAnimator$3): ++++++ timeout reached ++++++ main-FPSAWTAnimator#00-Timer0
finishLifecycleAction(com.jogamp.opengl.util.FPSAnimator$3): OK false- pollPeriod 27, blocking true -> res false, waited 1001/1000 - main-FPSAWTAnimator#00-Timer0
 - com.jogamp.opengl.util.FPSAnimator[started true, animating true, paused false, drawable 1, totals[dt 0, frames 0, fps 0.0], modeBits 1, init'ed true, animThread Thread[main-FPSAWTAnimator#00-Timer0-FPSAWTAnimator#00-Timer1,5,main], exclCtxThread false(null)]
    [2]: com.jogamp.opengl.util.AnimatorBase.finishLifecycleAction(AnimatorBase.java:633)
    [3]: com.jogamp.opengl.util.FPSAnimator.stop(FPSAnimator.java:326)
    [4]: processing.opengl.PSurfaceJOGL.stopThread(PSurfaceJOGL.java:722)
    [5]: processing.core.PApplet.dispose(PApplet.java:3823)
    [6]: processing.core.PApplet.die(PApplet.java:3734)
    [7]: processing.core.PApplet.die(PApplet.java:3744)
    [8]: processing.video.Movie.initGStreamer(Unknown Source)
    [9]: processing.video.Movie.<init>(Unknown Source)
    [10]: sonusmap2.cargavideos(sonusmap2.java:85)
    [11]: sonusmap2.setup(sonusmap2.java:51)
    [12]: processing.core.PApplet.handleDraw(PApplet.java:2425)
    [13]: processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:866)
    [14]: jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
    [15]: jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
    [16]: jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
    [17]: jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
    [18]: jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
    [19]: com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
    [20]: com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
    [21]: com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
    [22]: com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
    [23]: java.util.TimerThread.mainLoop(Timer.java:555)
    [24]: java.util.TimerThread.run(Timer.java:505)

The script to load from folder is a very common one (and is working in both cases):

String[] files(){

// The data path of the folder to look in (write your own)
java.io.File folder = new java.io.File(dir);
 
// let's set a filter (which returns true if file's extension is .jpg)
java.io.FilenameFilter pngFilter = new java.io.FilenameFilter() {
  public boolean accept(File dir, String name) {
    return name.toLowerCase().endsWith(".mp4");
  }
};
 
// list all the folders inside the main directory
String[] listFolders = folder.list(new java.io.FilenameFilter() {
  public boolean accept(File current, String name) {
    return new File(current, name).isDirectory();
  }
});
 
// list the files in the data folder, passing the filter as parameter
String[] filenames = folder.list(pngFilter);

return(filenames);
}

Any ideas? Somehow opengl won’t like files from a location different to “data”. This is nuts.


#2