Open yongxin100 opened 3 years ago
ok, I 've solved the problem by following steps: 1、 use snapshot version of webcam-capture. 2、add nativelibs4java dependency to pom of the my project The POM files as following:
`<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>org.example</groupId>
<artifactId>jxxbarcode</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
<repository>
<id>Sonatype OSS Snapshot Repository</id>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
<repository>
<id>bridjhack</id>
<url>http://maven.ecs.soton.ac.uk/content/repositories/thirdparty/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.sarxos</groupId>
<artifactId>webcam-capture</artifactId>
<version>0.3.13-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.nativelibs4java</groupId>
<artifactId>bridj</artifactId>
<version>0.7-20140918-2</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacv</artifactId>
<version>1.4.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.25</version>
<!-- <scope>test</scope> -->
</dependency>
</dependencies>
`
Hi I launched a project in IDEA IDE and running example code of project:
But i got zero size of webcam list!!!
When i am using the default camera app PhotoBooth ,i can see both usb camera i attached to MacBook and internal camera.
It is something related to MacOS's permission strategy??
Thanks a lot!