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

Function readFrame

Samples/NiViewer/Device.cpp:285–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285void readFrame()
286{
287 XnStatus rc = XN_STATUS_OK;
288
289 if (g_pPrimary != NULL)
290 {
291 rc = g_Context.WaitOneUpdateAll(*g_pPrimary);
292 }
293 else
294 {
295 rc = g_Context.WaitAnyUpdateAll();
296 }
297
298 if (rc != XN_STATUS_OK)
299 {
300 printf("Error: %s\n", xnGetStatusString(rc));
301 }
302
303 if (g_Depth.IsValid())
304 {
305 g_Depth.GetMetaData(g_DepthMD);
306 }
307
308 if (g_Image.IsValid())
309 {
310 g_Image.GetMetaData(g_ImageMD);
311 }
312
313 if (g_IR.IsValid())
314 {
315 g_IR.GetMetaData(g_irMD);
316 }
317
318 if (g_Audio.IsValid())
319 {
320 g_Audio.GetMetaData(g_AudioMD);
321 }
322}
323
324void changeRegistration(int nValue)
325{

Callers 2

IdleCallbackFunction · 0.85
openCommonFunction · 0.85

Calls 5

xnGetStatusStringFunction · 0.85
WaitOneUpdateAllMethod · 0.80
WaitAnyUpdateAllMethod · 0.80
IsValidMethod · 0.45
GetMetaDataMethod · 0.45

Tested by

no test coverage detected