Bug 370 : pause() in Movie library broken
Last modified: 2010-06-05 03:59




Status:
RESOLVED
Resolution:
WONTFIX -
Priority:
P4
Severity:
normal

 

Reporter:
st33d
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2006-07-12 10:29
The two examples of code below are an attempt to highlight the problem. It
is currently troublesome to build a frame advance method using pause, it is
better to use speed(0) at the moment.

The code was copied over the MoviePlayback example in each case

//Intended successful result
import processing.video.*;
Movie myMovie;
void setup(){
size(200, 200);
background(0);
myMovie = new Movie(this, "station.mov");
myMovie.loop();
myMovie.speed(0);
}
void movieEvent(Movie myMovie){
myMovie.read();
}
void draw(){
image(myMovie, 0, 0, width, height);
}
void keyPressed(){
myMovie.jump((myMovie.time() + 0.1) % myMovie.duration());
}

//faliure
import processing.video.*;
Movie myMovie;
void setup(){
size(200, 200);
background(0);
myMovie = new Movie(this, "station.mov");
myMovie.loop();
myMovie.pause();
}
void movieEvent(Movie myMovie){
myMovie.read();
}
void draw(){
image(myMovie, 0, 0, width, height);
}
void keyPressed(){
//takes at least 20 presses to get an image
myMovie.play();
myMovie.jump((myMovie.time() + 0.1) % myMovie.duration());
myMovie.pause();
}
Additional Comment #1 From fry 2006-07-12 10:58
original thread with additional information:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=VideoCamera;action=display;num=1115664520

also includes details of the workaround.
Additional Comment #2 From REAS 2007-05-08 09:09
The link into the discourse board (below) is no longer working. I've not
seen that before. Do you think the post was moved or changed? Anyway, I
also noticed this bug, but saw that it was already reported.
Additional Comment #3 From fry 2007-05-08 09:21
looks like the post was deleted, probably when the boards were moved
around. the error is because you had renamed the VideoCamera board to
Video, so it's getting weirded out.

i believe the workaround is to set the rate of the movie to zero, and then
later set it to 1.
Additional Comment #4 From fry 2010-06-05 03:59
closing this bug, because we'll be replacing the current video library with
another sometime later this summer. as such, i won't be doing any more bug
fixes on the current video library. in the meantime, we recommend using
gsvideo, opencv, or one of the other video libraries that are available.