com.github.sarxos.webcam.ds.buildin.cgt.NextFrameTask Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webcam-capture Show documentation
Show all versions of webcam-capture Show documentation
This library allows you to use your PC webcam, IP or network cameras directly from Java. It's compatible with most operating systems (Windows, Linux, MacOS).
package com.github.sarxos.webcam.ds.buildin.cgt;
import com.github.sarxos.webcam.ds.buildin.WebcamGrabberProcessor;
import com.github.sarxos.webcam.ds.buildin.WebcamGrabberTask;
public class NextFrameTask extends WebcamGrabberTask {
private WebcamGrabberProcessor processor = null;
public NextFrameTask(WebcamGrabberProcessor processor) {
this.processor = processor;
}
public void nextFrame() {
process(processor);
}
@Override
protected void handle() {
grabber.nextFrame();
}
}