As far as I can see there's no functioning way to tell if a GSMovie has finished.
The scenario I have is that there is a video being painted as part of a processing sketch. When the video is finished, I would like to do something. However, there's no way I can find to get a GSMovie to tell me it's finished.
I've tried the following expressions and none of them ever return true. The video simply goes black and stops getting new frames. Really frustrating - been about 4 hours of work on this so far to fail to get a simple boolean value...
I found a fairly efficient way to put together rounded rectangles, and I'm putting it here for future searchers as it seemed to be requested quite a bit on the original forum.
x,y is the top left corner, w,h is the width and height rx,ry are the radius for different axes of the rounded corners respectively. It could be made more efficient by avoiding repetition in the additions.
I was running GSVideo 0.7 on Lucid Lynx, in Eclipse, having imported the main three Jars from the library folder along with Processing's core.jar as an import.
In this configuration, MP4 videos downloaded from Archive.org which played perfectly well in a player and an ordinary processing sketch (in the Processing IDE), show only the top left hand quarter of their pixels when rendered with the code below, derived from the example Movie loop() example.
I answered my own problem, but wanted to share it. Somehow, with OpenJDK, the rendering is busted and only visits a quarter of pixels in the blit.
I found that the secret magic step was to make sure that the sun java environment was installed...
apt-get install sun-java6-jdk sun-java6-jre
...and in Eclipse go to Window->Preferences=>Java => Installed JREs => Add
...and navigate to /usr/lib/jvm/java-6-sun
After it has processed this (takes a while and nothing seems to be happening) the new environment appears. Click the checkbox against it if you want to select it as the default JRE for all your projects, or select it within your Project.
Of course, using the Processing IDE you don't have this problem, but I find autocompletion and code refactoring so valuable, hence my Eclipse addiction.
package com.cefn.timeshift;
import processing.core.PApplet;
import codeanticode.gsvideo.*;
public class TV extends PApplet{
GSMovie myMovie;
public void setup() {
size(640, 480, P3D);
background(0);
// Load and play the video in a loop
myMovie = new GSMovie(this, "/home/cefn/Documents/curiosity/timeshift_tv/1960_exodus_512kb.mp4");