[BREAKGLASS] Append-only mirror of github.com/sparrowwallet/openpnp-capture-java
Go to file
2023-02-16 22:14:53 -06:00
.github/workflows - Round and round we go. 2023-02-16 22:14:53 -06:00
scripts Merge branch 'switch_to_jna_only' of https://github.com/brainstorm/openpnp-capture-java into brainstorm-switch_to_jna_only 2023-02-16 21:22:18 -06:00
src Merge branch 'switch_to_jna_only' of https://github.com/brainstorm/openpnp-capture-java into brainstorm-switch_to_jna_only 2023-02-16 21:22:18 -06:00
.gitignore Merge branch 'switch_to_jna_only' of https://github.com/brainstorm/openpnp-capture-java into brainstorm-switch_to_jna_only 2023-02-16 21:22:18 -06:00
LICENSE.txt Add deployment configuration to pom for releasing on Central. 2017-09-18 02:22:52 -05:00
pom.xml - Okay, everything but windows worked. Let's upgrade JNA cause why not, and see what is getting downloaded. 2023-02-16 21:43:38 -06:00
README.md Let's change master to main, and call this good. 2023-02-16 21:59:05 -06:00

OpenPNP Logo

openpnp-capture-java

Java bindings for the openpnp-capture video capture library. Releases include all platform binaries and support auto extraction for a "plug and play" experience. Simply install the Maven dependency and start capturing!

Usage

Maven

<dependency>
	<groupId>org.openpnp</groupId>
	<artifactId>openpnp-capture-java</artifactId>
</dependency>

Example

public static void main(String[] args) {
    OpenPnpCapture capture = new OpenPnpCapture();
    CaptureDevice device = capture.getDevices().get(0);
    CaptureFormat format = device.getFormats().get(0);
    CaptureStream stream = device.openStream(format);
    BufferedImage image = stream.capture();
}

Build

See https://github.com/openpnp/openpnp-capture/releases to pick a release of the native library to build against and specify it's tag name in the next command.

./scripts/download-openpnp-capture.sh <RELEASE>
mvn clean package

Release

Releases are built automatically using Github Actions. Binaries for non-tagged commits can be downloaded from the Actions tab. Binaries for tagged releases are deployed to Maven Central and Github Releases.

To release a new version to Github Releases and Maven central:

  1. Choose an OpenPnP Capture release from https://github.com/openpnp/openpnp-capture/releases.
  2. Update the version line in .github/workflows/build.yml to include that release name.
  3. Update the version in pom.xml. Should match release. Append -n for sub-releases.
  4. Commit and tag the changes with the new version number.
  5. Push to main.
  6. Github Actions will build and deploy the release.