Compare commits

..

No commits in common. "88a4c75b2df03c22ddf06848af79e89a5725b5e4" and "8884994599f41c699a7dddf678f8851bb1bca14b" have entirely different histories.

7 changed files with 18 additions and 6 deletions

View File

@ -9,7 +9,7 @@ For MacOS, it uses `AVFDriver`, based on a [custom library](https://github.com/e
# How to use # How to use
1. Add `io.github.eduramiba:webcam-capture-driver-native:1.2.0` dependency to your application. 1. Add `io.github.eduramiba:webcam-capture-driver-native:1.0.0` dependency to your application.
2. Use the driver with `Webcam.setDriver(new NativeDriver())` 2. Use the driver with `Webcam.setDriver(new NativeDriver())`
3. List the devices with `Webcam.getWebcams()` as normal and use the library in your preferred way. In JavaFX it's recommended to do it as in the example below. 3. List the devices with `Webcam.getWebcams()` as normal and use the library in your preferred way. In JavaFX it's recommended to do it as in the example below.

18
pom.xml
View File

@ -3,7 +3,7 @@
<groupId>io.github.eduramiba</groupId> <groupId>io.github.eduramiba</groupId>
<artifactId>webcam-capture-driver-native</artifactId> <artifactId>webcam-capture-driver-native</artifactId>
<version>1.2.0</version> <version>1.1.0</version>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging> <packaging>jar</packaging>
@ -47,7 +47,8 @@
<driver.slf4j.version>2.0.16</driver.slf4j.version> <driver.slf4j.version>2.0.16</driver.slf4j.version>
<driver.webcam-capture.version>0.3.13-SNAPSHOT</driver.webcam-capture.version> <driver.webcam-capture.version>0.3.13-SNAPSHOT</driver.webcam-capture.version>
<driver.jna.version>5.16.0</driver.jna.version> <driver.aalto-xml.version>1.3.3</driver.aalto-xml.version>
<driver.jna.version>5.15.0</driver.jna.version>
<driver.javafx.version>19</driver.javafx.version> <driver.javafx.version>19</driver.javafx.version>
@ -66,7 +67,7 @@
<driver.maven-surefire-plugin.version>3.5.2</driver.maven-surefire-plugin.version> <driver.maven-surefire-plugin.version>3.5.2</driver.maven-surefire-plugin.version>
<driver.maven-failsafe-plugin.version>3.5.2</driver.maven-failsafe-plugin.version> <driver.maven-failsafe-plugin.version>3.5.2</driver.maven-failsafe-plugin.version>
<driver.maven-exec-plugin.version>3.5.0</driver.maven-exec-plugin.version> <driver.maven-exec-plugin.version>3.5.0</driver.maven-exec-plugin.version>
<driver.modernizer-plugin.version>3.0.0</driver.modernizer-plugin.version> <driver.modernizer-plugin.version>2.9.0</driver.modernizer-plugin.version>
<driver.versions-maven-plugin.version>2.18.0</driver.versions-maven-plugin.version> <driver.versions-maven-plugin.version>2.18.0</driver.versions-maven-plugin.version>
<driver.help-maven-plugin.version>3.5.1</driver.help-maven-plugin.version> <driver.help-maven-plugin.version>3.5.1</driver.help-maven-plugin.version>
<driver.maven-enforcer-plugin.version>3.5.0</driver.maven-enforcer-plugin.version> <driver.maven-enforcer-plugin.version>3.5.0</driver.maven-enforcer-plugin.version>
@ -94,6 +95,12 @@
<version>${driver.jna.version}</version> <version>${driver.jna.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.fasterxml</groupId>
<artifactId>aalto-xml</artifactId>
<version>${driver.aalto-xml.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.openjfx</groupId> <groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId> <artifactId>javafx-graphics</artifactId>
@ -124,6 +131,11 @@
<artifactId>jna-platform</artifactId> <artifactId>jna-platform</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.fasterxml</groupId>
<artifactId>aalto-xml</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.openjfx</groupId> <groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId> <artifactId>javafx-graphics</artifactId>

View File

@ -36,7 +36,7 @@ public class NokhwaDriver implements WebcamDriver {
final int devicesCount = lib.cnokhwa_devices_count(); final int devicesCount = lib.cnokhwa_devices_count();
LOG.debug("Available devices: {}", devicesCount); LOG.info("Available devices: {}", devicesCount);
if (devicesCount < 1) { if (devicesCount < 1) {
return list; return list;
@ -69,7 +69,7 @@ public class NokhwaDriver implements WebcamDriver {
} }
} }
LOG.debug("Found camera {} (id {}) with available formats: {}", name, uniqueId, availableFormats); LOG.info("Found camera {} (id {}) with available formats: {}", name, uniqueId, availableFormats);
final NokhwaVideoDevice device = new NokhwaVideoDevice(devIndex, uniqueId, name, resolutions, maxFps); final NokhwaVideoDevice device = new NokhwaVideoDevice(devIndex, uniqueId, name, resolutions, maxFps);
if (device.isValid()) { if (device.isValid()) {