I am trying to use GSVideo in Ubuntu 11.04 (32bit) with a cheap USB webcam. I tried the "GettingStartedCaptureLinux.pde" example (I think it is the simplest one) but I got the following error :
GSVideo version: 0.9
Exception in thread "Animation Thread" java.lang.NullPointerException
at codeanticode.gsvideo.GSCapture.getSuppResAndFpsList(Unknown Source)
at codeanticode.gsvideo.GSCapture.initResAndFps(Unknown Source)
at codeanticode.gsvideo.GSCapture.play(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
This error occurs in the statement below :
cam = new GSCapture(this, 640, 480);
cam.play(); <- error here
It seems that GSVideo could not initialize the camera. Although the camera is a primitive one (cheap and simple), I could get the camera work in the "Cheese" software to capture video without any configuration. I find that the camera is "/dev/video1" but I could not get it to work in GSVideo yet.
Is there any suggestion that I could try to get the camera work with GSVideo ? Thanks.
There are two capture plugins in gstreamer under linux: v4lsrc and v4l2src.
GSVideo uses v4l2src by default, since it supports most recent cameras. But some older models are supported only by v4lsrc, this could be the problem. You could test v4lsrc in GSVideo by creating a pipeline:
pipeline = new GSPipeline(this, "v4lsrc");
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.