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

Method GetDefaultCodecID

Source/OpenNI/XnRecorderImpl.cpp:570–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568}
569
570XnCodecID RecorderImpl::GetDefaultCodecID(ProductionNode& node)
571{
572 XN_ASSERT(node.IsValid());
573 XnProductionNodeType type = node.GetInfo().GetDescription().Type;
574
575 if (xnIsTypeDerivedFrom(type, XN_NODE_TYPE_DEPTH))
576 {
577 return XN_CODEC_16Z_EMB_TABLES;
578 }
579 else if (xnIsTypeDerivedFrom(type, XN_NODE_TYPE_IMAGE))
580 {
581 ImageGenerator gen(node);
582 XnPixelFormat format = gen.GetPixelFormat();
583 switch (format)
584 {
585 case XN_PIXEL_FORMAT_RGB24:
586 return XN_CODEC_JPEG;
587 case XN_PIXEL_FORMAT_GRAYSCALE_8_BIT:
588 return XN_CODEC_8Z;
589 default:
590 return XN_CODEC_UNCOMPRESSED;
591 }
592 }
593 else
594 {
595 return XN_CODEC_UNCOMPRESSED;
596 }
597}
598
599XnBool RecorderImpl::IsRawNode(const XnChar* strNodeName)
600{

Callers

nothing calls this directly

Calls 5

xnIsTypeDerivedFromFunction · 0.85
IsValidMethod · 0.45
GetDescriptionMethod · 0.45
GetInfoMethod · 0.45
GetPixelFormatMethod · 0.45

Tested by

no test coverage detected