1 /* Copyright (C) 2016 SurroundIO 2 * Author: Martin Kelly <martin@surround.io> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef _GST_AHSCAPS_H__ 21 #define _GST_AHSCAPS_H__ 22 23 G_BEGIN_DECLS 24 25 #define GST_SENSOR_FORMATS_ALL "{" \ 26 "accelerometer, " \ 27 "ambient-temperature, " \ 28 "game-rotation-vector, " \ 29 "geomagnetic-rotation-vector, " \ 30 "gravity, " \ 31 "gyroscope, " \ 32 "gyroscope-uncalibrated, " \ 33 "heart-rate, " \ 34 "light, " \ 35 "linear-acceleration, " \ 36 "magnetic-field, " \ 37 "magnetic-field-uncalibrated, " \ 38 "orientation, " \ 39 "pressure, " \ 40 "proximity, " \ 41 "relative-humidity, " \ 42 "rotation-vector, " \ 43 "significant-motion, " \ 44 "step-counter, " \ 45 "step-detector" \ 46 "}" 47 48 #define GST_SENSOR_CAPS_MAKE(format) \ 49 "application/sensor, " \ 50 "type = (string) " format 51 52 typedef struct GstAHSAccelerometerValues 53 { 54 gfloat x; 55 gfloat y; 56 gfloat z; 57 } GstAHSAccelerometerValues; 58 59 typedef struct GstAHSAmbientTemperatureValues 60 { 61 gfloat temperature; 62 } GstAHSAmbientTemperatureValues; 63 64 typedef struct GstAHSGameRotationVectorValues 65 { 66 gfloat x; 67 gfloat y; 68 gfloat z; 69 gfloat cos; 70 gfloat accuracy; 71 } GstAHSGameRotationVectorValues; 72 73 typedef struct GstAHSGeomagneticRotationVectorValues 74 { 75 gfloat x; 76 gfloat y; 77 gfloat z; 78 gfloat cos; 79 gfloat accuracy; 80 } GstAHSGeomagneticRotationVectorValues; 81 82 typedef struct GstAHSGravityValues 83 { 84 gfloat x; 85 gfloat y; 86 gfloat z; 87 } GstAHSGravityValues; 88 89 typedef struct GstAHSGyroscopeValues 90 { 91 gfloat x; 92 gfloat y; 93 gfloat z; 94 } GstAHSGyroscopeValues; 95 96 typedef struct GstAHSGyroscopeUncalibratedValues 97 { 98 gfloat x_speed; 99 gfloat y_speed; 100 gfloat z_speed; 101 gfloat x_drift; 102 gfloat y_drift; 103 gfloat z_drift; 104 } GstAHSGyroscopeUncalibratedValues; 105 106 typedef struct GstAHSHeartRateValues 107 { 108 gfloat bpm; 109 } GstAHSHeartRateValues; 110 111 typedef struct GstAHSLightValues 112 { 113 gfloat lux; 114 } GstAHSLightValues; 115 116 typedef struct GstAHSLinearAccelerationValues 117 { 118 gfloat x; 119 gfloat y; 120 gfloat z; 121 } GstAHSLinearAccelerationValues; 122 123 typedef struct GstAHSMagneticFieldValues 124 { 125 gfloat x; 126 gfloat y; 127 gfloat z; 128 } GstAHSMagneticFieldValues; 129 130 typedef struct GstAHSMagneticFieldUncalibratedValues 131 { 132 gfloat x_uncalib; 133 gfloat y_uncalib; 134 gfloat z_uncalib; 135 gfloat x_bias; 136 gfloat y_bias; 137 gfloat z_bias; 138 } GstAHSMagneticFieldUncalibratedValues; 139 140 typedef struct GstAHSOrientationValues 141 { 142 gfloat azimuth; 143 gfloat pitch; 144 gfloat roll; 145 } GstAHSOrientationValues; 146 147 typedef struct GstAHSProximity 148 { 149 gfloat distance; 150 } GstAHSProximityValues; 151 152 typedef struct GstAHSPressureValues 153 { 154 gfloat pressure; 155 } GstAHSPressureValues; 156 157 typedef struct GstAHSRelativeHumidityValues 158 { 159 gfloat humidity; 160 } GstAHSRelativeHumidityValues; 161 162 typedef struct GstAHSRotationVectorValues 163 { 164 gfloat x; 165 gfloat y; 166 gfloat z; 167 gfloat cos; 168 gfloat accuracy; 169 } GstAHSRotationVectorValues; 170 171 typedef struct GstAHSStepCounterValues 172 { 173 gfloat count; 174 } GstAHSStepCounterValues; 175 176 typedef struct GstAHSStepDetectorValues 177 { 178 gfloat one; 179 } GstAHSStepDetectorValues; 180 181 G_END_DECLS 182 #endif 183