34 FreenectVideoModeMap::const_iterator matched_mode_iter = supported_video_modes.find(requested_mode);
35 if (matched_mode_iter == supported_video_modes.end())
42 catch (std::runtime_error e)
44 LogError(
"Format " +
to_string(format) +
" and resolution " +
to_string(resolution) +
" combination not supported by libfreenect");
69 std::copy(source, source + frame->
dataSize, target);
static void LogError(std::string error)
ColorStream(Freenect::FreenectDevice *pDevice)
static FreenectVideoModeMap getSupportedVideoModes()
void populateFrame(void *data, OniFrame *frame) const
void setVideoFormat(freenect_video_format requested_format, freenect_resolution requested_resolution=FREENECT_RESOLUTION_MEDIUM)
std::map< OniVideoMode, std::pair< freenect_video_format, freenect_resolution > > FreenectVideoModeMap
Freenect::FreenectDevice * device
OniStatus setVideoMode(OniVideoMode requested_mode)
OniPixelFormat pixelFormat
static freenect_frame_mode supported_video_modes[video_mode_count]
static const OniSensorType sensor_type
static OniVideoMode makeOniVideoMode(OniPixelFormat pixel_format, int resolution_x, int resolution_y, int frames_per_second)
static std::string to_string(const T &n)