eduramiba / webcam-capture-driver-native

Native driver for Webcam Capture API
26 stars 8 forks source link

Split into 3 JARs #14

Closed msgilligan closed 1 week ago

msgilligan commented 1 year ago

It would be nice if this could be split into 3 JARs:

  1. A standalone JAR for the macOS driver
  2. A standalone JAR for the Windows driver
  3. A combined (either merged or using transitive dependencies) JAR that contains the combined NativeDriver class and behaves the same as the current JAR.

This will reduce the size of the JARs and their dependencies for apps that don't need everything.

I also think the JavaFX dependency should probably be removed.

msgilligan commented 1 year ago

This is what Gradle is reporting for dependencies:

+--- com.github.eduramiba:webcam-capture-driver-native:1.0.0-SNAPSHOT
|    +--- com.github.sarxos:webcam-capture:0.3.13-SNAPSHOT (*)
|    +--- net.java.dev.jna:jna:5.12.1
|    +--- net.java.dev.jna:jna-platform:5.12.1
|    |    \--- net.java.dev.jna:jna:5.12.1
|    +--- com.fasterxml:aalto-xml:1.3.2
|    |    \--- org.codehaus.woodstox:stax2-api:4.2
|    \--- org.slf4j:slf4j-api:2.0.5

It seems that aalto-xml is only needed for the Windows driver, right?

eduramiba commented 1 year ago

Right, xml processing is only necessary with the capturemanager driver. We could have 3 jars and the mac/win maven modules marked as optional in case someone does not need all.

eduramiba commented 1 year ago

JavaFX could also be optional, it's useful/faster to have code that directly updates the FXImage from a buffer without needing a BufferedImage

eduramiba commented 1 week ago

I just released version 1.1.0, which reduces dependencies and eventually will use the same driver for all OS. Also, the artifact is available with a classifier (without-natives) that does not package the natives in the jar.