Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Movie&Capture Classes

$
0
0

Hi. I have exercise from school to do Movie class and Capture class from the video library of processing. And I dont suceed. Here is my code:

import processing.video.*;
class Capture{
  public int x,y;
  public int width,height;
  private String fileName;
  private Cupture c;

  Capture(int x1,int y1,int w,int h){
    x=x1;
    y=y1;
    width=w;
    height=h;
  }
  public void setVideo(String file){
    fileName=file;
    c=new Capture(this,fileName);
  }
  public void display(){
    image(c,x,y,width,height);
  }
  public void start(){
    c.start();
  }
  public void read(){
    if(c.available())
      c.read();
  }
}

Viewing all articles
Browse latest Browse all 2896

Trending Articles