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. 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_ReturnCode | osvrDeviceImagingConfigure (OSVR_DeviceInitOptions opts, OSVR_ImagingDeviceInterface *iface, OSVR_ChannelCount numSensors=1) |
Specify that your device will implement the Imaging interface. More... | |
OSVR_ReturnCode | osvrDeviceImagingReportFrame (OSVR_DeviceToken dev, OSVR_ImagingDeviceInterface iface, OSVR_ImagingMetadata metadata, OSVR_ImageBufferElement *imageData, OSVR_ChannelCount sensor, 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. 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_ReturnCode osvrDeviceImagingConfigure | ( | OSVR_DeviceInitOptions | opts, |
OSVR_ImagingDeviceInterface * | iface, | ||
OSVR_ChannelCount | numSensors = 1 |
||
) |
#include <osvr/PluginKit/ImagingInterfaceC.h>
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_ReturnCode osvrDeviceImagingReportFrame | ( | OSVR_DeviceToken | dev, |
OSVR_ImagingDeviceInterface | iface, | ||
OSVR_ImagingMetadata | metadata, | ||
OSVR_ImageBufferElement * | imageData, | ||
OSVR_ChannelCount | sensor, | ||
OSVR_TimeValue const * | timestamp | ||
) |
#include <osvr/PluginKit/ImagingInterfaceC.h>
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. |