We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey,
I'm using Processing 2.1.1 64 bit with a simple webcam viewer example:
import processing.video.*;
Capture video;
void setup() {
size(1300,900);
// available is name=Microsoft LifeCam Studio,size=1280x720,fps=30
video = new Capture(this,1280,720,30);
video.start();
}
void draw() {
if (video.available()) {
video.read();
}
image(video,0,0);
}
I've now encountered a problem with high resolution camera pictures: they aren't displayed and I get the following error message after a while. Camera stream with a lower resolution (or even with a lower framerate) are displayed properly.
(javaw.exe:6520): GStreamer-CRITICAL **:
Trying to dispose element rgb, but it is in READY instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
I've posted this question also on Github
Answers
Ok, it might have something to do with the Microsoft Camera, I need to use in this project (build in Surface Pro Camera and also an external Microsoft HD Camera). No that was not my decision ;) It also shows some problems in some videoplayers - is it possible that GStreamer reacts picky on some encodings?
If you are windows user there is a bug with the library. It should be fixed with the next version. I had the same error, and one possible solution is to download an older version of processing 2.1 or 2.0.3 and replace the gstreamer-java.jar file in \modes\java\libraries\video\library. If that is not working replace the jna.jar file as well. http://forum.processing.org/two/discussion/2716/windows-8-video-capture-issue/p1 and http://forum.evilmadscientist.com/discussion/305/peggy-2-video-stream-webcam
I had a problem with my code as well as all examples ( using video ) with P 2.1.1 The fix given by SilentAce worked for all . Copied and replaced both the gstreamer and the jna jar files. Problems gone. Thanks