MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / setStreamProperties

Method setStreamProperties

src/openni2/DeviceDriver.cpp:115–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113 }
114
115 OniStatus setStreamProperties(VideoStream* stream, std::string pfx)
116 {
117 pfx += '-';
118 OniStatus res = ONI_STATUS_OK, tmp_res;
119 if (config.find(pfx + "size") != config.end()) {
120 WriteMessage("setStreamProperty: " + pfx + "size: " + config[pfx + "size"]);
121 std::string size(config[pfx + "size"]);
122 int i = size.find("x");
123 OniVideoMode video_mode = makeOniVideoMode(ONI_PIXEL_FORMAT_DEPTH_1_MM, atoi(size.substr(0, i).c_str()), atoi(size.substr(i + 1).c_str()), 30);
124 tmp_res = stream->setProperty(ONI_STREAM_PROPERTY_VIDEO_MODE, (void*)&video_mode, sizeof(video_mode));
125 if (tmp_res != ONI_STATUS_OK)
126 res = tmp_res;
127 }
128
129 return res;
130 }
131
132 void allocStream() {
133 if (! color) {

Callers

nothing calls this directly

Calls 3

makeOniVideoModeFunction · 0.85
endMethod · 0.80
setPropertyMethod · 0.45

Tested by

no test coverage detected