diff --git a/webcam-capture/src/main/java/com/github/sarxos/webcam/WebcamCompositeDriver.java b/webcam-capture/src/main/java/com/github/sarxos/webcam/WebcamCompositeDriver.java index 6eda1e5e..6b1e6cdd 100644 --- a/webcam-capture/src/main/java/com/github/sarxos/webcam/WebcamCompositeDriver.java +++ b/webcam-capture/src/main/java/com/github/sarxos/webcam/WebcamCompositeDriver.java @@ -4,10 +4,12 @@ import java.util.List; -public class WebcamCompositeDriver implements WebcamDriver { +public class WebcamCompositeDriver implements WebcamDriver, WebcamDiscoverySupport { private List drivers = new ArrayList(); + private int scanInterval = -1; + public WebcamCompositeDriver(WebcamDriver... drivers) { for (WebcamDriver driver : drivers) { this.drivers.add(driver); @@ -42,4 +44,21 @@ public boolean isThreadSafe() { } return safe; } + + public void setScanInterval(int scanInterval) { + this.scanInterval = scanInterval; + } + + @Override + public long getScanInterval() { + if (scanInterval <= 0) { + return DEFAULT_SCAN_INTERVAL; + } + return scanInterval; + } + + @Override + public boolean isScanPossible() { + return true; + } }