/** * Loop. * Built-in video library replaced with gsvideo by Andres Colubri * * Move the cursor across the screen to draw. * Shows how to load and play a QuickTime movie file. * * Note: GSVideo uses GStreamer as the underlying multimedia library * for reading media files, decoding, encoding, etc. * It is based on a set of Java bindings for GStreamer called * gstreamer-java originally created by Wayne Meissner and currently * mantained by a small team of volunteers. GStreamer-java can be * used from any Java program, and it is available for download at * the following website: * http://code.google.com/p/gstreamer-java/ */ import codeanticode.gsvideo.*; GSMovie myMovie; void setup() { size(650, 480, P3D); background(0); // Load and play the video in a loop myMovie = new GSMovie(this, "/Volumes/Reservoir/Assets/Video/driving"); myMovie.loop(); } void movieEvent(GSMovie myMovie) { myMovie.read(); println(myMovie.time()); } void draw() { tint(255, 20); image(myMovie, mouseX-myMovie.width/2, mouseY-myMovie.height/2); }