com.github.sarxos.webcam.ds.cgt.WebcamDisposeTask 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).
The newest version!
package com.github.sarxos.webcam.ds.cgt;
import com.github.sarxos.webcam.WebcamDevice;
import com.github.sarxos.webcam.WebcamDriver;
import com.github.sarxos.webcam.WebcamTask;
/**
* Dispose webcam device.
*
* @author Bartosz Firyn (sarxos)
*/
public class WebcamDisposeTask extends WebcamTask {
public WebcamDisposeTask(WebcamDriver driver, WebcamDevice device) {
super(driver, device);
}
public void dispose() throws InterruptedException {
process();
}
@Override
protected void handle() {
getDevice().dispose();
}
}