diff --git a/build.gradle b/build.gradle index c49a5f79..99b1bd47 100644 --- a/build.gradle +++ b/build.gradle @@ -74,7 +74,7 @@ dependencies { implementation('com.fasterxml.jackson.core:jackson-databind:2.17.2') implementation('com.sparrowwallet:hummingbird:1.7.4') implementation('co.nstant.in:cbor:0.9') - implementation('org.openpnp:openpnp-capture-java:0.0.28-5') + implementation('org.openpnp:openpnp-capture-java:0.0.28-6') implementation("io.matthewnelson.kmp-tor:runtime:2.2.1") implementation("io.matthewnelson.kmp-tor:resource-exec-tor-gpl:408.16.3") implementation('org.jetbrains.kotlinx:kotlinx-coroutines-javafx:1.10.1') { diff --git a/src/main/java/com/sparrowwallet/sparrow/control/WebcamPixelFormat.java b/src/main/java/com/sparrowwallet/sparrow/control/WebcamPixelFormat.java index dd6bf68f..9845fe79 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/WebcamPixelFormat.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/WebcamPixelFormat.java @@ -6,6 +6,7 @@ public enum WebcamPixelFormat { //Only V4L2 formats defined in linux/videodev2.h are required here, declared in order of priority for supported formats PIX_FMT_RGB24("RGB3", true), PIX_FMT_YUYV("YUYV", true), + PIX_FMT_NV12("NV12", true), PIX_FMT_MJPG("MJPG", true); private final String name; diff --git a/src/main/java/com/sparrowwallet/sparrow/control/WebcamService.java b/src/main/java/com/sparrowwallet/sparrow/control/WebcamService.java index 39760e08..d5aae62e 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/WebcamService.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/WebcamService.java @@ -182,9 +182,9 @@ public class WebcamService extends ScheduledService { } } - //On Linux, formats not defined in WebcamPixelFormat are unsupported so ask for RGB3 + //On Linux, formats not defined in WebcamPixelFormat are unsupported if(OsType.getCurrent() == OsType.UNIX && WebcamPixelFormat.fromFourCC(format.getFormatInfo().fourcc) == null) { - format.getFormatInfo().fourcc = WebcamPixelFormat.PIX_FMT_RGB24.getFourCC(); + log.warn("Unsupported camera pixel format " + WebcamPixelFormat.fourCCToString(format.getFormatInfo().fourcc)); } if(log.isDebugEnabled()) {