import processing.video.*; Capture c; VideoBuffer vb; void setup() { size(200, 200); c = new Capture(this, width, height, 30); vb = new VideoBuffer(30, width, height); } void captureEvent(Capture c) { c.read(); if (vb != null) vb.addFrame(c); } void draw() { image(vb.getFrame(), 0, 0); } class VideoBuffer { PImage[] b; int s; int w; int h; int cur; VideoBuffer(int s, int w, int h) { this.b = new PImage[s]; for (int i=0; i