josephtaylor / sketch-mapper

A reimagining of SurfaceMapperGUI for Processing
http://josephtaylor.github.io/sketch-mapper
MIT License
35 stars 9 forks source link

crashing with no debugging info #19

Open jmej opened 7 years ago

jmej commented 7 years ago

I've tried to make a sketch that plays back movies using the following code but, but it causes the sketch to crash with no debugging info. I'm assuming this is something I'm doing wrong - but it seems like there should be an error...

`public class MovieMapper extends AbstractSketch {

public MovieMapper(final PApplet parent, final int width, final int height) {
    super(parent, width, height);
}

Movie movie;
@Override
public void draw() {
    graphics.image(movie, 0, 0, graphics.width, graphics.height);
}

@Override
public void keyEvent(KeyEvent event) {

}

@Override
public void mouseEvent(MouseEvent event) {

}

public void movieEvent(Movie m) {
  m.read();
}
@Override
public void setup() {
    // Load and play the video in a loop
    movie = new Movie(parent, "transit.mov");
    movie.loop();

}

}`

jmej commented 7 years ago

In the parent sketch I have this in the setup loop:

sketchMapper.addSketch(new MovieMapper(this, width / 2, height / 2 ));

and the library import line is in the parent as well

josephtaylor commented 7 years ago

Just curious, have you tried just the video library by itself? I'm on Linux and having a hard time just getting it to play a video. Tried the GLVideo library too with no luck.

jmej commented 7 years ago

Hmm yeah I've used the official (Processing Foundation) GStreamer based video library (just called 'Video') quite a bit on OSX and Windows - but haven't tried it on Linux. (Apart from on an RPI where I did not have any success - it seems like GL Video is the way to go there but I haven't tried it) I was just trying to incorporate and example sketch from the GStreamer library to use with sketch mapper. It would be great to have a processing based mapping solution for video. This seems like it could be it if we can figure it out.