![]() |
OpenNI 1.5.2
|
00001 /**************************************************************************** 00002 * * 00003 * OpenNI 1.x Alpha * 00004 * Copyright (C) 2011 PrimeSense Ltd. * 00005 * * 00006 * This file is part of OpenNI. * 00007 * * 00008 * OpenNI is free software: you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published * 00010 * by the Free Software Foundation, either version 3 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * OpenNI is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with OpenNI. If not, see <http://www.gnu.org/licenses/>. * 00020 * * 00021 ****************************************************************************/ 00022 #ifndef __XN_TYPES_H__ 00023 #define __XN_TYPES_H__ 00024 00025 //--------------------------------------------------------------------------- 00026 // Includes 00027 //--------------------------------------------------------------------------- 00028 #include <XnStatus.h> 00029 #include <XnOS.h> 00030 00031 //--------------------------------------------------------------------------- 00032 // Defines 00033 //--------------------------------------------------------------------------- 00035 #define XN_MAX_NAME_LENGTH 80 00036 00038 #define XN_MAX_CREATION_INFO_LENGTH 255 00039 00041 #define XN_MAX_LICENSE_LENGTH 255 00042 00044 #define XN_NODE_WAIT_FOR_DATA_TIMEOUT 2000 00045 00047 #define XN_VENDOR_OPEN_NI "OpenNI" 00048 00050 #define XN_FORMAT_NAME_ONI "oni" 00051 00053 #define XN_SCRIPT_FORMAT_XML "xml" 00054 00056 #define XN_PLAYBACK_SPEED_FASTEST 0.0 00057 00059 #define XN_AUTO_CONTROL XN_MIN_INT32 00060 00061 //--------------------------------------------------------------------------- 00062 // Forward Declarations 00063 //--------------------------------------------------------------------------- 00064 struct XnInternalNodeData; 00065 00066 //--------------------------------------------------------------------------- 00067 // Types 00068 //--------------------------------------------------------------------------- 00069 00070 #if XN_PLATFORM != XN_PLATFORM_ARC 00071 #pragma pack (push, 1) 00072 #endif 00073 00077 typedef struct XnContext XnContext; 00078 00082 typedef struct XnInternalNodeData* XnNodeHandle; 00083 00087 typedef XnUInt32 XnLockHandle; 00088 00092 typedef XnInt32 XnProductionNodeType; 00093 00097 typedef enum XnPredefinedProductionNodeType 00098 { 00100 XN_NODE_TYPE_INVALID = -1, 00101 00103 XN_NODE_TYPE_DEVICE = 1, 00104 00106 XN_NODE_TYPE_DEPTH = 2, 00107 00109 XN_NODE_TYPE_IMAGE = 3, 00110 00112 XN_NODE_TYPE_AUDIO = 4, 00113 00115 XN_NODE_TYPE_IR = 5, 00116 00118 XN_NODE_TYPE_USER = 6, 00119 00121 XN_NODE_TYPE_RECORDER = 7, 00122 00124 XN_NODE_TYPE_PLAYER = 8, 00125 00127 XN_NODE_TYPE_GESTURE = 9, 00128 00130 XN_NODE_TYPE_SCENE = 10, 00131 00133 XN_NODE_TYPE_HANDS = 11, 00134 00136 XN_NODE_TYPE_CODEC = 12, 00137 00139 XN_NODE_TYPE_PRODUCTION_NODE = 13, 00140 XN_NODE_TYPE_GENERATOR = 14, 00141 XN_NODE_TYPE_MAP_GENERATOR = 15, 00142 XN_NODE_TYPE_SCRIPT = 16, 00143 00144 XN_NODE_TYPE_FIRST_EXTENSION, 00145 00146 } XnPredefinedProductionNodeType; 00147 00151 typedef struct XnVersion 00152 { 00153 XnUInt8 nMajor; 00154 XnUInt8 nMinor; 00155 XnUInt16 nMaintenance; 00156 XnUInt32 nBuild; 00157 } XnVersion; 00158 00162 typedef struct XnProductionNodeDescription 00163 { 00165 XnProductionNodeType Type; 00167 XnChar strVendor[XN_MAX_NAME_LENGTH]; 00169 XnChar strName[XN_MAX_NAME_LENGTH]; 00171 XnVersion Version; 00172 } XnProductionNodeDescription; 00173 00177 typedef struct XnNodeInfo XnNodeInfo; 00178 00182 typedef struct XnNodeInfoListNode XnNodeInfoListNode; 00183 00187 typedef struct XnNodeInfoList XnNodeInfoList; 00188 00192 typedef struct XnNodeInfoListIterator 00193 { 00194 XnNodeInfoListNode* pCurrent; 00195 } XnNodeInfoListIterator; 00196 00197 typedef struct XnNodeQuery XnNodeQuery; 00198 00202 typedef struct XnLicense 00203 { 00205 XnChar strVendor[XN_MAX_NAME_LENGTH]; 00207 XnChar strKey[XN_MAX_LICENSE_LENGTH]; 00208 } XnLicense; 00209 00214 typedef struct XnEnumerationErrors XnEnumerationErrors; 00215 00219 typedef void* XnModuleNodeHandle; 00220 00227 typedef void (XN_CALLBACK_TYPE* XnStateChangedHandler)(XnNodeHandle hNode, void* pCookie); 00228 00235 typedef void (XN_CALLBACK_TYPE* XnErrorStateChangedHandler)(XnStatus errorState, void* pCookie); 00236 00242 typedef void (XN_CALLBACK_TYPE* XnFreeHandler)(const void* pData); 00243 00244 typedef void (XN_CALLBACK_TYPE* XnContextShuttingDownHandler)(XnContext* pContext, void* pCookie); 00245 00247 typedef void* XnCallbackHandle; 00248 00249 typedef struct XnModuleExportedProductionNodeInterface XnModuleExportedProductionNodeInterface; // Forward Declaration 00250 00251 //--------------------------------------------------------------------------- 00252 // 3D Vision Types 00253 //--------------------------------------------------------------------------- 00255 typedef XnUInt16 XnDepthPixel; 00256 00258 #define XN_DEPTH_NO_SAMPLE_VALUE ((XnDepthPixel)0) 00259 00261 typedef struct XnRGB24Pixel 00262 { 00263 XnUInt8 nRed; 00264 XnUInt8 nGreen; 00265 XnUInt8 nBlue; 00266 } XnRGB24Pixel; 00267 00269 typedef struct XnYUV422DoublePixel 00270 { 00271 XnUInt8 nU; 00272 XnUInt8 nY1; 00273 XnUInt8 nV; 00274 XnUInt8 nY2; 00275 } XnYUV422DoublePixel; 00276 00278 typedef XnUInt8 XnGrayscale8Pixel; 00279 00281 typedef XnUInt16 XnGrayscale16Pixel; 00282 00284 typedef XnGrayscale16Pixel XnIRPixel; 00285 00287 typedef XnUInt16 XnLabel; 00288 00289 //--------------------------------------------------------------------------- 00290 // Generators Capabilities 00291 //--------------------------------------------------------------------------- 00292 #define XN_CAPABILITY_EXTENDED_SERIALIZATION "ExtendedSerialization" 00293 #define XN_CAPABILITY_MIRROR "Mirror" 00294 #define XN_CAPABILITY_ALTERNATIVE_VIEW_POINT "AlternativeViewPoint" 00295 #define XN_CAPABILITY_CROPPING "Cropping" 00296 #define XN_CAPABILITY_USER_POSITION "UserPosition" 00297 #define XN_CAPABILITY_SKELETON "User::Skeleton" 00298 #define XN_CAPABILITY_POSE_DETECTION "User::PoseDetection" 00299 #define XN_CAPABILITY_LOCK_AWARE "LockAware" 00300 #define XN_CAPABILITY_ERROR_STATE "ErrorState" 00301 #define XN_CAPABILITY_FRAME_SYNC "FrameSync" 00302 #define XN_CAPABILITY_DEVICE_IDENTIFICATION "DeviceIdentification" 00303 #define XN_CAPABILITY_BRIGHTNESS "Brightness" 00304 #define XN_CAPABILITY_CONTRAST "Contrast" 00305 #define XN_CAPABILITY_HUE "Hue" 00306 #define XN_CAPABILITY_SATURATION "Saturation" 00307 #define XN_CAPABILITY_SHARPNESS "Sharpness" 00308 #define XN_CAPABILITY_GAMMA "Gamma" 00309 #define XN_CAPABILITY_COLOR_TEMPERATURE "ColorTemperature" 00310 #define XN_CAPABILITY_BACKLIGHT_COMPENSATION "BacklightCompensation" 00311 #define XN_CAPABILITY_GAIN "Gain" 00312 #define XN_CAPABILITY_PAN "Pan" 00313 #define XN_CAPABILITY_TILT "Tilt" 00314 #define XN_CAPABILITY_ROLL "Roll" 00315 #define XN_CAPABILITY_ZOOM "Zoom" 00316 #define XN_CAPABILITY_EXPOSURE "Exposure" 00317 #define XN_CAPABILITY_IRIS "Iris" 00318 #define XN_CAPABILITY_FOCUS "Focus" 00319 #define XN_CAPABILITY_LOW_LIGHT_COMPENSATION "LowLightCompensation" 00320 #define XN_CAPABILITY_ANTI_FLICKER "AntiFlicker" 00321 #define XN_CAPABILITY_HAND_TOUCHING_FOV_EDGE "Hands::HandTouchingFOVEdge" 00322 00323 // Backwards compatibility - typo was fixed 00324 #define XN_CAPABILITY_ANTI_FILCKER XN_CAPABILITY_ANTI_FLICKER 00325 00326 // deprecated pragma is only supported in Visual Studio 00327 #if (XN_PLATFORM == XN_PLATFORM_WIN32) 00328 #pragma deprecated("XN_CAPABILITY_ANTI_FILCKER") 00329 #endif 00330 00331 //--------------------------------------------------------------------------- 00332 // Generators API Structs 00333 //--------------------------------------------------------------------------- 00334 00335 #define XN_QQVGA_X_RES 160 00336 #define XN_QQVGA_Y_RES 120 00337 00338 #define XN_CGA_X_RES 320 00339 #define XN_CGA_Y_RES 200 00340 00341 #define XN_QVGA_X_RES 320 00342 #define XN_QVGA_Y_RES 240 00343 00344 #define XN_VGA_X_RES 640 00345 #define XN_VGA_Y_RES 480 00346 00347 #define XN_SVGA_X_RES 800 00348 #define XN_SVGA_Y_RES 600 00349 00350 #define XN_XGA_X_RES 1024 00351 #define XN_XGA_Y_RES 768 00352 00353 #define XN_720P_X_RES 1280 00354 #define XN_720P_Y_RES 720 00355 00356 #define XN_SXGA_X_RES 1280 00357 #define XN_SXGA_Y_RES 1024 00358 00359 #define XN_UXGA_X_RES 1600 00360 #define XN_UXGA_Y_RES 1200 00361 00362 #define XN_1080P_X_RES 1920 00363 #define XN_1080P_Y_RES 1080 00364 00365 #define XN_QCIF_X_RES 176 00366 #define XN_QCIF_Y_RES 144 00367 00368 #define XN_240P_X_RES 423 00369 #define XN_240P_Y_RES 240 00370 00371 #define XN_CIF_X_RES 352 00372 #define XN_CIF_Y_RES 288 00373 00374 #define XN_WVGA_X_RES 640 00375 #define XN_WVGA_Y_RES 360 00376 00377 #define XN_480P_X_RES 864 00378 #define XN_480P_Y_RES 480 00379 00380 #define XN_576P_X_RES 1024 00381 #define XN_576P_Y_RES 576 00382 00383 #define XN_DV_X_RES 960 00384 #define XN_DV_Y_RES 720 00385 00386 typedef enum XnResolution 00387 { 00388 XN_RES_CUSTOM = 0, 00389 XN_RES_QQVGA = 1, 00390 XN_RES_CGA = 2, 00391 XN_RES_QVGA = 3, 00392 XN_RES_VGA = 4, 00393 XN_RES_SVGA = 5, 00394 XN_RES_XGA = 6, 00395 XN_RES_720P = 7, 00396 XN_RES_SXGA = 8, 00397 XN_RES_UXGA = 9, 00398 XN_RES_1080P = 10, 00399 XN_RES_QCIF = 11, 00400 XN_RES_240P = 12, 00401 XN_RES_CIF = 13, 00402 XN_RES_WVGA = 14, 00403 XN_RES_480P = 15, 00404 XN_RES_576P = 16, 00405 XN_RES_DV = 17, 00406 } XnResolution; 00407 00411 typedef struct XnMapOutputMode 00412 { 00414 XnUInt32 nXRes; 00416 XnUInt32 nYRes; 00418 XnUInt32 nFPS; 00419 } XnMapOutputMode; 00420 00421 typedef enum XnSampleRate 00422 { 00423 XN_SAMPLE_RATE_8K = 8000, 00424 XN_SAMPLE_RATE_11K = 11025, 00425 XN_SAMPLE_RATE_12K = 12000, 00426 XN_SAMPLE_RATE_16K = 16000, 00427 XN_SAMPLE_RATE_22K = 22050, 00428 XN_SAMPLE_RATE_24K = 24000, 00429 XN_SAMPLE_RATE_32K = 32000, 00430 XN_SAMPLE_RATE_44K = 44100, 00431 XN_SAMPLE_RATE_48K = 48000, 00432 } XnSampleRate; 00433 00434 typedef struct XnWaveOutputMode 00435 { 00436 XnUInt32 nSampleRate; 00437 XnUInt16 nBitsPerSample; 00438 XnUInt8 nChannels; 00439 } XnWaveOutputMode; 00440 00444 typedef struct XnVector3D 00445 { 00446 XnFloat X; 00447 XnFloat Y; 00448 XnFloat Z; 00449 } XnVector3D; 00450 00451 typedef XnVector3D XnPoint3D; 00452 00456 typedef struct XnBoundingBox3D 00457 { 00458 XnPoint3D LeftBottomNear; 00459 XnPoint3D RightTopFar; 00460 } XnBoundingBox3D; 00461 00465 typedef struct XnCropping 00466 { 00468 XnBool bEnabled; 00470 XnUInt16 nXOffset; 00472 XnUInt16 nYOffset; 00474 XnUInt16 nXSize; 00476 XnUInt16 nYSize; 00477 } XnCropping; 00478 00482 typedef struct XnFieldOfView 00483 { 00485 XnDouble fHFOV; 00487 XnDouble fVFOV; 00488 } XnFieldOfView; 00489 00490 typedef enum XnPixelFormat 00491 { 00492 XN_PIXEL_FORMAT_RGB24 = 1, 00493 XN_PIXEL_FORMAT_YUV422 = 2, 00494 XN_PIXEL_FORMAT_GRAYSCALE_8_BIT = 3, 00495 XN_PIXEL_FORMAT_GRAYSCALE_16_BIT = 4, 00496 XN_PIXEL_FORMAT_MJPEG = 5, 00497 } XnPixelFormat; 00498 00499 typedef struct XnSupportedPixelFormats 00500 { 00501 XnBool m_bRGB24 : 1; 00502 XnBool m_bYUV422 : 1; 00503 XnBool m_bGrayscale8Bit : 1; 00504 XnBool m_bGrayscale16Bit : 1; 00505 XnBool m_bMJPEG : 1; 00506 XnUInt m_nPadding : 3; 00507 XnUInt m_nReserved : 24; 00508 } XnSupportedPixelFormats; 00509 00510 typedef enum XnPlayerSeekOrigin 00511 { 00512 XN_PLAYER_SEEK_SET = 0, 00513 XN_PLAYER_SEEK_CUR = 1, 00514 XN_PLAYER_SEEK_END = 2, 00515 } XnPlayerSeekOrigin; 00516 00517 typedef enum XnPowerLineFrequency 00518 { 00519 XN_POWER_LINE_FREQUENCY_OFF = 0, 00520 XN_POWER_LINE_FREQUENCY_50_HZ = 50, 00521 XN_POWER_LINE_FREQUENCY_60_HZ = 60, 00522 } XnPowerLineFrequency; 00523 00524 // User 00525 typedef XnUInt32 XnUserID; 00526 typedef XnFloat XnConfidence; 00527 00529 typedef struct XnMatrix3X3 00530 { 00532 XnFloat elements[9]; 00533 } XnMatrix3X3; 00534 00539 typedef struct XnPlane3D 00540 { 00542 XnVector3D vNormal; 00543 00545 XnPoint3D ptPoint; 00546 } XnPlane3D; 00547 00552 typedef struct XnSkeletonJointPosition 00553 { 00555 XnVector3D position; 00556 00558 XnConfidence fConfidence; 00559 } XnSkeletonJointPosition; 00560 00568 typedef struct XnSkeletonJointOrientation 00569 { 00571 XnMatrix3X3 orientation; 00573 XnConfidence fConfidence; 00574 } XnSkeletonJointOrientation; 00575 00579 typedef struct XnSkeletonJointTransformation 00580 { 00582 XnSkeletonJointPosition position; 00584 XnSkeletonJointOrientation orientation; 00585 } XnSkeletonJointTransformation; 00586 00590 typedef enum XnSkeletonJoint 00591 { 00592 XN_SKEL_HEAD = 1, 00593 XN_SKEL_NECK = 2, 00594 XN_SKEL_TORSO = 3, 00595 XN_SKEL_WAIST = 4, 00596 00597 XN_SKEL_LEFT_COLLAR = 5, 00598 XN_SKEL_LEFT_SHOULDER = 6, 00599 XN_SKEL_LEFT_ELBOW = 7, 00600 XN_SKEL_LEFT_WRIST = 8, 00601 XN_SKEL_LEFT_HAND = 9, 00602 XN_SKEL_LEFT_FINGERTIP =10, 00603 00604 XN_SKEL_RIGHT_COLLAR =11, 00605 XN_SKEL_RIGHT_SHOULDER =12, 00606 XN_SKEL_RIGHT_ELBOW =13, 00607 XN_SKEL_RIGHT_WRIST =14, 00608 XN_SKEL_RIGHT_HAND =15, 00609 XN_SKEL_RIGHT_FINGERTIP =16, 00610 00611 XN_SKEL_LEFT_HIP =17, 00612 XN_SKEL_LEFT_KNEE =18, 00613 XN_SKEL_LEFT_ANKLE =19, 00614 XN_SKEL_LEFT_FOOT =20, 00615 00616 XN_SKEL_RIGHT_HIP =21, 00617 XN_SKEL_RIGHT_KNEE =22, 00618 XN_SKEL_RIGHT_ANKLE =23, 00619 XN_SKEL_RIGHT_FOOT =24 00620 } XnSkeletonJoint; 00621 00623 typedef enum XnSkeletonProfile 00624 { 00626 XN_SKEL_PROFILE_NONE = 1, 00627 00629 XN_SKEL_PROFILE_ALL = 2, 00630 00632 XN_SKEL_PROFILE_UPPER = 3, 00633 00635 XN_SKEL_PROFILE_LOWER = 4, 00636 00638 XN_SKEL_PROFILE_HEAD_HANDS = 5, 00639 } XnSkeletonProfile; 00640 00642 typedef enum XnPoseDetectionStatus 00643 { 00644 XN_POSE_DETECTION_STATUS_OK = 0, 00645 XN_POSE_DETECTION_STATUS_NO_USER = 1, 00646 XN_POSE_DETECTION_STATUS_TOP_FOV = 2, 00647 XN_POSE_DETECTION_STATUS_SIDE_FOV = 3, 00648 XN_POSE_DETECTION_STATUS_ERROR = 4, 00649 XN_POSE_DETECTION_STATUS_NO_TRACKING = 5 00650 } XnPoseDetectionStatus; 00651 00652 00654 typedef enum XnPoseDetectionState 00655 { 00656 XN_POSE_DETECTION_STATE_IN_POSE =0, 00657 XN_POSE_DETECTION_STATE_OUT_OF_POSE =1, 00658 XN_POSE_DETECTION_STATE_UNDEFINED =2 00659 } XnPoseDetectionState; 00661 typedef enum XnCalibrationStatus 00662 { 00663 XN_CALIBRATION_STATUS_OK = 0, 00664 XN_CALIBRATION_STATUS_NO_USER = 1, 00665 XN_CALIBRATION_STATUS_ARM = 2, 00666 XN_CALIBRATION_STATUS_LEG = 3, 00667 XN_CALIBRATION_STATUS_HEAD = 4, 00668 XN_CALIBRATION_STATUS_TORSO = 5, 00669 XN_CALIBRATION_STATUS_TOP_FOV = 6, 00670 XN_CALIBRATION_STATUS_SIDE_FOV = 7, 00671 XN_CALIBRATION_STATUS_POSE = 8, 00672 XN_CALIBRATION_STATUS_MANUAL_ABORT = 9, 00673 XN_CALIBRATION_STATUS_MANUAL_RESET = 10, 00674 XN_CALIBRATION_STATUS_TIMEOUT_FAIL = 11 00675 } XnCalibrationStatus; 00676 00677 typedef enum XnDirection 00678 { 00679 XN_DIRECTION_ILLEGAL = 0, 00680 XN_DIRECTION_LEFT = 1, 00681 XN_DIRECTION_RIGHT = 2, 00682 XN_DIRECTION_UP = 3, 00683 XN_DIRECTION_DOWN = 4, 00684 XN_DIRECTION_FORWARD = 5, 00685 XN_DIRECTION_BACKWARD = 6, 00686 } XnDirection; 00687 00688 // User 00696 typedef void (XN_CALLBACK_TYPE* XnUserHandler)(XnNodeHandle hNode, XnUserID user, void* pCookie); 00697 00698 // Hands 00708 typedef void (XN_CALLBACK_TYPE* XnHandCreate)(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie); 00709 00719 typedef void (XN_CALLBACK_TYPE* XnHandUpdate)(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie); 00720 00729 typedef void (XN_CALLBACK_TYPE* XnHandDestroy)(XnNodeHandle hNode, XnUserID user, XnFloat fTime, void* pCookie); 00730 00741 typedef void (XN_CALLBACK_TYPE* XnHandTouchingFOVEdge)(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, XnDirection eDir, void* pCookie); 00742 // Gesture Module 00752 typedef void (XN_CALLBACK_TYPE* XnGestureRecognized)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pIDPosition, const XnPoint3D* pEndPosition, void* pCookie); 00762 typedef void (XN_CALLBACK_TYPE* XnGestureProgress)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, XnFloat fProgress, void* pCookie); 00763 00764 typedef void (XN_CALLBACK_TYPE* XnGestureIntermediateStageCompleted)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie); 00765 typedef void (XN_CALLBACK_TYPE* XnGestureReadyForNextIntermediateStage)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie); 00766 00767 // Skeleton 00775 typedef void (XN_CALLBACK_TYPE* XnCalibrationStart)(XnNodeHandle hNode, XnUserID user, void* pCookie); 00784 typedef void (XN_CALLBACK_TYPE* XnCalibrationEnd)(XnNodeHandle hNode, XnUserID user, XnBool bSuccess, void* pCookie); 00785 00786 typedef void (XN_CALLBACK_TYPE* XnCalibrationInProgress)(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie); 00787 typedef void (XN_CALLBACK_TYPE* XnCalibrationComplete)(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie); 00788 00789 // Pose Detection 00798 typedef void (XN_CALLBACK_TYPE* XnPoseDetectionCallback)(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie); 00799 00800 typedef void (XN_CALLBACK_TYPE* XnPoseDetectionInProgress)(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, XnPoseDetectionStatus poseDetectionError, void* pCookie); 00801 00802 //--------------------------------------------------------------------------- 00803 // Recorder Types 00804 //--------------------------------------------------------------------------- 00805 00811 typedef enum XnRecordMedium 00812 { 00814 XN_RECORD_MEDIUM_FILE = 0, 00815 } XnRecordMedium; 00816 00818 typedef XnUInt32 XnCodecID; 00819 00821 #define XN_CODEC_ID(c1, c2, c3, c4) (XnCodecID)((c4 << 24) | (c3 << 16) | (c2 << 8) | c1) 00822 00828 typedef struct XnRecorderOutputStreamInterface 00829 { 00835 XnStatus (XN_CALLBACK_TYPE* Open)(void* pCookie); 00836 00845 XnStatus (XN_CALLBACK_TYPE* Write)(void* pCookie, const XnChar* strNodeName, 00846 const void* pData, XnUInt32 nSize); 00847 00855 XnStatus (XN_CALLBACK_TYPE* Seek)(void* pCookie, XnOSSeekType seekType, const XnInt32 nOffset); 00856 00865 XnUInt32 (XN_CALLBACK_TYPE* Tell)(void* pCookie); 00866 00872 void (XN_CALLBACK_TYPE* Close)(void* pCookie); 00873 00881 XnStatus (XN_CALLBACK_TYPE* Seek64)(void* pCookie, XnOSSeekType seekType, const XnInt64 nOffset); 00882 00891 XnUInt64 (XN_CALLBACK_TYPE* Tell64)(void* pCookie); 00892 00893 } XnRecorderOutputStreamInterface; 00894 00900 typedef struct XnPlayerInputStreamInterface 00901 { 00907 XnStatus (XN_CALLBACK_TYPE* Open)(void* pCookie); 00908 00918 XnStatus (XN_CALLBACK_TYPE* Read)(void* pCookie, void* pBuffer, XnUInt32 nSize, XnUInt32* pnBytesRead); 00919 00927 XnStatus (XN_CALLBACK_TYPE* Seek)(void* pCookie, XnOSSeekType seekType, const XnInt32 nOffset); 00928 00936 XnUInt32 (XN_CALLBACK_TYPE* Tell)(void* pCookie); 00937 00943 void (XN_CALLBACK_TYPE* Close)(void* pCookie); 00944 00952 XnStatus (XN_CALLBACK_TYPE* Seek64)(void* pCookie, XnOSSeekType seekType, const XnInt64 nOffset); 00953 00962 XnUInt64 (XN_CALLBACK_TYPE* Tell64)(void* pCookie); 00963 00964 } XnPlayerInputStreamInterface; 00965 00969 typedef struct XnNodeNotifications 00970 { 00977 XnStatus (XN_CALLBACK_TYPE* OnNodeAdded) 00978 (void* pCookie, const XnChar* strNodeName, XnProductionNodeType type, 00979 XnCodecID compression); 00980 00987 XnStatus (XN_CALLBACK_TYPE* OnNodeRemoved) 00988 (void* pCookie, const XnChar* strNodeName); 00989 00998 XnStatus (XN_CALLBACK_TYPE* OnNodeIntPropChanged) 00999 (void* pCookie, const XnChar* strNodeName, 01000 const XnChar* strPropName, XnUInt64 nValue); 01001 01010 XnStatus (XN_CALLBACK_TYPE* OnNodeRealPropChanged) 01011 (void* pCookie, const XnChar* strNodeName, 01012 const XnChar* strPropName, XnDouble dValue); 01013 01022 XnStatus (XN_CALLBACK_TYPE* OnNodeStringPropChanged) 01023 (void* pCookie, const XnChar* strNodeName, 01024 const XnChar* strPropName, const XnChar* strValue); 01025 01035 XnStatus (XN_CALLBACK_TYPE* OnNodeGeneralPropChanged) 01036 (void* pCookie, const XnChar* strNodeName, 01037 const XnChar* strPropName, XnUInt32 nBufferSize, const void* pBuffer); 01038 01045 XnStatus (XN_CALLBACK_TYPE* OnNodeStateReady) 01046 (void* pCookie, const XnChar* strNodeName); 01047 01057 XnStatus (XN_CALLBACK_TYPE* OnNodeNewData) 01058 (void* pCookie, const XnChar* strNodeName, 01059 XnUInt64 nTimeStamp, XnUInt32 nFrame, const void* pData, XnUInt32 nSize); 01060 01061 } XnNodeNotifications; 01062 01064 typedef struct XnUInt32XYPair 01065 { 01066 XnUInt32 X; 01067 XnUInt32 Y; 01068 } XnUInt32XYPair; 01069 01071 typedef struct XnOutputMetaData 01072 { 01074 XnUInt64 nTimestamp; 01075 01077 XnUInt32 nFrameID; 01078 01080 XnUInt32 nDataSize; 01081 01083 XnBool bIsNew; 01084 01085 } XnOutputMetaData; 01086 01088 typedef struct XnMapMetaData 01089 { 01091 XnOutputMetaData* pOutput; 01092 01094 XnUInt32XYPair Res; 01095 01097 XnUInt32XYPair Offset; 01098 01100 XnUInt32XYPair FullRes; 01101 01103 XnPixelFormat PixelFormat; 01104 01106 XnUInt32 nFPS; 01107 } XnMapMetaData; 01108 01110 typedef struct XnDepthMetaData 01111 { 01113 XnMapMetaData* pMap; 01114 01116 const XnDepthPixel* pData; 01117 01119 XnDepthPixel nZRes; 01120 } XnDepthMetaData; 01121 01123 typedef struct XnImageMetaData 01124 { 01126 XnMapMetaData* pMap; 01127 01129 const XnUInt8* pData; 01130 } XnImageMetaData; 01131 01133 typedef struct XnIRMetaData 01134 { 01136 XnMapMetaData* pMap; 01137 01139 const XnIRPixel* pData; 01140 } XnIRMetaData; 01141 01142 typedef struct XnAudioMetaData 01143 { 01145 XnOutputMetaData* pOutput; 01146 01148 XnWaveOutputMode Wave; 01149 01151 const XnUInt8* pData; 01152 } XnAudioMetaData; 01153 01154 typedef struct XnSceneMetaData 01155 { 01157 XnMapMetaData* pMap; 01158 01160 const XnLabel* pData; 01161 } XnSceneMetaData; 01162 01163 #if XN_PLATFORM != XN_PLATFORM_ARC 01164 #pragma pack (pop) 01165 #endif 01166 01167 #endif //__XN_TYPES_H__