Processing Forum
Java Mode:
works: apply transformation matrix to the buffer canvas, render still image to the buffer,then in draw, GET the frame buffer, display using IMAGE with size distortion
works: apply transformation matrix to the buffer canvas, render video to the buffer,then in draw, GET the frame buffer, display using IMAGE with size distortion
Android Mode:
works: apply transformation matrix to the buffer canvas, render still image to the buffer,then in draw, GET the frame buffer, display using IMAGE with size distortion
doesn't work: apply transformation matrix to the buffer canvas, render video to the buffer, [STOP <-- doesn't work]
void setup () {size (displayWidth, displayHeight);imageMode(CENTER);buffer = createGraphics(720, 720, JAVA2D);container = new APWidgetContainer(this);videoView = new APVideoView(false);videoView.setVideoPath("/path/movie.mp4");container.addWidget(videoView);videoView.setLooping(true);}
void draw(){updateBuffer();background(0);image(img, width/2, height/2, 1280, 720);}
void updateBuffer() {renderBuffer(buffer);img = buffer.get(0, 0, 720, 720);}
void renderBuffer(PGraphics buffer) {buffer.beginDraw();buffer.background(0);buffer.noFill();buffer.imageMode(CENTER);videoView.start(); //or whatever...nothing makes sense here, because there's no videoView in the buffer spacebuffer.endDraw();}
buffer.image (mov, x,y, width, height)