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

Function captureSetFormat

Samples/NiViewer/Capture.cpp:394–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394void captureSetFormat(XnCodecID* pMember, XnCodecID newFormat, ProductionNode &node)
395{
396 if (*pMember == newFormat)
397 return;
398
399 if (g_Capture.pRecorder != NULL)
400 {
401 // check if it was off before
402 if (*pMember == CODEC_DONT_CAPTURE)
403 {
404 g_Capture.pRecorder->AddNodeToRecording(node, newFormat);
405 }
406 // check if it is off now
407 else if (newFormat == CODEC_DONT_CAPTURE)
408 {
409 g_Capture.pRecorder->RemoveNodeFromRecording(node);
410 }
411 else // just a change in compression
412 {
413 g_Capture.pRecorder->RemoveNodeFromRecording(node);
414 g_Capture.pRecorder->AddNodeToRecording(node, newFormat);
415 }
416 }
417
418 *pMember = newFormat;
419}
420
421void captureSetDepthFormat(int format)
422{

Callers 4

captureSetDepthFormatFunction · 0.85
captureSetImageFormatFunction · 0.85
captureSetIRFormatFunction · 0.85
captureSetAudioFormatFunction · 0.85

Calls 2

AddNodeToRecordingMethod · 0.45

Tested by

no test coverage detected