21 typedef std::map< OniVideoMode, std::pair<freenect_video_format, freenect_resolution> >
FreenectVideoModeMap;
39 std::transform(supported_modes.begin(), supported_modes.end(), modes,
ExtractKey());
69 if (*pDataSize !=
sizeof(
float))
71 LogError(
"Unexpected size for ONI_STREAM_PROPERTY_HORIZONTAL_FOV");
79 if (*pDataSize !=
sizeof(
float))
81 LogError(
"Unexpected size for ONI_STREAM_PROPERTY_VERTICAL_FOV");
91 if (*pDataSize !=
sizeof(
OniBool))
93 LogError(
"Unexpected size for ONI_STREAM_PROPERTY_AUTO_WHITE_BALANCE");
101 if (*pDataSize !=
sizeof(
OniBool))
103 LogError(
"Unexpected size for ONI_STREAM_PROPERTY_AUTO_EXPOSURE");
122 if (dataSize !=
sizeof(
OniBool))
124 LogError(
"Unexpected size for ONI_STREAM_PROPERTY_AUTO_WHITE_BALANCE");
127 auto_white_balance = *(
static_cast<const OniBool*
>(data));
133 if (dataSize !=
sizeof(
OniBool))
135 LogError(
"Unexpected size for ONI_STREAM_PROPERTY_AUTO_EXPOSURE");
138 auto_exposure = *(
static_cast<const OniBool*
>(data));
144 if (dataSize !=
sizeof(
OniBool))
146 LogError(
"Unexpected size for ONI_STREAM_PROPERTY_MIRRORING");
OniStatus setProperty(int propertyId, const void *data, int dataSize)
static void LogError(std::string error)
virtual OniStatus setProperty(int propertyId, const void *data, int dataSize)
int setFlag(freenect_flag flag, bool value)
ColorStream(Freenect::FreenectDevice *pDevice)
static FreenectVideoModeMap getSupportedVideoModes()
static const float VERTICAL_FOV
void populateFrame(void *data, OniFrame *frame) const
static const float HORIZONTAL_FOV
OniBool isPropertySupported(int propertyId)
std::map< OniVideoMode, std::pair< freenect_video_format, freenect_resolution > > FreenectVideoModeMap
OniBool isPropertySupported(int propertyId)
Freenect::FreenectDevice * device
OniStatus setVideoMode(OniVideoMode requested_mode)
static const float DIAGONAL_FOV
static const OniSensorType sensor_type
OniStatus getProperty(int propertyId, void *data, int *pDataSize)
static OniSensorInfo getSensorInfo()
virtual OniStatus getProperty(int propertyId, void *data, int *pDataSize)