File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
webcam-capture/src/main/java/com/github/sarxos/webcam Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 44import java .util .List ;
55
66
7- public class WebcamCompositeDriver implements WebcamDriver {
7+ public class WebcamCompositeDriver implements WebcamDriver , WebcamDiscoverySupport {
88
99 private List <WebcamDriver > drivers = new ArrayList <WebcamDriver >();
1010
11+ private int scanInterval = -1 ;
12+
1113 public WebcamCompositeDriver (WebcamDriver ... drivers ) {
1214 for (WebcamDriver driver : drivers ) {
1315 this .drivers .add (driver );
@@ -42,4 +44,21 @@ public boolean isThreadSafe() {
4244 }
4345 return safe ;
4446 }
47+
48+ public void setScanInterval (int scanInterval ) {
49+ this .scanInterval = scanInterval ;
50+ }
51+
52+ @ Override
53+ public long getScanInterval () {
54+ if (scanInterval <= 0 ) {
55+ return DEFAULT_SCAN_INTERVAL ;
56+ }
57+ return scanInterval ;
58+ }
59+
60+ @ Override
61+ public boolean isScanPossible () {
62+ return true ;
63+ }
4564}
You can’t perform that action at this time.
0 commit comments