[BREAKGLASS] Append-only mirror of github.com/sparrowwallet/openpnp-capture-java
Go to file
2021-03-07 18:32:33 -06:00
.github/workflows - First pass at building with Github actions. 2021-03-07 18:32:33 -06:00
scripts Plain libopenpnp-capture.so instead of -arm64, otherwise we'll have to fiddle with LD_LIBRARY_PATH 2020-05-02 01:08:57 +10:00
src * Add support for CaptureStream.hasNewFrame(). 2019-01-13 21:55:58 -06:00
.gitignore Add deployment configuration to pom for releasing on Central. 2017-09-18 02:22:52 -05:00
LICENSE.txt Add deployment configuration to pom for releasing on Central. 2017-09-18 02:22:52 -05:00
pom.xml - Update for v0.0.22 which hopefully fixes the macOS < 10.14 crash issue. 2020-09-09 23:04:47 -05:00
README.md Update README.md 2017-10-03 17:25:36 -05: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

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

Note, on OS X it may be neccessary to run export GPG_TTY=$(tty) before running the below commands. See https://github.com/pstadler/keybase-gpg-github/issues/11.

  1. Choose an OpenPnP Capture release from https://github.com/openpnp/openpnp-capture/releases.
  2. Update the before_install line in .travis.yml to include that release name.
  3. Update the version in pom.xml. Should match release. Append -n for sub-releases.
  4. Run ./scripts/download-openpnp-capture.sh <RELEASE>
  5. mvn clean deploy
  6. Tag the release with the new version number and push to master.
  7. Travis will build the release and post it to Github.

The deploy step requires credentials and private keys for Sonatype. Please contact a maintainer to discuss a Maven release.