/** * 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(1920, 1080, P3D); background(0); // Load and play the video in a loop // myMovie = new GSMovie(this, "station.mov"); // myMovie = new GSMovie(this, "/Volumes/external/tera/Assets/Memory/20080630 930pm - breaking up with nichol/MOV09976.MPG"); myMovie = new GSMovie(this, "/Volumes/Reservoir/Assets/dxarts/00001.MTS"); myMovie.loop(); } void movieEvent(GSMovie myMovie) { myMovie.read(); } void draw() { tint(255, 255); // image(myMovie, mouseX-myMovie.width/2, mouseY-myMovie.height/2); image(myMovie, 0, 0); myMovie.pause(); } void keyPressed() { int lastframe=myMovie.frame(); while (lastframe=>=myMovie.frame()) { lastframe=myMovie.frame(); myMovie.play(); myMovie.pause(); println(myMovie.frame()); } if(myMovie.frame()>lastframe+1) { myMovie.play(); myMovie.jump(lastframe+1); }