[BREAKGLASS] Append-only mirror of github.com/sparrowwallet/openpnp-capture-java
Go to file
Roman Valls Guimera 48dfcdf7df Add Maven cache
2021-07-10 22:49:16 +10:00
.github/workflows Add Maven cache 2021-07-10 22:49:16 +10:00
scripts Copy the right binary 2021-07-10 12:32:48 +10:00
src * Add support for CaptureStream.hasNewFrame(). 2019-01-13 21:55:58 -06:00
target/generated-sources/java/org/openpnp/capture/library Fixup JNAerator-based bad formatting on the variable comments that made javadoc error out and fail the build... many warnings left behind though 2021-07-06 01:05:58 +10:00
.gitignore Ignore all generated targets 2021-07-06 01:06:49 +10:00
LICENSE.txt Add deployment configuration to pom for releasing on Central. 2017-09-18 02:22:52 -05:00
pom.xml Bump up maven-javadoc-utils for clearer error messages 2021-07-06 01:05:04 +10:00
README.md - Finished up v1 of the build script. Deploys to artifacts, maven central, and github releases on tags. 2021-03-07 20:49:38 -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 master.
  6. Github Actions will build and deploy the release.