Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
sarxos committed Jan 15, 2013
1 parent 39534fb commit 8dba239
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Expand Up @@ -136,6 +136,24 @@ try {
}
```

### Timeout When Webcam Device Busy

Sometimes webcam device can be used by other process (e.g. Skype) or can be
unavailable due to various issues. In such a case Java process will not be able
to allocate it properly. To avoid application hang one can specify timeout
parameter to be used in ```getWebcams(..)``` and ```getDefault(..)``` methods:

Example below will wait 5 seconds for device to be discovered and throw
```TimeoutException``` if it cannot be found in such time interval.

```java
try {
Webcam webcam = Webcam.getDefault(5, TimeUnit.SECONDS);
} catch (TimeoutException e) {
System.err.println("Cannot find default webcam due to discovery timeout");
}
```

## Drivers

Webcam Capture can utilize additional drivers to extend its own functionality. Currently below
Expand Down

0 comments on commit 8dba239

Please sign in to comment.