+ * The default device is usually the first device listed by
+ * {@link #getVideoDevices()}, however this is down to the underlying native
+ * libraries and operating system. The
+ * {@link #DEFAULT_DEVICE_NUMBER_PROPERTY} system property allows the
+ * selection of the default device to be overridden. The property value can
+ * be an integer representing the index of the default device in the list
+ * produced by {@link #DEFAULT_DEVICE_NUMBER_PROPERTY} or a {@link String}
+ * that includes part of the device identifier. In the case of a String
+ * value, the device with the identifier that first contains the value is
+ * selected.
+ *
+ * @param width the requested video width
+ * @param height the requested video height
+ * @throws IOException if no webcam is found
+ */
+ public VideoCapture(int width, int height) throws IOException {
+ // on 32 bit osx a deadlock seems to occur between the
+ // initialisation of the native library and AWT. This
+ // seems to fix it...
+ List
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that
+ * uses a
+ * few opensource projects..
+ * For help, please visit NativeLibs4Java or BridJ .
+ */
+@Library("OpenIMAJGrabber")
+@Runtime(CPPRuntime.class)
+@SuppressWarnings("all")
+public final class Device extends CPPObject {
+
+ public Device() {
+ super();
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public Device(Pointer pointer) {
+ super(pointer);
+ }
+
+ // / C type : const char*
+ @Field(0)
+ protected Pointer
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that
+ * uses a
+ * few opensource projects..
+ * For help, please visit NativeLibs4Java or BridJ .
+ */
+@Library("OpenIMAJGrabber")
+@SuppressWarnings("all")
+public class DeviceList extends CPPObject {
+
+ public DeviceList() {
+ super();
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public DeviceList(Pointer pointer) {
+ super(pointer);
+ }
+
+ @Field(0)
+ protected int nDevices() {
+ return this.io.getIntField(this, 0);
+ }
+
+ @Field(0)
+ protected DeviceList nDevices(int nDevices) {
+ this.io.setIntField(this, 0, nDevices);
+ return this;
+ }
+
+ // / C type : Device**
+ @Field(1)
+ protected Pointer
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that
+ * uses a
+ * few opensource projects..
+ * For help, please visit NativeLibs4Java or BridJ .
+ */
+@Library("OpenIMAJGrabber")
+@Runtime(CPPRuntime.class)
+@SuppressWarnings("all")
+public class OpenIMAJGrabber extends CPPObject {
+
+ static {
+ Platform.addEmbeddedLibraryResourceRoot("com/github/sarxos/webcam/ds/buildin/lib/");
+ BridJ.register();
+ }
+
+ public OpenIMAJGrabber() {
+ super();
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public OpenIMAJGrabber(Pointer pointer) {
+ super(pointer);
+ }
+
+ public native Pointer