Skip to content

Commit

Permalink
Cannot find default webcam driver
Browse files Browse the repository at this point in the history
fixes #1
  • Loading branch information
sarxos committed Nov 14, 2012
1 parent dd9fc8a commit c8eb227
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ public class Webcam {

private static final Logger LOG = LoggerFactory.getLogger(Webcam.class);

//@formatter:off
private static final String[] DRIVERS_DEFAULT = new String[] {
"com.github.sarxos.webcam.ds.openimaj.OpenImajDriver",
"com.github.sarxos.webcam.ds.civil.LtiCivilDriver",
"com.github.sarxos.webcam.ds.jmf.JmfDriver",
};
//@formatter:on

private static final List<String> DRIVERS_LIST = new ArrayList<String>(Arrays.asList(DRIVERS_DEFAULT));

Expand Down Expand Up @@ -221,6 +223,7 @@ public static List<Webcam> getWebcams() {
driver = WebcamDriverUtils.findDriver(DRIVERS_LIST);
}
if (driver == null) {
LOG.info("Webcam driver has not been found, default one will be used!");
driver = new DefaultDriver();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ protected static WebcamDriver findDriver(List<String> drivers) {
}
}

LOG.error("Webcam driver has not been found! Please add one to the classpath!");

throw new WebcamException("No webcam driver available");
return null;
}

/**
Expand Down

0 comments on commit c8eb227

Please sign in to comment.