Loading...
Logo
Processing Forum
processing.app.debug.RunnerException: The function resolutions() does not exist.
    at processing.app.Sketch.placeException(Sketch.java:1543)
    at processing.app.debug.Compiler.compile(Compiler.java:149)
    at processing.app.Sketch.build(Sketch.java:1573)
    at processing.app.Sketch.build(Sketch.java:1553)
    at processing.app.Editor$DefaultRunHandler.run(Editor.java:1485)
    at java.lang.Thread.run(Thread.java:636)

Using the example script getting started capture linux:
int[][] res = cam.resolutions();

also tried
int[][] res = GSCapture.resolutions();

int[][] res = new GSCapture.resolutions(this);

gives this error as does any other method called GSCapture except available.
Are these methods not available in linux?

/**
 * Getting Started with Capture.
 *
 * GSVideo version by Andres Colubri.
 *
 * Reading and displaying an image from an attached Capture device.
 */
import codeanticode.gsvideo.*;
import codeanticode.gsvideo.GSCapture;


GSCapture cam;

void setup() {
  size(640, 480);
  // size(1024, 768);

  /*
  However, different cameras can be selected by using their device file:
  cam = new GSCapture(this, 640, 480, "/dev/video0");
  cam = new GSCapture(this, 640, 480, "/dev/video1");
  etc.
  */
  cam = new GSCapture(this, 640, 480);
  int[][] res = cam.resolutions();
}

void draw() {
  if (cam.available() == true) {
    cam.read();
    image(cam, 0, 0);
    // The following does the same, and is faster when just drawing the image
    // without any additional resizing, transformations, or tint.
    //set(160, 100, cam);
  }
}

Replies(4)

Are you sure you are using version 0.8 of GSVideo?
it's the latest stable one from the sight. might be due to having sun and open jdk installed at the same time.
is my code correct?

uninstalled openjdk and still having the same error on two different laptops in both processing 1.2.1 and 0192,
if it helps 0192 is now throwing up an error javac compiler error too... I really wish Ubuntu made just installing sun java
a tad easier.

now have all of them running with latest version of java and still getting the same error.
Strange, I just tested on GSVideo 0.8 on Linux, and the resolutions() method is available.

If you run any of the examples that come built-in with the library, what version information appears in the console?
20110203

weird, I guess it's not 0.8? dl'n 0.8 now.

DOH!!!!
Had the wrong version. sorry about that. works just fine now!!!!

Thanks,
Andrew

and double dohh... the new web cam maxes out a 640 x 480.
hopefully the framerate is higher.