OSVR-Core
|
Used by the C++ header-only wrappers to send image reports from a device in your plugin. More...
Typedefs | |
typedef typedefOSVR_EXTERN_C_BEGIN struct OSVR_ImagingDeviceInterfaceObject * | OSVR_ImagingDeviceInterface |
Opaque type used in conjunction with a device token to send data on an imaging interface. | |
Functions | |
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode | osvrDeviceImagingConfigure (OSVR_INOUT_PTR OSVR_DeviceInitOptions opts, OSVR_OUT_PTR OSVR_ImagingDeviceInterface *iface, OSVR_IN OSVR_ChannelCount numSensors OSVR_CPP_ONLY(=1)) OSVR_FUNC_NONNULL((1 |
Specify that your device will implement the Imaging interface. More... | |
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode | osvrDeviceImagingReportFrame (OSVR_IN_PTR OSVR_DeviceToken dev, OSVR_IN_PTR OSVR_ImagingDeviceInterface iface, OSVR_IN OSVR_ImagingMetadata metadata, OSVR_IN_PTR OSVR_ImageBufferElement *imageData, OSVR_IN OSVR_ChannelCount sensor, OSVR_IN_PTR OSVR_TimeValue const *timestamp) OSVR_FUNC_NONNULL((1 |
Report a frame for a sensor. More... | |
Used by the C++ header-only wrappers to send image reports from a device in your plugin.
Not intended for direct usage if it can be avoided due to lifetime management and datatypes.
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrDeviceImagingConfigure | ( | OSVR_INOUT_PTR OSVR_DeviceInitOptions | opts, |
OSVR_OUT_PTR OSVR_ImagingDeviceInterface * | iface, | ||
OSVR_IN OSVR_ChannelCount numSensors | OSVR_CPP_ONLY=1 | ||
) |
Specify that your device will implement the Imaging interface.
opts | The device init options object. | |
[out] | iface | An interface object you should retain with the same lifetime as the device token in order to send messages conforming to an imaging interface. |
numSensors | The number of imaging sensors you will be reporting: usually just 1 (multiple channels per sensor supported). This parameter may be subject to external limitations. |
OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode OSVR_PLUGINKIT_EXPORT OSVR_ReturnCode osvrDeviceImagingReportFrame | ( | OSVR_IN_PTR OSVR_DeviceToken | dev, |
OSVR_IN_PTR OSVR_ImagingDeviceInterface | iface, | ||
OSVR_IN OSVR_ImagingMetadata | metadata, | ||
OSVR_IN_PTR OSVR_ImageBufferElement * | imageData, | ||
OSVR_IN OSVR_ChannelCount | sensor, | ||
OSVR_IN_PTR OSVR_TimeValue const * | timestamp | ||
) |
Report a frame for a sensor.
Takes ownership of the buffer and frees it with the osvrAlignedFree
function** when done, so for stability only pass in memory allocated by osvrAlignedAlloc
. The C++ wrapper for this function takes care of this automatically.
dev | Device token |
iface | Imaging interface |
metadata | Image metadata |
imageData | A pointer to a copy of the image data, will be destroyed when no longer needed using OpenCV deallocation functions. |
sensor | Sensor number, usually 0 |
timestamp | Timestamp correlating to frame. |