public interface OpenpnpCaptureLibrary
extends com.sun.jna.Library
| Modifier and Type | Field and Description |
|---|---|
static int |
CAPPROPID_BRIGHTNESS
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPPROPID_CONTRAST
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPPROPID_EXPOSURE
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPPROPID_FOCUS
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPPROPID_GAIN
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPPROPID_GAMMA
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPPROPID_LAST
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPPROPID_SATURATION
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPPROPID_WHITEBALANCE
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPPROPID_ZOOM
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPRESULT_DEVICENOTFOUND
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPRESULT_ERR
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPRESULT_FORMATNOTSUPPORTED
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPRESULT_OK
native declaration : openpnp-capture/include/openpnp-capture.h
|
static int |
CAPRESULT_PROPERTYNOTSUPPORTED
native declaration : openpnp-capture/include/openpnp-capture.h
|
static OpenpnpCaptureLibrary |
INSTANCE |
static String |
JNA_LIBRARY_NAME |
static com.sun.jna.NativeLibrary |
JNA_NATIVE_LIB |
| Modifier and Type | Method and Description |
|---|---|
int |
Cap_captureFrame(com.sun.jna.Pointer ctx,
int stream,
com.sun.jna.Pointer RGBbufferPtr,
int RGBbufferBytes)
this function copies the most recent RGB frame data
to the given buffer. Original signature : CapResult Cap_captureFrame(CapContext, CapStream, void*, uint32_t)native declaration : openpnp-capture/include/openpnp-capture.h:183 |
int |
Cap_closeStream(com.sun.jna.Pointer ctx,
int stream)
Close a capture stream
|
com.sun.jna.Pointer |
Cap_createContext()
Initialize the capture library
|
int |
Cap_getAutoProperty(com.sun.jna.Pointer ctx,
int stream,
int propID,
IntBuffer outValue)
get the automatic flag of a camera/stream property (e.g.
|
int |
Cap_getAutoProperty(com.sun.jna.Pointer ctx,
int stream,
int propID,
com.sun.jna.ptr.IntByReference outValue)
Deprecated.
|
int |
Cap_getDeviceCount(com.sun.jna.Pointer ctx)
Get the number of capture devices on the system.
note: this can change dynamically due to the pluggin and unplugging of USB devices. |
com.sun.jna.Pointer |
Cap_getDeviceName(com.sun.jna.Pointer ctx,
int index)
Get the name of a capture device.
This name is meant to be displayed in GUI applications, i.e. |
com.sun.jna.Pointer |
Cap_getDeviceUniqueID(com.sun.jna.Pointer ctx,
int index)
Get the unique name of a capture device.
The string contains a unique concatenation of the device name and other parameters. These parameters are platform dependent. Note: when a USB camera does not expose a serial number, platforms might have trouble uniquely identifying a camera. |
int |
Cap_getFormatInfo(com.sun.jna.Pointer ctx,
int index,
int id,
CapFormatInfo info)
Get the format information from a device.
|
com.sun.jna.Pointer |
Cap_getLibraryVersion()
Return the version of the library as a string.
In addition to a version number, this should contain information on the platform, e.g. |
int |
Cap_getNumFormats(com.sun.jna.Pointer ctx,
int index)
Returns the number of formats supported by a certain device.
returns -1 if device does not exist. |
int |
Cap_getProperty(com.sun.jna.Pointer ctx,
int stream,
int propID,
IntBuffer outValue)
get the value of a camera/stream property (e.g.
|
int |
Cap_getProperty(com.sun.jna.Pointer ctx,
int stream,
int propID,
com.sun.jna.ptr.IntByReference outValue)
Deprecated.
|
int |
Cap_getPropertyLimits(com.sun.jna.Pointer ctx,
int stream,
int propID,
IntBuffer min,
IntBuffer max)
get the min/max limits of a camera/stream property (e.g.
|
int |
Cap_getPropertyLimits(com.sun.jna.Pointer ctx,
int stream,
int propID,
com.sun.jna.ptr.IntByReference min,
com.sun.jna.ptr.IntByReference max)
|
int |
Cap_getStreamFrameCount(com.sun.jna.Pointer ctx,
int stream)
returns the number of frames captured during the lifetime of the stream.
|
int |
Cap_hasNewFrame(com.sun.jna.Pointer ctx,
int stream)
returns 1 if a new frame has been captured, 0 otherwise
Original signature : uint32_t Cap_hasNewFrame(CapContext, CapStream)native declaration : openpnp-capture/include/openpnp-capture.h:186 |
int |
Cap_isOpenStream(com.sun.jna.Pointer ctx,
int stream)
Check if a stream is open, i.e.
|
int |
Cap_openStream(com.sun.jna.Pointer ctx,
int index,
int formatID)
Open a capture stream to a device with specific format requirements
Although the (internal) frame buffer format is set via the fourCC ID, the frames returned by Cap_captureFrame are always 24-bit RGB. |
int |
Cap_releaseContext(com.sun.jna.Pointer ctx)
Un-initialize the capture library context
|
int |
Cap_setAutoProperty(com.sun.jna.Pointer ctx,
int stream,
int propID,
int bOnOff)
set the automatic flag of a camera/stream property (e.g.
|
void |
Cap_setLogLevel(int level)
Set the logging level.
LOG LEVEL ID | LEVEL ------------- | ------------- LOG_EMERG | 0 LOG_ALERT | 1 LOG_CRIT | 2 LOG_ERR | 3 LOG_WARNING | 4 LOG_NOTICE | 5 LOG_INFO | 6 LOG_DEBUG | 7 LOG_VERBOSE | 8 Original signature : void Cap_setLogLevel(uint32_t)native declaration : openpnp-capture/include/openpnp-capture.h:257 |
int |
Cap_setProperty(com.sun.jna.Pointer ctx,
int stream,
int propID,
int value)
set the value of a camera/stream property (e.g.
|
static final String JNA_LIBRARY_NAME
static final com.sun.jna.NativeLibrary JNA_NATIVE_LIB
static final OpenpnpCaptureLibrary INSTANCE
static final int CAPPROPID_EXPOSURE
static final int CAPPROPID_FOCUS
static final int CAPPROPID_ZOOM
static final int CAPPROPID_WHITEBALANCE
static final int CAPPROPID_GAIN
static final int CAPPROPID_BRIGHTNESS
static final int CAPPROPID_CONTRAST
static final int CAPPROPID_SATURATION
static final int CAPPROPID_GAMMA
static final int CAPPROPID_LAST
static final int CAPRESULT_OK
static final int CAPRESULT_ERR
static final int CAPRESULT_DEVICENOTFOUND
static final int CAPRESULT_FORMATNOTSUPPORTED
static final int CAPRESULT_PROPERTYNOTSUPPORTED
com.sun.jna.Pointer Cap_createContext()
CapContext Cap_createContext()int Cap_releaseContext(com.sun.jna.Pointer ctx)
ctx - The ID of the context to destroy.CapResult Cap_releaseContext(CapContext)int Cap_getDeviceCount(com.sun.jna.Pointer ctx)
ctx - The ID of the context.uint32_t Cap_getDeviceCount(CapContext)com.sun.jna.Pointer Cap_getDeviceName(com.sun.jna.Pointer ctx,
int index)
ctx - The ID of the context.index - The device index of the capture device.char* Cap_getDeviceName(CapContext, CapDeviceID)com.sun.jna.Pointer Cap_getDeviceUniqueID(com.sun.jna.Pointer ctx,
int index)
ctx - The ID of the context.index - The device index of the capture device.char* Cap_getDeviceUniqueID(CapContext, CapDeviceID)int Cap_getNumFormats(com.sun.jna.Pointer ctx,
int index)
ctx - The ID of the context.index - The device index of the capture device.int32_t Cap_getNumFormats(CapContext, CapDeviceID)int Cap_getFormatInfo(com.sun.jna.Pointer ctx,
int index,
int id,
CapFormatInfo info)
ctx - The ID of the context.index - The device index of the capture device.id - The index/ID of the frame buffer format (0 .. number returned by Cap_getNumFormats() minus 1 ).info - pointer to a CapFormatInfo structure to be filled with data.CapResult Cap_getFormatInfo(CapContext, CapDeviceID, CapFormatID, CapFormatInfo*)int Cap_openStream(com.sun.jna.Pointer ctx,
int index,
int formatID)
ctx - The ID of the context.index - The device index of the capture device.formatID - The index/ID of the frame buffer format (0 .. number returned by Cap_getNumFormats() minus 1 ).CapStream Cap_openStream(CapContext, CapDeviceID, CapFormatID)int Cap_closeStream(com.sun.jna.Pointer ctx,
int stream)
ctx - The ID of the context.stream - The stream ID.CapResult Cap_closeStream(CapContext, CapStream)int Cap_isOpenStream(com.sun.jna.Pointer ctx,
int stream)
ctx - The ID of the context.stream - The stream ID.uint32_t Cap_isOpenStream(CapContext, CapStream)int Cap_captureFrame(com.sun.jna.Pointer ctx,
int stream,
com.sun.jna.Pointer RGBbufferPtr,
int RGBbufferBytes)
CapResult Cap_captureFrame(CapContext, CapStream, void*, uint32_t)int Cap_hasNewFrame(com.sun.jna.Pointer ctx,
int stream)
uint32_t Cap_hasNewFrame(CapContext, CapStream)int Cap_getStreamFrameCount(com.sun.jna.Pointer ctx,
int stream)
uint32_t Cap_getStreamFrameCount(CapContext, CapStream)@Deprecated int Cap_getPropertyLimits(com.sun.jna.Pointer ctx, int stream, int propID, com.sun.jna.ptr.IntByReference min, com.sun.jna.ptr.IntByReference max)
Cap_getPropertyLimits(com.sun.jna.Pointer, int, int, java.nio.IntBuffer, java.nio.IntBuffer) and Cap_getPropertyLimits(com.sun.jna.Pointer, int, int, com.sun.jna.ptr.IntByReference, com.sun.jna.ptr.IntByReference) insteadCapResult Cap_getPropertyLimits(CapContext, CapStream, CapPropertyID, int32_t*, int32_t*)int Cap_getPropertyLimits(com.sun.jna.Pointer ctx,
int stream,
int propID,
IntBuffer min,
IntBuffer max)
CapResult Cap_getPropertyLimits(CapContext, CapStream, CapPropertyID, int32_t*, int32_t*)int Cap_setProperty(com.sun.jna.Pointer ctx,
int stream,
int propID,
int value)
CapResult Cap_setProperty(CapContext, CapStream, CapPropertyID, int32_t)int Cap_setAutoProperty(com.sun.jna.Pointer ctx,
int stream,
int propID,
int bOnOff)
CapResult Cap_setAutoProperty(CapContext, CapStream, CapPropertyID, uint32_t)@Deprecated int Cap_getProperty(com.sun.jna.Pointer ctx, int stream, int propID, com.sun.jna.ptr.IntByReference outValue)
Cap_getProperty(com.sun.jna.Pointer, int, int, java.nio.IntBuffer) and Cap_getProperty(com.sun.jna.Pointer, int, int, com.sun.jna.ptr.IntByReference) insteadCapResult Cap_getProperty(CapContext, CapStream, CapPropertyID, int32_t*)int Cap_getProperty(com.sun.jna.Pointer ctx,
int stream,
int propID,
IntBuffer outValue)
CapResult Cap_getProperty(CapContext, CapStream, CapPropertyID, int32_t*)@Deprecated int Cap_getAutoProperty(com.sun.jna.Pointer ctx, int stream, int propID, com.sun.jna.ptr.IntByReference outValue)
Cap_getAutoProperty(com.sun.jna.Pointer, int, int, java.nio.IntBuffer) and Cap_getAutoProperty(com.sun.jna.Pointer, int, int, com.sun.jna.ptr.IntByReference) insteadCapResult Cap_getAutoProperty(CapContext, CapStream, CapPropertyID, uint32_t*)int Cap_getAutoProperty(com.sun.jna.Pointer ctx,
int stream,
int propID,
IntBuffer outValue)
CapResult Cap_getAutoProperty(CapContext, CapStream, CapPropertyID, uint32_t*)void Cap_setLogLevel(int level)
void Cap_setLogLevel(uint32_t)com.sun.jna.Pointer Cap_getLibraryVersion()
char* Cap_getLibraryVersion()Copyright © 2017. All rights reserved.