org.openpnp.capture.CaptureFormat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openpnp-capture-java Show documentation
Show all versions of openpnp-capture-java Show documentation
OpenPnP Capture Java with all binaries included, packaged for Maven.
package org.openpnp.capture;
import org.openpnp.capture.library.CapFormatInfo;
public class CaptureFormat {
final int formatId;
final CapFormatInfo formatInfo;
public CaptureFormat(int formatId, CapFormatInfo formatInfo) {
this.formatId = formatId;
this.formatInfo = formatInfo;
}
public int getFormatId() {
return formatId;
}
public CapFormatInfo getFormatInfo() {
return formatInfo;
}
@Override
public String toString() {
return String.format("%d x %d, %d FPS, %s", formatInfo.width, formatInfo.height,
formatInfo.fps, OpenPnpCapture.fourCcToString(formatInfo.fourcc));
}
@Override
public int hashCode() {
return formatInfo.hashCode();
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof CaptureFormat)) {
return false;
}
CaptureFormat format = (CaptureFormat) obj;
return format.formatInfo.equals(this.formatInfo);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy