OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ImagingInterfaceC.h
Go to the documentation of this file.
1 
13 /*
14 // Copyright 2015 Sensics, Inc.
15 //
16 // Licensed under the Apache License, Version 2.0 (the "License");
17 // you may not use this file except in compliance with the License.
18 // You may obtain a copy of the License at
19 //
20 // http://www.apache.org/licenses/LICENSE-2.0
21 //
22 // Unless required by applicable law or agreed to in writing, software
23 // distributed under the License is distributed on an "AS IS" BASIS,
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 // See the License for the specific language governing permissions and
26 // limitations under the License.
27 */
28 
29 #ifndef INCLUDED_ImagingInterfaceC_h_GUID_5B6CAEED_5DE5_4CA6_657B_B0DCB5F7DA5C
30 #define INCLUDED_ImagingInterfaceC_h_GUID_5B6CAEED_5DE5_4CA6_657B_B0DCB5F7DA5C
31 
32 /* Internal Includes */
36 
37 /* Library/third-party includes */
38 /* none */
39 
40 /* Standard includes */
41 /* none */
42 
53 OSVR_EXTERN_C_BEGIN
54 
58 typedef struct OSVR_ImagingDeviceInterfaceObject *OSVR_ImagingDeviceInterface;
59 
70 OSVR_PLUGINKIT_EXPORT
71 OSVR_ReturnCode osvrDeviceImagingConfigure(
72  OSVR_INOUT_PTR OSVR_DeviceInitOptions opts,
73  OSVR_OUT_PTR OSVR_ImagingDeviceInterface *iface,
74  OSVR_IN OSVR_ChannelCount numSensors OSVR_CPP_ONLY(= 1))
75  OSVR_FUNC_NONNULL((1, 2));
76 
90 OSVR_PLUGINKIT_EXPORT
91 OSVR_ReturnCode
93  OSVR_IN_PTR OSVR_ImagingDeviceInterface iface,
94  OSVR_IN OSVR_ImagingMetadata metadata,
95  OSVR_IN_PTR OSVR_ImageBufferElement *imageData,
96  OSVR_IN OSVR_ChannelCount sensor,
97  OSVR_IN_PTR OSVR_TimeValue const *timestamp)
98  OSVR_FUNC_NONNULL((1, 2, 4, 6)); /* end of group */
100 
101 OSVR_EXTERN_C_END
102 
103 #endif
uint32_t OSVR_ChannelCount
The integer type specifying a number of channels/sensors or a channel/sensor index.
Definition: ChannelCountC.h:51
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.
struct OSVR_DeviceTokenObject * OSVR_DeviceToken
Opaque type of a registered device token within the core library.
struct OSVR_DeviceInitObject * OSVR_DeviceInitOptions
Opaque type of a device initialization object.
OSVR_ReturnCode osvrDeviceImagingConfigure(OSVR_DeviceInitOptions opts, OSVR_ImagingDeviceInterface *iface, OSVR_ChannelCount numSensors=1)
Specify that your device will implement the Imaging interface.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Definition: TimeValueC.h:81
unsigned char OSVR_ImageBufferElement
Type for raw buffer access to image data.
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 func...