MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / captureOpenWriteDevice

Function captureOpenWriteDevice

Samples/NiViewer/Capture.cpp:199–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197 }
198
199bool captureOpenWriteDevice()
200{
201 XnStatus nRetVal = XN_STATUS_OK;
202 NodeInfoList recordersList;
203 nRetVal = g_Context.EnumerateProductionTrees(XN_NODE_TYPE_RECORDER, NULL, recordersList);
204 START_CAPTURE_CHECK_RC(nRetVal, "Enumerate recorders");
205 // take first
206 NodeInfo chosen = *recordersList.Begin();
207
208 g_Capture.pRecorder = new Recorder;
209 nRetVal = g_Context.CreateProductionTree(chosen, *g_Capture.pRecorder);
210 START_CAPTURE_CHECK_RC(nRetVal, "Create recorder");
211
212 nRetVal = g_Capture.pRecorder->SetDestination(XN_RECORD_MEDIUM_FILE, g_Capture.csFileName);
213 START_CAPTURE_CHECK_RC(nRetVal, "Set output file");
214
215 return true;
216}
217
218void captureBrowse(int)
219{

Callers 3

captureBrowseFunction · 0.85
captureStartFunction · 0.85
captureRestartFunction · 0.85

Calls 4

CreateProductionTreeMethod · 0.80
BeginMethod · 0.45
SetDestinationMethod · 0.45

Tested by

no test coverage detected