OpenNI 1.3.2
|
00001 /**************************************************************************** 00002 * * 00003 * OpenNI 1.1 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 } XnPoseDetectionStatus; 00650 00652 typedef enum XnCalibrationStatus 00653 { 00654 XN_CALIBRATION_STATUS_OK = 0, 00655 XN_CALIBRATION_STATUS_NO_USER = 1, 00656 XN_CALIBRATION_STATUS_ARM = 2, 00657 XN_CALIBRATION_STATUS_LEG = 3, 00658 XN_CALIBRATION_STATUS_HEAD = 4, 00659 XN_CALIBRATION_STATUS_TORSO = 5, 00660 XN_CALIBRATION_STATUS_TOP_FOV = 6, 00661 XN_CALIBRATION_STATUS_SIDE_FOV = 7, 00662 XN_CALIBRATION_STATUS_POSE = 8, 00663 } XnCalibrationStatus; 00664 00665 typedef enum XnDirection 00666 { 00667 XN_DIRECTION_ILLEGAL = 0, 00668 XN_DIRECTION_LEFT = 1, 00669 XN_DIRECTION_RIGHT = 2, 00670 XN_DIRECTION_UP = 3, 00671 XN_DIRECTION_DOWN = 4, 00672 XN_DIRECTION_FORWARD = 5, 00673 XN_DIRECTION_BACKWARD = 6, 00674 } XnDirection; 00675 00676 // User 00684 typedef void (XN_CALLBACK_TYPE* XnUserHandler)(XnNodeHandle hNode, XnUserID user, void* pCookie); 00685 00686 // Hands 00696 typedef void (XN_CALLBACK_TYPE* XnHandCreate)(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie); 00697 00707 typedef void (XN_CALLBACK_TYPE* XnHandUpdate)(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, void* pCookie); 00708 00717 typedef void (XN_CALLBACK_TYPE* XnHandDestroy)(XnNodeHandle hNode, XnUserID user, XnFloat fTime, void* pCookie); 00718 00729 typedef void (XN_CALLBACK_TYPE* XnHandTouchingFOVEdge)(XnNodeHandle hNode, XnUserID user, const XnPoint3D* pPosition, XnFloat fTime, XnDirection eDir, void* pCookie); 00730 // Gesture Module 00740 typedef void (XN_CALLBACK_TYPE* XnGestureRecognized)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pIDPosition, const XnPoint3D* pEndPosition, void* pCookie); 00750 typedef void (XN_CALLBACK_TYPE* XnGestureProgress)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, XnFloat fProgress, void* pCookie); 00751 00752 typedef void (XN_CALLBACK_TYPE* XnGestureIntermediateStageCompleted)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie); 00753 typedef void (XN_CALLBACK_TYPE* XnGestureReadyForNextIntermediateStage)(XnNodeHandle hNode, const XnChar* strGesture, const XnPoint3D* pPosition, void* pCookie); 00754 00755 // Skeleton 00763 typedef void (XN_CALLBACK_TYPE* XnCalibrationStart)(XnNodeHandle hNode, XnUserID user, void* pCookie); 00772 typedef void (XN_CALLBACK_TYPE* XnCalibrationEnd)(XnNodeHandle hNode, XnUserID user, XnBool bSuccess, void* pCookie); 00773 00774 typedef void (XN_CALLBACK_TYPE* XnCalibrationInProgress)(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie); 00775 typedef void (XN_CALLBACK_TYPE* XnCalibrationComplete)(XnNodeHandle hNode, XnUserID user, XnCalibrationStatus calibrationError, void* pCookie); 00776 00777 // Pose Detection 00786 typedef void (XN_CALLBACK_TYPE* XnPoseDetectionCallback)(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, void* pCookie); 00787 00788 typedef void (XN_CALLBACK_TYPE* XnPoseDetectionInProgress)(XnNodeHandle hNode, const XnChar* strPose, XnUserID user, XnPoseDetectionStatus poseDetectionError, void* pCookie); 00789 00790 //--------------------------------------------------------------------------- 00791 // Recorder Types 00792 //--------------------------------------------------------------------------- 00793 00799 typedef enum XnRecordMedium 00800 { 00802 XN_RECORD_MEDIUM_FILE = 0, 00803 } XnRecordMedium; 00804 00806 typedef XnUInt32 XnCodecID; 00807 00809 #define XN_CODEC_ID(c1, c2, c3, c4) (XnCodecID)((c4 << 24) | (c3 << 16) | (c2 << 8) | c1) 00810 00816 typedef struct XnRecorderOutputStreamInterface 00817 { 00823 XnStatus (XN_CALLBACK_TYPE* Open)(void* pCookie); 00824 00833 XnStatus (XN_CALLBACK_TYPE* Write)(void* pCookie, const XnChar* strNodeName, 00834 const void* pData, XnUInt32 nSize); 00835 00843 XnStatus (XN_CALLBACK_TYPE* Seek)(void* pCookie, XnOSSeekType seekType, const XnUInt32 nOffset); 00844 00853 XnUInt32 (XN_CALLBACK_TYPE* Tell)(void* pCookie); 00854 00860 void (XN_CALLBACK_TYPE* Close)(void* pCookie); 00861 } XnRecorderOutputStreamInterface; 00862 00868 typedef struct XnPlayerInputStreamInterface 00869 { 00875 XnStatus (XN_CALLBACK_TYPE* Open)(void* pCookie); 00876 00886 XnStatus (XN_CALLBACK_TYPE* Read)(void* pCookie, void* pBuffer, XnUInt32 nSize, XnUInt32* pnBytesRead); 00887 00895 XnStatus (XN_CALLBACK_TYPE* Seek)(void* pCookie, XnOSSeekType seekType, const XnInt32 nOffset); 00896 00904 XnUInt32 (XN_CALLBACK_TYPE* Tell)(void* pCookie); 00905 00911 void (XN_CALLBACK_TYPE* Close)(void* pCookie); 00912 } XnPlayerInputStreamInterface; 00913 00917 typedef struct XnNodeNotifications 00918 { 00925 XnStatus (XN_CALLBACK_TYPE* OnNodeAdded) 00926 (void* pCookie, const XnChar* strNodeName, XnProductionNodeType type, 00927 XnCodecID compression); 00928 00935 XnStatus (XN_CALLBACK_TYPE* OnNodeRemoved) 00936 (void* pCookie, const XnChar* strNodeName); 00937 00946 XnStatus (XN_CALLBACK_TYPE* OnNodeIntPropChanged) 00947 (void* pCookie, const XnChar* strNodeName, 00948 const XnChar* strPropName, XnUInt64 nValue); 00949 00958 XnStatus (XN_CALLBACK_TYPE* OnNodeRealPropChanged) 00959 (void* pCookie, const XnChar* strNodeName, 00960 const XnChar* strPropName, XnDouble dValue); 00961 00970 XnStatus (XN_CALLBACK_TYPE* OnNodeStringPropChanged) 00971 (void* pCookie, const XnChar* strNodeName, 00972 const XnChar* strPropName, const XnChar* strValue); 00973 00983 XnStatus (XN_CALLBACK_TYPE* OnNodeGeneralPropChanged) 00984 (void* pCookie, const XnChar* strNodeName, 00985 const XnChar* strPropName, XnUInt32 nBufferSize, const void* pBuffer); 00986 00993 XnStatus (XN_CALLBACK_TYPE* OnNodeStateReady) 00994 (void* pCookie, const XnChar* strNodeName); 00995 01005 XnStatus (XN_CALLBACK_TYPE* OnNodeNewData) 01006 (void* pCookie, const XnChar* strNodeName, 01007 XnUInt64 nTimeStamp, XnUInt32 nFrame, const void* pData, XnUInt32 nSize); 01008 01009 } XnNodeNotifications; 01010 01012 typedef struct XnUInt32XYPair 01013 { 01014 XnUInt32 X; 01015 XnUInt32 Y; 01016 } XnUInt32XYPair; 01017 01019 typedef struct XnOutputMetaData 01020 { 01022 XnUInt64 nTimestamp; 01023 01025 XnUInt32 nFrameID; 01026 01028 XnUInt32 nDataSize; 01029 01031 XnBool bIsNew; 01032 01033 } XnOutputMetaData; 01034 01036 typedef struct XnMapMetaData 01037 { 01039 XnOutputMetaData* pOutput; 01040 01042 XnUInt32XYPair Res; 01043 01045 XnUInt32XYPair Offset; 01046 01048 XnUInt32XYPair FullRes; 01049 01051 XnPixelFormat PixelFormat; 01052 01054 XnUInt32 nFPS; 01055 } XnMapMetaData; 01056 01058 typedef struct XnDepthMetaData 01059 { 01061 XnMapMetaData* pMap; 01062 01064 const XnDepthPixel* pData; 01065 01067 XnDepthPixel nZRes; 01068 } XnDepthMetaData; 01069 01071 typedef struct XnImageMetaData 01072 { 01074 XnMapMetaData* pMap; 01075 01077 const XnUInt8* pData; 01078 } XnImageMetaData; 01079 01081 typedef struct XnIRMetaData 01082 { 01084 XnMapMetaData* pMap; 01085 01087 const XnIRPixel* pData; 01088 } XnIRMetaData; 01089 01090 typedef struct XnAudioMetaData 01091 { 01093 XnOutputMetaData* pOutput; 01094 01096 XnWaveOutputMode Wave; 01097 01099 const XnUInt8* pData; 01100 } XnAudioMetaData; 01101 01102 typedef struct XnSceneMetaData 01103 { 01105 XnMapMetaData* pMap; 01106 01108 const XnLabel* pData; 01109 } XnSceneMetaData; 01110 01111 #if XN_PLATFORM != XN_PLATFORM_ARC 01112 #pragma pack (pop) 01113 #endif 01114 01115 #endif //__XN_TYPES_H__