Hi all,
In the past I've been able to get Processing 1 to work from within Eclipse. However, now when I try to do the same with Processing 2.0 I can't get it working.
The issue is with trying to play videos. Whatever I try it fails with loads of errors:
Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: com/sun/jna/Platform
at processing.video.LibraryPath.get(LibraryPath.java:43)
at processing.video.Video.buildMacOSXPaths(Video.java:169)
at processing.video.Video.initImpl(Video.java:108)
at processing.video.Video.init(Video.java:69)
at processing.video.Movie.initGStreamer(Movie.java:554)
at processing.video.Movie.<init>(Movie.java:98)
at eclipsetest.EclipseTest.setup(EclipseTest.java:15)
at processing.core.PApplet.handleDraw(PApplet.java:2241)
at processing.opengl.PGL$PGLListener.display(PGL.java:3240)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:573)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:558)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:286)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1021)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:896)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:545)
at processing.opengl.PGL.requestDraw(PGL.java:1197)
at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1550)
Is it possible to have both 1.5.1 and 2.0b8 available for testing? I don't need to run them at the same time, only need to be able to run them on the same code.
This is on a Mac with OSX 10.7.5 and both Java 6 and 7.
I have an existing project that I want to resurrect. I currently have it working in 1.5.1, but I need to do some significant additional development.
I'm tempted to move to v2.0 given the new OpenGL features and the fact that this will be the only way forward in the future.
So, how risky would an immediate move to 2.0 be? The project makes extensive use of OpenGL rendering for playing movie files and better rendering of fonts etc.
Is there any plan to get Processing on the Raspberry Pi?
I've tried downloading the linux version, but as it's build for i386 it doesn't work. I have a project that I'd like to port over to the Pi and I'd love to be able to do it with Processing.
For some reason the below code won't export as a movie. I get a blank Java window which just sits there doing nothing until a stop the Processing script. The code runs fine without attempting to save to a movie.
Can anyone spot where I'm going wrong?
TIA
BTW this is on a Mac (10.5.8)
import javax.media.opengl.*;
import processing.opengl.*;
import processing.video.*;
float a;
boolean bExportVideo = true;
MovieMaker mm;
int MAX_FRAME_NB = 2400;
void setup() {
size(800, 600, OPENGL);
frameRate(24);
if (bExportVideo) {
mm = new MovieMaker(this, width, height, "movie.mov", 24,
MovieMaker.JPEG, MovieMaker.HIGH);
}
}
void draw() {
if (frameCount > MAX_FRAME_NB) {
if (bExportVideo) {
mm.finish();
delay(1000);
}
exit();
}
background(255);
PGraphicsOpenGL pgl = (PGraphicsOpenGL) g; // g may change
GL gl = pgl.beginGL(); // always use the GL object returned by beginGL
// Do some things with gl.xxx functions here.
// For example, the program above is translated into:
void setup() {
size(640, 480, GLConstants.GLGRAPHICS);
background(0);
// Load and play the video in a loop
myMovie = new GSMovie(this, "mymovie.mov");
myMovie.loop();
I have a series of files images categorised by subdirectory in the data directory of the sketch. Is it possible to load the images using a path *relative* to the main data directory rather than an absolute path.
The sketch I'm working on will be running on different machines so the absolute paths will change and I want avoid hardcoding anything.
Edit:
Somehow this has been put in the wrong section. This should be Programming Questions. Is it possible to move it?