Skip to content
This repository
Browse code

Updated to version 1.5.2.23.

  • Loading branch information...
commit 15160748a400c6089e7732d805f74992331193fa 1 parent d07a88a
Ziv Hendel authored

Showing 447 changed files with 41,175 additions and 3,541 deletions. Show diff stats Hide diff stats

  1. +101 0 CHANGES
  2. +37 10 Data/SamplesConfig.xml
  3. BIN  Documentation/OpenNI.chm
  4. +6 2 Include/ARC/XnPlatformARC.h
  5. +19 12 Include/Linux-x86/XnPlatformLinux-x86.h
  6. +27 14 Include/Win32/XnPlatformWin32.h
  7. +5 5 Include/XnArray.h
  8. +15 0 Include/XnBitSet.h
  9. +71 1 Include/XnCppWrapper.h
  10. +3 0  Include/XnDataTypes.h
  11. +110 57 Include/XnDump.h
  12. +127 0 Include/XnDumpWriters.h
  13. +6 11 Include/XnEvent.h
  14. +322 70 Include/XnLog.h
  15. +12 12 Include/XnLogTypes.h
  16. +1 1  Include/XnLogWriterBase.h
  17. +10 0 Include/XnMacros.h
  18. +10 0 Include/XnModuleCFunctions.h
  19. +1 0  Include/XnModuleCppInterface.h
  20. +2 0  Include/XnModuleInterface.h
  21. +37 24 Include/XnOS.h
  22. +6 8 Include/XnOSCpp.h
  23. +1 1  Include/XnPlatform.h
  24. +43 0 Include/XnPrdNode.h
  25. +2 2 Include/XnStatus.h
  26. +1 9 Include/XnStringsHash.h
  27. +63 11 Include/XnTypes.h
  28. +3 3 Include/XnVersion.h
  29. +6 3 Platform/Android/Samples/SamplesAssistant/jni/Application.mk
  30. +0 2  Platform/Android/Samples/SamplesAssistant/jni/org_OpenNI_Samples_Assistant_NativeMethods.cpp
  31. +7 3 Platform/Android/Samples/SamplesAssistant/src/org/OpenNI/Samples/Assistant/OpenNIBaseActivity.java
  32. +259 246 Platform/Android/Samples/UserTracker/src/org/OpenNI/Samples/UserTracker/UserTracker.java
  33. +21 21 Platform/Android/Samples/UserTracker/src/org/OpenNI/Samples/UserTracker/UserTrackerActivity.java
  34. +7 3 Platform/Android/jni/Application.mk
  35. +1 1  Platform/Android/jni/OpenNI/Android.mk
  36. +18 0 Platform/Android/jni/Samples/NiSimpleSkeleton/Android.mk
  37. +0 154 Platform/Linux-Arm/Build/CommonMakefile
  38. +0 2  Platform/Linux-Arm/Build/MakeInstallBeagleboard
  39. +0 112 Platform/Linux-Arm/Build/Makefile
  40. +0 18 Platform/Linux-Arm/Build/Modules/nimCodecs/Makefile
  41. +0 14 Platform/Linux-Arm/Build/Modules/nimMockNodes/Makefile
  42. +0 17 Platform/Linux-Arm/Build/Modules/nimRecorder/Makefile
  43. +0 12 Platform/Linux-Arm/Build/OpenNI.vpw
  44. +0 21 Platform/Linux-Arm/Build/OpenNI/Makefile
  45. +0 12 Platform/Linux-Arm/Build/Samples/NiAudioSample/Makefile
  46. +0 12 Platform/Linux-Arm/Build/Samples/NiBackRecorder/Makefile
  47. +0 12 Platform/Linux-Arm/Build/Samples/NiCRead/Makefile
  48. +0 12 Platform/Linux-Arm/Build/Samples/NiConvertXToONI/Makefile
  49. +0 12 Platform/Linux-Arm/Build/Samples/NiRecordSynthetic/Makefile
  50. +0 12 Platform/Linux-Arm/Build/Samples/NiSampleModule/Makefile
  51. +0 12 Platform/Linux-Arm/Build/Samples/NiSimpleCreate/Makefile
  52. +0 12 Platform/Linux-Arm/Build/Samples/NiSimpleRead/Makefile
  53. +0 18 Platform/Linux-Arm/Build/Utils/niLicense/Makefile
  54. +0 18 Platform/Linux-Arm/Build/Utils/niReg/Makefile
  55. +0 54 Platform/Linux-Arm/CreateRedist/Output/BuildOpenNI.txt
  56. +0 8 Platform/Linux-Arm/CreateRedist/Output/BuildSmpRelease.txt
  57. +0 788 Platform/Linux-Arm/CreateRedist/Output/EngineDoxy.txt
  58. +0 16 Platform/Linux-Arm/CreateRedist/Output/Nightly.log
  59. +0 3  Platform/Linux-Arm/CreateRedist/RedistMaker
  60. +0 366 Platform/Linux-Arm/CreateRedist/Redist_OpenNi.py
  61. +0 110 Platform/Linux-Arm/CreateRedist/install.sh
  62. +0 40 Platform/Linux-x86/Build/Common/CommonDefs.mak
  63. +0 6 Platform/Linux-x86/Build/Common/Platform.Arm
  64. +0 3  Platform/Linux-x86/Build/Common/Platform.CE4100
  65. +0 27 Platform/Linux-x86/Build/Common/Platform.x86
  66. +0 1  Platform/Linux-x86/Build/Make.Arm
  67. +0 1  Platform/Linux-x86/Build/Make.CE4100
  68. +0 69 Platform/Linux-x86/Build/Modules/nimCodecs/nimCodecs.vpj
  69. +0 69 Platform/Linux-x86/Build/Modules/nimMockNodes/nimMockNodes.vpj
  70. +0 80 Platform/Linux-x86/Build/Modules/nimRecorder/nimRecorder.vpj
  71. +0 12 Platform/Linux-x86/Build/OpenNI.vpw
  72. +0 98 Platform/Linux-x86/Build/OpenNI/OpenNI.vpj
  73. BIN  Platform/Linux-x86/Build/Prerequisites/libusb-1.0.8.tar.bz2
  74. +0 28 Platform/Linux-x86/Build/Samples/NiUserTracker/Makefile
  75. +0 77 Platform/Linux-x86/Build/Utils/niReg/niReg.vpj
  76. +0 3  Platform/Linux-x86/CreateRedist/RedistMaker
  77. +0 1  Platform/Linux-x86/CreateRedist/RedistMaker.Arm
  78. +0 1  Platform/Linux-x86/CreateRedist/RedistMaker.CE4100
  79. 0  Platform/{Linux-x86 → Linux}/Build/Common/CommonCSMakefile
  80. +8 9 Platform/{Linux-x86 → Linux}/Build/Common/CommonCppMakefile
  81. +57 0 Platform/Linux/Build/Common/CommonDefs.mak
  82. 0  Platform/{Linux-x86 → Linux}/Build/Common/CommonJavaMakefile
  83. 0  Platform/{Linux-x86 → Linux}/Build/Common/CommonTargets.mak
  84. +12 0 Platform/Linux/Build/Common/Platform.Arm
  85. +5 0 Platform/Linux/Build/Common/Platform.x64
  86. +25 0 Platform/Linux/Build/Common/Platform.x86
  87. +4 0 Platform/Linux/Build/MakeCross.Arm
  88. +76 61 Platform/{Linux-x86 → Linux}/Build/Makefile
  89. 0  Platform/{Linux-x86 → Linux}/Build/Modules/nimCodecs/Makefile
  90. 0  Platform/{Linux-Arm → Linux}/Build/Modules/nimCodecs/nimCodecs.vpj
  91. 0  Platform/{Linux-x86 → Linux}/Build/Modules/nimMockNodes/Makefile
  92. 0  Platform/{Linux-Arm → Linux}/Build/Modules/nimMockNodes/nimMockNodes.vpj
  93. 0  Platform/{Linux-x86 → Linux}/Build/Modules/nimRecorder/Makefile
  94. 0  Platform/{Linux-Arm → Linux}/Build/Modules/nimRecorder/nimRecorder.vpj
  95. +1 1  Platform/{Linux-x86 → Linux}/Build/OpenNI/Makefile
  96. 0  Platform/{Linux-Arm → Linux}/Build/OpenNI/OpenNI.vpj
  97. 0  Platform/{Linux-x86 → Linux}/Build/Prerequisites/libusb-1.0.8-osx.tar.bz2
  98. 0  Platform/{Linux-Arm → Linux}/Build/Prerequisites/libusb-1.0.8.tar.bz2
  99. +2 2 Platform/{Linux-x86 → Linux}/Build/Res/AssemblyInfo-OpenNI.cs
  100. 0  Platform/{Linux-x86 → Linux}/Build/Res/mainicon.ico
  101. 0  Platform/{Linux-x86 → Linux}/Build/Samples/NiAudioSample/Makefile
  102. 0  Platform/{Linux-x86 → Linux}/Build/Samples/NiBackRecorder/Makefile
  103. 0  Platform/{Linux-x86 → Linux}/Build/Samples/NiCRead/Makefile
  104. 0  Platform/{Linux-x86 → Linux}/Build/Samples/NiConvertXToONI/Makefile
  105. +22 0 Platform/Linux/Build/Samples/NiHandTracker/Makefile
  106. 0  Platform/{Linux-x86 → Linux}/Build/Samples/NiRecordSynthetic/Makefile
  107. 0  Platform/{Linux-x86 → Linux}/Build/Samples/NiSampleModule/Makefile
  108. 0  Platform/{Linux-x86 → Linux}/Build/Samples/NiSimpleCreate/Makefile
  109. 0  Platform/{Linux-x86 → Linux}/Build/Samples/NiSimpleRead/Makefile
  110. 0  Platform/{Linux-Arm → Linux}/Build/Samples/NiSimpleRead/NiSimpleRead.vpj
  111. +11 0 Platform/Linux/Build/Samples/NiSimpleSkeleton/Makefile
  112. +1 1  ...ild/Samples/NiSimpleRead/NiSimpleRead.vpj → Linux/Build/Samples/NiSimpleSkeleton/NiSimpleSkeleton.vpj}
  113. 0  Platform/{Linux-x86 → Linux}/Build/Samples/NiSimpleViewer/Makefile
  114. +29 0 Platform/Linux/Build/Samples/NiUserSelection/Makefile
  115. +29 0 Platform/Linux/Build/Samples/NiUserTracker/Makefile
  116. 0  Platform/{Linux-x86 → Linux}/Build/Samples/NiViewer/Makefile
  117. 0  Platform/{Linux-x86 → Linux}/Build/Samples/NiViewer/NiViewer.vpj
  118. 0  Platform/{Linux-x86 → Linux}/Build/Samples/SimpleRead.java/Makefile
  119. 0  Platform/{Linux-x86 → Linux}/Build/Samples/SimpleRead.net/Makefile
  120. 0  Platform/{Linux-x86 → Linux}/Build/Samples/SimpleViewer.java/Makefile
  121. 0  Platform/{Linux-x86 → Linux}/Build/Samples/SimpleViewer.net/Makefile
  122. 0  Platform/{Linux-x86 → Linux}/Build/Samples/UserTracker.java/Makefile
  123. 0  Platform/{Linux-x86 → Linux}/Build/Samples/UserTracker.net/Makefile
  124. 0  Platform/{Linux-x86 → Linux}/Build/Utils/niLicense/Makefile
  125. 0  Platform/{Linux-x86 → Linux}/Build/Utils/niReg/Makefile
  126. 0  Platform/{Linux-Arm → Linux}/Build/Utils/niReg/niReg.vpj
  127. 0  Platform/{Linux-x86 → Linux}/Build/Wrappers/OpenNI.java/Makefile
  128. 0  Platform/{Linux-x86 → Linux}/Build/Wrappers/OpenNI.jni/Makefile
  129. 0  Platform/{Linux-x86 → Linux}/Build/Wrappers/OpenNI.net/Makefile
  130. 0  Platform/{Linux-x86 → Linux}/Build/Wrappers/OpenNI.net/OpenNI.snk
  131. +3 0  Platform/Linux/CreateRedist/RedistMaker
  132. +2 0  Platform/Linux/CreateRedist/RedistMaker.Arm
  133. +113 146 Platform/{Linux-x86 → Linux}/CreateRedist/Redist_OpenNi.py
  134. 0  Platform/{Linux-x86 → Linux}/CreateRedist/install.sh
  135. +5 5 Platform/Win32/Build/BuildJava.py
  136. +1,480 4 Platform/Win32/Build/Modules/nimCodecs/nimCodecs.vcproj
  137. +8 8 Platform/Win32/Build/Modules/nimMockNodes/nimMockNodes.vcproj
  138. +8 4 Platform/Win32/Build/Modules/nimRecorder/nimRecorder.vcproj
  139. +42 0 Platform/Win32/Build/OpenNI.sln
  140. +24 5 Platform/Win32/Build/OpenNI/OpenNI.vcproj
  141. +2 2 Platform/Win32/Build/Res/AssemblyInfo-OpenNI.cs
  142. +403 0 Platform/Win32/Build/Samples/NiHandTracker/NiHandTracker.vcproj
  143. +381 0 Platform/Win32/Build/Samples/NiSimpleSkeleton/NiSimpleSkeleton.vcproj
  144. +487 0 Platform/Win32/Build/Samples/NiUserSelection/NiUserSelection.vcproj
  145. +1 2  Platform/Win32/Build/Utils/OpenNIFilter/Setup.cpp
  146. +7 9 Platform/Win32/Build/Utils/OpenNIFilter/XnVideoSource.cpp
  147. +6 6 Platform/Win32/Build/Utils/OpenNIFilter/XnVideoSource.h
  148. +16 9 Platform/Win32/Build/Utils/OpenNIFilter/XnVideoStream.cpp
  149. +1 1  Platform/Win32/Build/Utils/OpenNIFilter/XnVideoStream.h
  150. +4 1 Platform/Win32/Build/Wrappers/OpenNI.net/OpenNI.net.csproj
  151. +1 1  Platform/Win32/CreateRedist/OpenNi_Config.xml
  152. +8 8 Platform/Win32/CreateRedist/RedistMaker.bat
  153. +91 70 Platform/Win32/CreateRedist/Redist_OpenNi.py
  154. +145 117 Platform/Win32/CreateRedist/UpdateVersion.py
  155. 0  Platform/Win32/CreateRedist/__init__.py
  156. +78 0 Platform/Win32/CreateRedist/common/CopyToRepository.py
  157. +38 39 Platform/Win32/CreateRedist/common/redist_base.py
  158. BIN  Platform/Win32/Driver/Bin/amd64/psdrv3.sys
  159. BIN  Platform/Win32/Driver/Bin/psdrv3.cat
  160. +4 1 Platform/Win32/Driver/Bin/psdrv3.inf
  161. BIN  Platform/Win32/Driver/Bin/x86/psdrv3.sys
  162. +2 2 Platform/Win32/Driver/Build/UpdateVersion.py
  163. +4 1 Platform/Win32/Driver/Build/inf/psdrv3.inf
  164. +2 2 Platform/Win32/Driver/Build/sys/PSDrvVersion.h
  165. BIN  Platform/Win32/Driver/PDBs/objfre_win7_amd64/amd64/psdrv3.pdb
  166. BIN  Platform/Win32/Driver/PDBs/objfre_win7_x86/i386/psdrv3.pdb
  167. +4 4 Platform/Win32/Install/OpenNI/Includes/OpenNIVariables.wxi
  168. +4 0 Platform/Win32/Install/OpenNI/OpenNI.wixproj
  169. +274 118 Platform/Win32/Install/OpenNI/OpenNI.wxs
  170. +6 0 Platform/Win32/Install/OpenNI/UI/CustomeInstallUI.wxs
  171. +33 9 README
  172. +4 6 Samples/NiBackRecorder/main.cpp
  173. +1 3 Samples/NiConvertXToONI/NiConvertXToONI.cpp
  174. +1,637 0 Samples/NiHandTracker/GL/gl.h
  175. +6,569 0 Samples/NiHandTracker/GL/glext.h
  176. +596 0 Samples/NiHandTracker/GL/glut.h
  177. +662 0 Samples/NiHandTracker/GL/wglext.h
  178. BIN  Samples/NiHandTracker/Libs/glut32.lib
  179. BIN  Samples/NiHandTracker/Libs/glut64.lib
  180. +226 0 Samples/NiHandTracker/NiHandTracker.cpp
  181. +77 0 Samples/NiHandTracker/NiHandTracker.h
  182. +144 0 Samples/NiHandTracker/NiHandViewer.cpp
  183. +48 0 Samples/NiHandTracker/NiHandViewer.h
  184. +369 0 Samples/NiHandTracker/NiSimpleViewer.cpp
  185. +85 0 Samples/NiHandTracker/NiSimpleViewer.h
  186. +160 0 Samples/NiHandTracker/NiTrailHistory.cpp
  187. +114 0 Samples/NiHandTracker/NiTrailHistory.h
  188. +274 0 Samples/NiHandTracker/glh/glh_array.h
  189. +209 0 Samples/NiHandTracker/glh/glh_convenience.h
  190. +347 0 Samples/NiHandTracker/glh/glh_cube_map.h
  191. +290 0 Samples/NiHandTracker/glh/glh_extensions.h
  192. +5,379 0 Samples/NiHandTracker/glh/glh_genext.h
  193. +861 0 Samples/NiHandTracker/glh/glh_glut.h
  194. +667 0 Samples/NiHandTracker/glh/glh_glut2.h
  195. +85 0 Samples/NiHandTracker/glh/glh_glut_callfunc.h
  196. +292 0 Samples/NiHandTracker/glh/glh_glut_replay.h
  197. +195 0 Samples/NiHandTracker/glh/glh_glut_text.h
  198. +213 0 Samples/NiHandTracker/glh/glh_interactors.h
  199. +1,617 0 Samples/NiHandTracker/glh/glh_linear.h
  200. +157 0 Samples/NiHandTracker/glh/glh_mipmaps.h
  201. +636 0 Samples/NiHandTracker/glh/glh_obs.h
  202. +197 0 Samples/NiHandTracker/glh/glh_text.h
  203. +78 0 Samples/NiHandTracker/main.cpp
  204. +0 3  Samples/NiRecordRaw/NiRecordRaw.cpp
  205. +0 5 Samples/NiRecordSynthetic/NiRecordSynthetic.cpp
  206. +1 0  Samples/NiSampleExtensionModule/RotatingDeviceExtension.h
  207. +239 0 Samples/NiSimpleSkeleton/NiSimpleSkeleton.cpp
  208. +12 1 Samples/NiUseExtension/NiUseExtension.cpp
  209. +243 0 Samples/NiUserSelection/ClosestUserSelector.cpp
  210. +99 0 Samples/NiUserSelection/ClosestUserSelector.h
  211. +171 0 Samples/NiUserSelection/DefaultTrackingInitializer.cpp
  212. +98 0 Samples/NiUserSelection/DefaultTrackingInitializer.h
  213. +199 0 Samples/NiUserSelection/Documentation.h
  214. +151 0 Samples/NiUserSelection/ExitPoseDetector.cpp
  215. +106 0 Samples/NiUserSelection/ExitPoseDetector.h
  216. +1,637 0 Samples/NiUserSelection/GL/gl.h
  217. +6,569 0 Samples/NiUserSelection/GL/glext.h
  218. +596 0 Samples/NiUserSelection/GL/glut.h
  219. +662 0 Samples/NiUserSelection/GL/wglext.h
  220. +239 0 Samples/NiUserSelection/GLES/egl.h
  221. +229 0 Samples/NiUserSelection/GLES/egl_1_0.h
  222. +55 0 Samples/NiUserSelection/GLES/egltypes.h
  223. +851 0 Samples/NiUserSelection/GLES/gl.h
  224. +584 0 Samples/NiUserSelection/GLES/gl_1_0.h
  225. BIN  Samples/NiUserSelection/Libs/glut32.lib
  226. BIN  Samples/NiUserSelection/Libs/glut64.lib
  227. +181 0 Samples/NiUserSelection/PoseToggleUserSelector.cpp
  228. +96 0 Samples/NiUserSelection/PoseToggleUserSelector.h
  229. +197 0 Samples/NiUserSelection/PoseUserSelector.cpp
  230. +101 0 Samples/NiUserSelection/PoseUserSelector.h
  231. +214 0 Samples/NiUserSelection/SampleManager.cpp
  232. +127 0 Samples/NiUserSelection/SampleManager.h
Sorry, we could not display the entire diff because too many files (447) changed.
101 CHANGES
... ... @@ -1,6 +1,107 @@
1 1 Detailed Change log:
2 2 --------------------
3 3
  4 +Version 1.5.2.23 (Stable version - Dec 28th 2011)
  5 +-------------------------------------------------
  6 + * C++: IRMetaData didn't have operator() and operator[], which is inconsistent with depth and scene.
  7 + * Fixed some memory deallocation mismatches.
  8 + * Remove redundant USB warning message on Linux (this is normal behavior).
  9 + * Java wrappers: adding getDataPtr(), createDataByteBuffer() and copyDataToBuffer() to Generator class.
  10 + * NiViewer: did not check if StartGenerating was successful.
  11 +
  12 +Version 1.5.2.7 (Unstable version - Dec 18th 2011)
  13 +--------------------------------------------------
  14 + * Java UserTracker sample will now draw the limbs only when both joints have a non-zero confidence.
  15 + * .NET samples will now show their source files in the visual studio project.
  16 + * NiUserSelection - Enhanced the documentation.
  17 + * PoseDetectionCapability::StopPoseDetection will now return proper errors.
  18 + * .Net Wrappers: Disposing a device node now also destroys the node.
  19 + * xnNodeInfoGetTreeStringRepresentation was added to all wrappers.
  20 + * Linux: keep ref count for the libusb events thread, so it will be shutdown automatically when all read threads have stopped.
  21 + * Added option to show low confidence limbs as dotted lines in the user selection sample.
  22 + * Recordings playbacks: make sure seek is also performed in a lock, so it wouldn't collide with the reader thread.
  23 + * Bug Fix: The samples cannot be copied to another folder and be compiled.
  24 + * Data Dump: Adding frame sync information checks.
  25 + * NiUseExtension sample: added a clear message about the need to register the extension module.
  26 + * .Net Wrappers: Added the DataPtr property to Generator class.
  27 + * .Net wrappers: Fixed a bug where MapGenerator.BytesPerPixel was missing.
  28 + * .Net Wrappers: FindExistingNode now returns null instead of throwing an exception if no node exists.
  29 + * Java Wrappers: StartPoseDetection and StopPoseDetection are declared deprecated, and were replaced by startPoseDetection and stopPoseDetection.
  30 + * Linux: Cross compilation is now based on environment variables.
  31 + * .Net Wrappers: Projective/RealWorld conversion - added a version which accepts a preallocated array.
  32 + * USB Driver version was updated to 3.1.3.1.
  33 + * NiBackRecorder: removed unneeded calls to Release().
  34 + * NiConvertXToONI: removed unused seekNode.
  35 + * Android: makefiles are now compatible to ndk v7.
  36 + * .Net Wrapper: Added the missing DeviceIdentificationCapability class.
  37 + * New API: xnStopSinglePoseDetection.
  38 + * Bug Fix: Seeking before the first WaitXUpdateAll() caused undetermined behavior.
  39 + * Android: Added the NiSimpleSkeleton sample.
  40 + * Java Wrappers: Added missing enum values.
  41 + * .NET Wrappers: Added missing enum values.
  42 + * Android UserTracker sample: Adjusted to work without a calibration pose.
  43 + * USB Driver: adding support for PrimeSense's 0601 product ID.
  44 + * Log: initializing from INI file would reset the output directory.
  45 + * Bug fix: Seeking to the current frame did no re-read it, while seeking to another frame did read it. This caused a bug where seeking to the same frame twice would cause it to return twice.
  46 +
  47 +Version 1.4.0.2 (Unstable version - Nov 17th 2011)
  48 +--------------------------------------------------
  49 + * Linux bug fix: The USB read thread was using memcpy with overlapping source and dest addresses which caused newer libc libraries to fail. The solution is to use memmove.
  50 + * Log: fix BC methods behavior to be backwards-compatible to old one.
  51 + * Added GetNumberOfAvailableGestures() method to GestureGenerator.
  52 + * .NET BugFix: GetPoseStatus() did not work.
  53 + * JNI: fix a typo that prevents creating joint orientations.
  54 + * NiUserSelection: Update to support N closest users and N waves.
  55 + * Fixed python scripts to also support python 3.
  56 + * Java Wrapper: Added a new method copyToBuffer for copying data to a preallocated buffer to improve performance (community request).
  57 + * Mac: Fixed a bug in the linux set thread priority where the struct wasn't zero'd before usage (caused warning on mac osx).
  58 + * Linux redist bug: .net wrappers were skipped on 64-bit machines by mistake.
  59 + * Windows Bug Fix: shared memory was always created under the Global namespace (Failed to work with UAC turned on).
  60 + * Added APIs xnIsPoseSupported, xnGetPoseStatus, through PoseDetectionCapability.
  61 + * Java Wrappers: added createByteBuffer() to AudioMetaData to access data.
  62 + * NiRecordRaw: Removed duplicate call to GetProductionNodeByName.
  63 + * Added NiHandTracker C++ sample.
  64 + * Added NO_TRACKING to the list of pose detection statuses.
  65 + * Added NiSimpleSkeleton sample which shows the head movement of skeleton with no graphics.
  66 + * Added NiUserSelection sample which shows the exit pose (cross hands) and user selection.
  67 + * Added a new dump, "OpenNIDataFlow", to track data frames.
  68 + * WaitNoneUpdateAll now doesn't actually read from file (might cause some sleeping), but only triggers another thread to read in the background.
  69 +
  70 +Version 1.3.4.6 (Unstable version - Nov 7th 2011)
  71 +-------------------------------------------------
  72 + * In MockGenerator::SetData, change the node to Generating state so it would be recorded properly.
  73 + * Added new calibration error messages to the XnCalibrationStatus enum.
  74 + * XnArray: Allow passing base size in the ctor (to save double allocation).
  75 + * NiViewer: Removed an unnecessary line from file dialog init
  76 + * Bug fix: When recording from mock node, the first frame is no longer lost.
  77 + * XnOS: Added the option to create named objects in a way that will be accessible to other sessions.
  78 + * Renamed Linux-x86* files to Linux*
  79 + * Linux Bug Fix: xnOSSeekFile64 did not return OK. This caused problems in playback and recording of ONI files.
  80 + * Added some error log prints to the codecs and players.
  81 + * C# wrappers: fixed the marshaling of license struct.
  82 + * Added the function SetDataBytes to XnBitSet so it now accepts a byte buffer of any size. Note: byte order is different when reading from byte array or dword array in little endian platforms.
  83 + * C# wrappers: fixed a bug related to ProductionNodeDescription. Might break API, but this API would usually crash, so its OK.
  84 + * Linux: Switched to newer makefiles. SSE is enabled in debug, always declare sysroot (even for /) so that -I=/usr/include/ni could work properly.
  85 + * Linux: fix cross compilation and add separate scripts to cross compile on specific machine. Also, binary folders are now named according to platform and configuration.
  86 + * Documentation: Added a section about creating modules.
  87 + * Backwards Compatibility Workaround: some old recordings marked nodes as not generating though they contained frames. This resulted in "node is locked" error if trying to start generating them.
  88 +
  89 +Version 1.3.4.3 (Unstable version - Oct 10th 2011)
  90 +--------------------------------------------------
  91 + * Update to newer version of CommonCppMakefile (without the -malign-double flag).
  92 + * Changed dump API to use void pointer instead of char pointer
  93 + * Added xnOSDeleteEmptyDirectory and xnOSDeleteDirectoryTree methods.
  94 + * Adding ScriptNode.Create() to C++ wrappers.
  95 + * Dumps: New, cleaner interface.
  96 + * Dumps: Adding dump writers mechanisms, so one can implement a new writer, other than files.
  97 + * Recordings: Support files bigger than 2 GB.
  98 + * Samples: default SamplesConfig is now better documented. Global mirror is turned on, instead of every generator.
  99 + * Java Wrappers: some methods were private by mistake.
  100 + * Samples Bug Fix: trying to create the rotating device extension would cause a crash if extension sample is not registered with OpenNI.
  101 + * Bug Fix: StartGenerating would fail on locked nodes even if node is already generating (this caused a bug where declaring a node in the XML which already existed in the recording would fail).
  102 + * Logs: New, better performance API.
  103 + * XnPlatform min/max values were wrong.
  104 +
4 105 Version 1.3.3.6 (Stable version - Sep 18th 2011)
5 106 ------------------------------------------------
6 107 * Fixed memory leak in Queue and ThreadSafeQueue.
47 Data/SamplesConfig.xml
... ... @@ -1,6 +1,6 @@
1 1 <OpenNI>
2 2 <Licenses>
3   - <!-- Add licenses here
  3 + <!-- Add application-specific licenses here
4 4 <License vendor="vendor" key="key"/>
5 5 -->
6 6 </Licenses>
@@ -14,18 +14,45 @@
14 14 </Dumps>
15 15 </Log>
16 16 <ProductionNodes>
17   - <Node type="Depth" name="Depth1">
18   - <Configuration>
19   - <Mirror on="true"/>
20   - </Configuration>
21   - </Node>
22   - <Node type="Image" name="Image1" stopOnError="false">
  17 + <!-- Uncomment following line, in order to run from a recording
  18 + <Recording file="sampleRec.oni" />
  19 + -->
  20 +
  21 + <!-- Set global mirror -->
  22 + <GlobalMirror on="true"/>
  23 +
  24 + <!-- Create a depth node and give it a name alias (useful if referenced ahead in this script) -->
  25 + <Node type="Depth" name="MyDepth">
  26 + <Query>
  27 + <!-- Uncomment to filter by vendor name, product name, etc.
  28 + <Vendor>MyVendor inc.</Vendor>
  29 + <Name>MyProduct</Name>
  30 + <MinVersion>1.2.3.4</MinVersion>
  31 + <Capabilities>
  32 + <Capability>Cropping</Capability>
  33 + </Capabilities>
  34 + -->
  35 + </Query>
23 36 <Configuration>
24   - <Mirror on="true"/>
  37 + <!-- Uncomment to set requested mode
  38 + <MapOutputMode xRes="640" yRes="480" FPS="30"/>
  39 + -->
  40 +
  41 + <!-- Uncomment to override global mirror
  42 + <Mirror on="false" />
  43 + -->
25 44 </Configuration>
26 45 </Node>
27   - <!--
28   - <Node type="Audio" name="Audio1"/>
  46 +
  47 + <!-- Create an image node. If it fails, continue anyway. -->
  48 + <Node type="Image" stopOnError="false" />
  49 +
  50 + <!-- Uncomment nodes from here if you need them.
  51 + <Node type="Audio" />
  52 + <Node type="User" />
  53 + <Node type="Hands" />
  54 + <Node type="Gesture" />
  55 + <Node type="Scene" />
29 56 -->
30 57 </ProductionNodes>
31 58 </OpenNI>
BIN  Documentation/OpenNI.chm
Binary file not shown
0  Documentation/OpenNI.chm
Sorry, we could not display the changes to this file because there were too many other changes to display.
8 Include/ARC/XnPlatformARC.h
@@ -177,10 +177,14 @@ typedef size_t XnSizeT;
177 177 /** Indicates a deprecated function */
178 178 #define XN_API_DEPRECATED(msg)
179 179
  180 +#define XN_DEPRECATED_WARNING_IDS
  181 +#define XN_HIDES_PARENT_METHOD_WARNING_ID
  182 +#define XN_CONDITION_IS_CONST_WARNING_ID
  183 +#define XN_PRAGMA_START_DISABLED_WARNING_SECTION(warnings)
  184 +#define XN_PRAGMA_STOP_DISABLED_WARNING_SECTION
  185 +
180 186 /** Declares a global shared library export function. */
181 187 #define XN_API_EXPORT_INIT()
182 188
183   -#define XN_DEPRECATED_WARNING_IDS 1
184   -
185 189 #endif //_XN_PLATFORM_ARC_H_
186 190
31 Include/Linux-x86/XnPlatformLinux-x86.h
@@ -34,6 +34,7 @@
34 34 #include <stdio.h>
35 35 #include <string.h>
36 36 #include <assert.h>
  37 +#include <limits.h>
37 38
38 39 //---------------------------------------------------------------------------
39 40 // Platform Basic Definition
@@ -99,31 +100,31 @@ typedef void (*XnFarProc)(void *);
99 100 typedef size_t XnSizeT;
100 101
101 102 /** Max unsigned 8-bit value */
102   -#define XN_MAX_UINT8 255
  103 +#define XN_MAX_UINT8 UCHAR_MAX
103 104 /** Max unsigned 16-bit value */
104   -#define XN_MAX_UINT16 65535
  105 +#define XN_MAX_UINT16 USHRT_MAX
105 106 /** Max unsigned 32-bit value */
106   -#define XN_MAX_UINT32 4294967295UL
  107 +#define XN_MAX_UINT32 UINT_MAX
107 108 /** Max unsigned 64-bit value */
108   -#define XN_MAX_UINT64 18446744073709551615ULL
  109 +#define XN_MAX_UINT64 ULLONG_MAX
109 110
110 111 /** Min signed 8-bit value */
111   -#define XN_MIN_INT8 -128
  112 +#define XN_MIN_INT8 SCHAR_MIN
112 113 /** Min signed 16-bit value */
113   -#define XN_MIN_INT16 -32768
  114 +#define XN_MIN_INT16 SHRT_MIN
114 115 /** Min signed 32-bit value */
115   -#define XN_MIN_INT32 -2147483648
  116 +#define XN_MIN_INT32 INT_MIN
116 117 /** Min signed 64-bit value */
117   -#define XN_MIN_INT64 -9223372036854775808LL
  118 +#define XN_MIN_INT64 LLONG_MIN
118 119
119 120 /** Max signed 8-bit value */
120   -#define XN_MAX_INT8 127
  121 +#define XN_MAX_INT8 SCHAR_MAX
121 122 /** Max signed 16-bit value */
122   -#define XN_MAX_INT16 32767
  123 +#define XN_MAX_INT16 SHRT_MAX
123 124 /** Max signed 32-bit value */
124   -#define XN_MAX_INT32 2147483647
  125 +#define XN_MAX_INT32 INT_MAX
125 126 /** Max signed 64-bit value */
126   -#define XN_MAX_INT64 9223372036854775807LL
  127 +#define XN_MAX_INT64 LLONG_MAX
127 128
128 129 //---------------------------------------------------------------------------
129 130 // Memory
@@ -177,6 +178,12 @@ typedef size_t XnSizeT;
177 178 /** Indicates a deprecated function */
178 179 #define XN_API_DEPRECATED(msg) __attribute__((warning("This function is deprecated: " msg)))
179 180
  181 +#define XN_DEPRECATED_WARNING_IDS
  182 +#define XN_HIDES_PARENT_METHOD_WARNING_ID
  183 +#define XN_CONDITION_IS_CONST_WARNING_ID
  184 +#define XN_PRAGMA_START_DISABLED_WARNING_SECTION(warnings)
  185 +#define XN_PRAGMA_STOP_DISABLED_WARNING_SECTION
  186 +
180 187 /** Declares a global shared library export function. */
181 188 #define XN_API_EXPORT_INIT()
182 189
41 Include/Win32/XnPlatformWin32.h
@@ -127,31 +127,31 @@ typedef FARPROC XnFarProc;
127 127 typedef size_t XnSizeT;
128 128
129 129 /** Max unsigned 8-bit value */
130   -#define XN_MAX_UINT8 255
  130 +#define XN_MAX_UINT8 _UI8_MAX
131 131 /** Max unsigned 16-bit value */
132   -#define XN_MAX_UINT16 65535
  132 +#define XN_MAX_UINT16 _UI16_MAX
133 133 /** Max unsigned 32-bit value */
134   -#define XN_MAX_UINT32 4294967295
  134 +#define XN_MAX_UINT32 _UI32_MAX
135 135 /** Max unsigned 64-bit value */
136   -#define XN_MAX_UINT64 18446744073709551615
  136 +#define XN_MAX_UINT64 _UI64_MAX
137 137
138 138 /** Min signed 8-bit value */
139   -#define XN_MIN_INT8 -127
  139 +#define XN_MIN_INT8 _I8_MIN
140 140 /** Min signed 16-bit value */
141   -#define XN_MIN_INT16 -32767
  141 +#define XN_MIN_INT16 _I16_MIN
142 142 /** Min signed 32-bit value */
143   -#define XN_MIN_INT32 -2147483647
  143 +#define XN_MIN_INT32 _I32_MIN
144 144 /** Min signed 64-bit value */
145   -#define XN_MIN_INT64 -9223372036854775807
  145 +#define XN_MIN_INT64 _I64_MIN
146 146
147 147 /** Max signed 8-bit value */
148   -#define XN_MAX_INT8 127
  148 +#define XN_MAX_INT8 _I8_MAX
149 149 /** Max signed 16-bit value */
150   -#define XN_MAX_INT16 32767
  150 +#define XN_MAX_INT16 _I16_MAX
151 151 /** Max signed 32-bit value */
152   -#define XN_MAX_INT32 2147483647
  152 +#define XN_MAX_INT32 _I32_MAX
153 153 /** Max signed 64-bit value */
154   -#define XN_MAX_INT64 9223372036854775807
  154 +#define XN_MAX_INT64 _I64_MAX
155 155
156 156 /** Min double value */
157 157 #define XN_MIN_DOUBLE DBL_MIN
@@ -215,11 +215,24 @@ typedef size_t XnSizeT;
215 215 #endif
216 216
217 217 #ifdef __INTEL_COMPILER
218   - #define XN_DEPRECATED_WARNING_IDS 1786
  218 + #define XN_DEPRECATED_WARNING_IDS 1786
  219 + #define XN_HIDES_PARENT_METHOD_WARNING_ID 1125
  220 + #define XN_CONDITION_IS_CONST_WARNING_ID
219 221 #else
220   - #define XN_DEPRECATED_WARNING_IDS 4995 4996
  222 + #define XN_DEPRECATED_WARNING_IDS 4995 4996
  223 + #define XN_HIDES_PARENT_METHOD_WARNING_ID
  224 + #define XN_CONDITION_IS_CONST_WARNING_ID 4127
221 225 #endif
222 226
  227 +#define XN_PRAGMA_START_DISABLED_WARNING_SECTION(warnings) \
  228 + __pragma(warning(push)) \
  229 + __pragma(warning(disable:XN_HIDES_PARENT_METHOD_WARNING_ID))
  230 +
  231 +#define XN_PRAGMA_STOP_DISABLED_WARNING_SECTION \
  232 + __pragma(warning(pop))
  233 +
  234 +
  235 +
223 236 /** Declares a global shared library export function. */
224 237 #define XN_API_EXPORT_INIT() \
225 238 BOOL APIENTRY DllMain (HMODULE /*hModule*/, DWORD nReasonForCall, LPVOID /*lpReserved*/) \
10 Include/XnArray.h
@@ -43,9 +43,9 @@ class XnArray
43 43 typedef const T* ConstIterator;
44 44
45 45 /** Default constructor. Initializes the array to BASE_SIZE. **/
46   - XnArray()
  46 + XnArray(XnUInt32 nBaseSize = BASE_SIZE)
47 47 {
48   - Init();
  48 + Init(nBaseSize);
49 49 }
50 50
51 51 /** Copy constructor. Initializes this array from another array of the same type. **/
@@ -298,10 +298,10 @@ class XnArray
298 298 }
299 299
300 300 private:
301   - void Init()
  301 + void Init(XnUInt32 nBaseSize = BASE_SIZE)
302 302 {
303   - m_pData = XN_NEW_ARR(T, BASE_SIZE);
304   - m_nAllocatedSize = BASE_SIZE;
  303 + m_pData = XN_NEW_ARR(T, nBaseSize);
  304 + m_nAllocatedSize = nBaseSize;
305 305 m_nSize = 0;
306 306 }
307 307
15 Include/XnBitSet.h
@@ -75,6 +75,21 @@ class XnBitSet
75 75 return XN_STATUS_OK;
76 76 }
77 77
  78 + /** Copies raw data from a buffer of bytes to this bitset. **/
  79 + XnStatus SetDataBytes(const XnUInt8* pData, XnUInt32 nSizeInBytes)
  80 + {
  81 + //XnStatus nRetVal = m_array.SetData(reinterpret_cast<const XnUInt32*>(pData), XN_MAX(1, nSizeInBytes >> 2));
  82 + XnUInt32 nSizeInDwords = XN_MAX(1, nSizeInBytes >> 2);
  83 + XnStatus nRetVal = m_array.SetSize(nSizeInDwords);
  84 + XN_IS_STATUS_OK(nRetVal);
  85 + for (XnUInt32 nDwordIdx = 0, nByteIdx = 0; nDwordIdx < nSizeInDwords; nDwordIdx++, nByteIdx += 4)
  86 + {
  87 + m_array[nDwordIdx] = ((pData[nByteIdx] << 24) | (pData[nByteIdx + 1] << 16) | (pData[nByteIdx + 2] << 8) | pData[nByteIdx + 3] );
  88 + }
  89 + m_nSize = (nSizeInBytes << 3);
  90 + return XN_STATUS_OK;
  91 + }
  92 +
78 93 /** @returns The raw data of this bitset as a buffer of dwords. **/
79 94 const XnUInt32* GetData() const
80 95 {
72 Include/XnCppWrapper.h
@@ -810,6 +810,29 @@ namespace xn
810 810 /// @copydoc OutputMetaData::WritableData
811 811 inline XnIRPixel* WritableData() { return (XnIRPixel*)MapMetaData::WritableData(); }
812 812
  813 + /**
  814 + * Gets the value of the pixel
  815 + *
  816 + * @param nIndex [in] The index of the pixel in the buffer.
  817 + */
  818 + inline const XnIRPixel& operator[](XnUInt32 nIndex) const
  819 + {
  820 + XN_ASSERT(nIndex < (XRes()*YRes()));
  821 + return Data()[nIndex];
  822 + }
  823 +
  824 + /**
  825 + * Gets the value of the pixel
  826 + *
  827 + * @param x [in] X-coordinate of the pixel in the map
  828 + * @param y [in] Y-coordinate of the pixel in the map
  829 + */
  830 + inline const XnIRPixel& operator()(XnUInt32 x, XnUInt32 y) const
  831 + {
  832 + XN_ASSERT(x < XRes() && y < YRes());
  833 + return Data()[y*XRes() + x];
  834 + }
  835 +
813 836 /// Gets a light object wrapping the IR map
814 837 inline const xn::IRMap& IRMap() const { return m_irMap; }
815 838 /// Gets a light object wrapping the writable IR map
@@ -1206,7 +1229,8 @@ namespace xn
1206 1229
1207 1230 /** @copybrief xnNodeInfoGetCreationInfo
1208 1231 * For full details and usage, see @ref xnNodeInfoGetCreationInfo
1209   - */ inline const XnChar* GetCreationInfo() const
  1232 + */
  1233 + inline const XnChar* GetCreationInfo() const
1210 1234 {
1211 1235 return xnNodeInfoGetCreationInfo(m_pInfo);
1212 1236 }
@@ -1233,6 +1257,14 @@ namespace xn
1233 1257 return xnNodeInfoGetAdditionalData(m_pInfo);
1234 1258 }
1235 1259
  1260 + /** @copybrief xnNodeInfoGetTreeStringRepresentation
  1261 + * For full details and usage, see @ref xnNodeInfoGetTreeStringRepresentation
  1262 + */
  1263 + inline XnStatus GetTreeStringRepresentation(XnChar* csResultBuffer, XnUInt32 nBufferSize) const
  1264 + {
  1265 + return xnNodeInfoGetTreeStringRepresentation(m_pInfo, csResultBuffer, nBufferSize);
  1266 + }
  1267 +
1236 1268 private:
1237 1269 inline void SetUnderlyingObject(XnNodeInfo* pInfo);
1238 1270
@@ -3469,6 +3501,15 @@ namespace xn
3469 3501 {
3470 3502 return xnEnumerateGestures(GetHandle(), &astrGestures, &nGestures);
3471 3503 }
  3504 +
  3505 + /** @copybrief xnGetNumberOfAvailableGestures
  3506 + * For full details and usage, see @ref xnGetNumberOfAvailableGestures
  3507 + */
  3508 + inline XnUInt16 GetNumberOfAvailableGestures() const
  3509 + {
  3510 + return xnGetNumberOfAvailableGestures(GetHandle());
  3511 + }
  3512 +
3472 3513 /** @copybrief xnEnumerateAllGestures
3473 3514 * For full details and usage, see @ref xnEnumerateAllGestures
3474 3515 */
@@ -4568,6 +4609,16 @@ namespace xn
4568 4609 return xnGetAllAvailablePoses(GetHandle(), pstrPoses, nNameLength, &nPoses);
4569 4610 }
4570 4611
  4612 + inline XnBool IsPoseSupported(const XnChar* strPose)
  4613 + {
  4614 + return xnIsPoseSupported(GetHandle(), strPose);
  4615 + }
  4616 +
  4617 + inline XnStatus GetPoseStatus(XnUserID userID, const XnChar* poseName, XnUInt64& poseTime, XnPoseDetectionStatus& eStatus, XnPoseDetectionState& eState)
  4618 + {
  4619 + return xnGetPoseStatus(GetHandle(), userID, poseName, &poseTime, &eStatus, &eState);
  4620 + }
  4621 +
4571 4622 /** @copybrief xnStartPoseDetection
4572 4623 * For full details and usage, see @ref xnStartPoseDetection
4573 4624 */
@@ -4584,6 +4635,14 @@ namespace xn
4584 4635 return xnStopPoseDetection(GetHandle(), user);
4585 4636 }
4586 4637
  4638 + /** @copybrief xnStopSinglePoseDetection
  4639 + * For full details and usage, see @ref xnStopSinglePoseDetection
  4640 + */
  4641 + inline XnStatus StopSinglePoseDetection(XnUserID user, const XnChar* strPose)
  4642 + {
  4643 + return xnStopSinglePoseDetection(GetHandle(), user, strPose);
  4644 + }
  4645 +
4587 4646 /** @copybrief xnRegisterToPoseCallbacks
4588 4647 * For full details and usage, see @ref xnRegisterToPoseCallbacks
4589 4648 */
@@ -5256,6 +5315,8 @@ namespace xn
5256 5315 inline ScriptNode(XnNodeHandle hNode = NULL) : ProductionNode(hNode) {}
5257 5316 inline ScriptNode(const NodeWrapper& other) : ProductionNode(other) {}
5258 5317
  5318 + inline XnStatus Create(Context& context, const XnChar* strFormat);
  5319 +
5259 5320 inline const XnChar* GetSupportedFormat()
5260 5321 {
5261 5322 return xnScriptNodeGetSupportedFormat(GetHandle());
@@ -6319,6 +6380,15 @@ namespace xn
6319 6380 return xnScriptNodeRun(GetHandle(), pErrors == NULL ? NULL : pErrors->GetUnderlying());
6320 6381 }
6321 6382
  6383 + inline XnStatus ScriptNode::Create(Context& context, const XnChar* strFormat)
  6384 + {
  6385 + XnNodeHandle hNode;
  6386 + XnStatus nRetVal = xnCreateScriptNode(context.GetUnderlyingObject(), strFormat, &hNode);
  6387 + XN_IS_STATUS_OK(nRetVal);
  6388 + TakeOwnership(hNode);
  6389 + return (XN_STATUS_OK);
  6390 + }
  6391 +
6322 6392 //---------------------------------------------------------------------------
6323 6393 // Global Helper Functions
6324 6394 //---------------------------------------------------------------------------
3  Include/XnDataTypes.h
@@ -43,6 +43,8 @@ typedef void* XnValue;
43 43 class decl ClassName \
44 44 { \
45 45 public: \
  46 + XN_PRAGMA_START_DISABLED_WARNING_SECTION(XN_CONDITION_IS_CONST_WARNING_ID) \
  47 + \
46 48 static XnValue CreateValueCopy(Type const& orig) \
47 49 { \
48 50 if (sizeof(Type) > sizeof(XnValue)) \
@@ -104,6 +106,7 @@ typedef void* XnValue;
104 106 return *p; \
105 107 } \
106 108 } \
  109 + XN_PRAGMA_STOP_DISABLED_WARNING_SECTION \
107 110 };
108 111
109 112 /**
167 Include/XnDump.h
@@ -25,17 +25,14 @@
25 25 //---------------------------------------------------------------------------
26 26 // Includes
27 27 //---------------------------------------------------------------------------
28   -#include "XnOS.h"
  28 +#include "XnPlatform.h"
  29 +#include "XnStatus.h"
29 30
30 31 //---------------------------------------------------------------------------
31 32 // Types
32 33 //---------------------------------------------------------------------------
33   -typedef struct XnDump
34   -{
35   - XN_FILE_HANDLE hFile;
36   -} XnDump;
37   -
38   -const XnDump XN_DUMP_CLOSED = { XN_INVALID_FILE_HANDLE };
  34 +struct XnDumpFile;
  35 +typedef struct XnDumpFile XnDumpFile;
39 36
40 37 //---------------------------------------------------------------------------
41 38 // Functions
@@ -44,61 +41,131 @@ const XnDump XN_DUMP_CLOSED = { XN_INVALID_FILE_HANDLE };
44 41 /**
45 42 * Configures if a specific dump mask is enabled.
46 43 *
47   -* @param csMask [in] The mask to set.
48   -* @param bEnabled [in] TRUE to enable this mask, FALSE otherwise.
  44 +* @param strMask [in] The mask to set.
  45 +* @param bEnabled [in] TRUE to enable this dump, FALSE otherwise.
49 46 */
50   -XN_C_API XnStatus XN_C_DECL xnDumpSetMaskState(const XnChar* csMask, XnBool bEnabled);
  47 +XN_C_API XnStatus XN_C_DECL xnDumpSetMaskState(const XnChar* strMask, XnBool bEnabled);
51 48
52 49 /**
53 50 * This function checks if a dump mask is enabled
54 51 *
55   -* @param csDumpMask [in] The mask that should be checked.
  52 +* @param strDumpMask [in] The mask that should be checked.
56 53 */
57   -XN_C_API XnBool XN_C_DECL xnLogIsDumpMaskEnabled(const XnChar* csDumpMask);
  54 +XN_C_API XnBool XN_C_DECL xnLogIsDumpMaskEnabled(const XnChar* strDumpMask);
58 55
59 56 /**
60   -* This function creates an XnDump object through which dumps can be written. Dump will only be
61   -* created if the mask is enabled.
  57 +* Opens a file for writing dump.
62 58 *
63   -* @param pDump [in] A handle to the dump.
64   -* @param csDumpMask [in] The mask under which this dump should be written.
65   -* @param csHeader [in] A header line to be written to the file. When this param is NULL, file will
66   -* be opened as a binary file. When param is not NULL, the string will be written
67   -* to the file once it is open.
68   -* @param csFileNameFormat [in] Format of the name to give the file.
69   -* @param ... [in] Arguments for the file name format string.
  59 +* @param strDumpName [in] Name of the dump mask this file belongs to.
  60 +* @param strNameFormat [in] A format string for the name of the file.
  61 +*
  62 +* @returns a file handle for writing data. The file should be closed using @ref xnDumpFileClose().
70 63 */
71   -XN_C_API void XN_C_DECL xnDumpInit(XnDump* pDump, const XnChar* csDumpMask, const XnChar* csHeader, const XnChar* csFileNameFormat, ...);
  64 +XN_C_API XnDumpFile* XN_C_DECL xnDumpFileOpen(const XnChar* strDumpName, const XnChar* strNameFormat, ...);
72 65
73 66 /**
74   -* This function creates an XnDump object through which dumps can be written. This dump will be created
75   -* anyway, and does not depend on log configuration.
  67 +* Opens a file for writing dump using some advanced options.
  68 +*
  69 +* You would usually prefer to use @ref xnDumpFileOpen().
76 70 *
77   -* @param pDump [in] A handle to the dump.
78   -* @param csHeader [in] A header line to be written to the file. When this param is NULL, file will
79   -* be opened as a binary file. When param is not NULL, the string will be written
80   -* to the file once it is open.
81   -* @param csFileNameFormat [in] Format of the name to give the file.
82   -* @param ... [in] Arguments for the file name format string.
  71 +* @param strDumpName [in] Name of the dump mask this file belongs to.
  72 +* @param bForce [in] When TRUE, file will be created even if dump is currently off.
  73 +* @param bSessionDump [in] When TRUE, file will be created with current session timestamp as a prefix to its name.
  74 +* @param strNameFormat [in] A format string for the name of the file.
  75 +*
  76 +* @returns a file handle for writing data. The file should be closed using @ref xnDumpFileClose().
83 77 */
84   -XN_C_API void XN_C_DECL xnDumpForceInit(XnDump* pDump, const XnChar* csHeader, const XnChar* csFileNameFormat, ...);
  78 +XN_C_API XnDumpFile* XN_C_DECL xnDumpFileOpenEx(const XnChar* strDumpName, XnBool bForce, XnBool bSessionDump, const XnChar* strNameFormat, ...);
85 79
86 80 /**
87   -* This function closes a dump file (use it once file is no longer needed).
88   -* You can later use xnDumpWriteString and xnDumpWriteBuffer to write to this file.
  81 +* Writes a buffer to a dump file.
89 82 *
90   -* @param pDump [in] A pointer to an XnDump struct returned from a call to xnDumpInit.
  83 +* @param pFile [in] Dump file to write to. A pointer retrieved from @ref xnDumpFileOpen.
  84 +* @param pBuffer [in] Data to be written to file.
  85 +* @param nBufferSize [in] Size of the buffer.
91 86 */
92   -XN_C_API void XN_C_DECL xnDumpClose(XnDump* pDump);
  87 +XN_C_API void XN_C_DECL _xnDumpFileWriteBuffer(XnDumpFile* pFile, const void* pBuffer, XnUInt32 nBufferSize);
93 88
94 89 /**
95   -* Writes a buffer to the dump.
96   -*
97   -* @param dump [in] The dump to write to.
98   -* @param pBuffer [in] A pointer to the buffer to write.
99   -* @param nBufferSize [in] The number of bytes to write from the buffer.
  90 +* Writes a formatted string to a dump file.
  91 +*
  92 +* @param pFile [in] Dump file to write to. A pointer retrieved from @ref xnDumpFileOpen.
  93 +* @param strFormat [in] Format string.
  94 +*
  95 +* NOTE: the total length of the string must not exceed 8 KB. If it does, it will be truncated.
  96 +*/
  97 +XN_C_API void XN_C_DECL _xnDumpFileWriteString(XnDumpFile* pFile, const XnChar* strFormat, ...);
  98 +
  99 +/**
  100 +* Closes a dump file.
  101 +*
  102 +* @param hFile [in] Dump file to close. A pointer retrieved from @ref xnDumpFileOpen.
100 103 */
101   -XN_C_API void XN_C_DECL xnDumpWriteBufferImpl(XnDump dump, const void* pBuffer, XnUInt32 nBufferSize);
  104 +XN_C_API void XN_C_DECL _xnDumpFileClose(XnDumpFile* pFile);
  105 +
  106 +#define xnDumpFileWriteBuffer(pFile, pBuffer, nBufferSize) \
  107 + if ((pFile) != NULL) \
  108 + { \
  109 + _xnDumpFileWriteBuffer(pFile, pBuffer, nBufferSize); \
  110 + } \
  111 +
  112 +#define xnDumpFileClose(pFile) \
  113 + if ((pFile) != NULL) \
  114 + { \
  115 + _xnDumpFileClose(pFile); \
  116 + pFile = NULL; \
  117 + } \
  118 +
  119 +#if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
  120 + #define xnDumpFileWriteString(pFile, strFormat, ...) \
  121 + if ((pFile) != NULL) \
  122 + { \
  123 + _xnDumpFileWriteString(pFile, strFormat, __VA_ARGS__); \
  124 + }
  125 +#elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
  126 + #define xnDumpFileWriteString(pFile, strFormat, ...) \
  127 + if ((pFile) != NULL) \
  128 + { \
  129 + _xnDumpFileWriteString(pFile, strFormat, ##__VA_ARGS__);\
  130 + }
  131 +#elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_ARC_VAARGS_STYLE
  132 + #define xnDumpFileWriteString(pFile, strFormat, ...) \
  133 + if ((pFile) != NULL) \
  134 + { \
  135 + _xnDumpFileWriteString(pFile, strFormat); \
  136 + }
  137 +#elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_NO_VAARGS
  138 + #define xnDumpFileWriteString(pFile, strFormat, arg) \
  139 + if ((pFile) != NULL) \
  140 + { \
  141 + _xnDumpFileWriteString(pFile, strFormat,arg); \
  142 + }
  143 +#else
  144 + #error Xiron Log - Unknown VAARGS type!
  145 +#endif
  146 +
  147 +
  148 +//---------------------------------------------------------------------------
  149 +// Backwards Compatibility Stuff
  150 +//---------------------------------------------------------------------------
  151 +
  152 +#ifndef __XN_NO_BC__
  153 +
  154 +#include "XnOS.h"
  155 +
  156 +typedef struct XnDump
  157 +{
  158 + XN_FILE_HANDLE hFile;
  159 +} XnDump;
  160 +
  161 +const XnDump XN_DUMP_CLOSED = { XN_INVALID_FILE_HANDLE };
  162 +
  163 +XN_C_API void XN_API_DEPRECATED("Use xnDumpFileX methods instead") XN_C_DECL xnDumpInit(XnDump* pDump, const XnChar* csDumpMask, const XnChar* csHeader, const XnChar* csFileNameFormat, ...);
  164 +XN_C_API void XN_API_DEPRECATED("Use xnDumpFileX methods instead") XN_C_DECL xnDumpForceInit(XnDump* pDump, const XnChar* csHeader, const XnChar* csFileNameFormat, ...);
  165 +XN_C_API void XN_API_DEPRECATED("Use xnDumpFileX methods instead") XN_C_DECL xnDumpClose(XnDump* pDump);
  166 +XN_C_API void XN_API_DEPRECATED("Use xnDumpFileX methods instead") XN_C_DECL xnDumpWriteBufferImpl(XnDump dump, const void* pBuffer, XnUInt32 nBufferSize);
  167 +XN_C_API void XN_API_DEPRECATED("Use xnDumpFileX methods instead") XN_C_DECL xnDumpWriteStringImpl(XnDump dump, const XnChar* csFormat, ...);
  168 +XN_C_API void XN_API_DEPRECATED("Use xnDumpFileX methods instead") XN_C_DECL xnDumpFlush(XnDump dump);
102 169
103 170 #define xnDumpWriteBuffer(dump, pBuffer, nBufferSize) \
104 171 if (dump.hFile != XN_INVALID_FILE_HANDLE) \
@@ -106,22 +173,6 @@ XN_C_API void XN_C_DECL xnDumpWriteBufferImpl(XnDump dump, const void* pBuffer,
106 173 xnDumpWriteBufferImpl(dump, pBuffer, nBufferSize); \
107 174 }
108 175
109   -/**
110   -* Writes a formatted string to the dump.
111   -*
112   -* @param dump [in] The dump to write to.
113   -* @param csFormat [in] A format string.
114   -* @param ... [in] Arguments to the format string.
115   -*/
116   -XN_C_API void XN_C_DECL xnDumpWriteStringImpl(XnDump dump, const XnChar* csFormat, ...);
117   -
118   -/**
119   -* Flushes a dump to the disk.
120   -*
121   -* @param dump [in] The dump to flush.
122   -*/
123   -XN_C_API void XN_C_DECL xnDumpFlush(XnDump dump);
124   -
125 176 #if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
126 177 #define xnDumpWriteString(dump, csFormat, ...) \
127 178 if ((dump).hFile != XN_INVALID_FILE_HANDLE) { \
@@ -146,4 +197,6 @@ XN_C_API void XN_C_DECL xnDumpFlush(XnDump dump);
146 197 #error Xiron Log - Unknown VAARGS type!
147 198 #endif
148 199
  200 +#endif // #ifndef __XN_NO_BC__
  201 +
149 202 #endif // __XN_DUMP_H__
127 Include/XnDumpWriters.h
... ... @@ -0,0 +1,127 @@
  1 +#ifndef __XN_DUMP_WRITERS_H__
  2 +#define __XN_DUMP_WRITERS_H__
  3 +
  4 +//---------------------------------------------------------------------------
  5 +// Includes
  6 +//---------------------------------------------------------------------------
  7 +#include "XnDump.h"
  8 +
  9 +//---------------------------------------------------------------------------
  10 +// Types
  11 +//---------------------------------------------------------------------------
  12 +typedef struct XnDumpWriterFileHandle
  13 +{
  14 + void* pInternal;
  15 +} XnDumpWriterFileHandle;
  16 +
  17 +typedef struct XnDumpWriter
  18 +{
  19 + void* pCookie;
  20 + XnDumpWriterFileHandle (XN_CALLBACK_TYPE* OpenFile)(void* pCookie, const XnChar* strDumpName, XnBool bSessionDump, const XnChar* strFileName);
  21 + void (XN_CALLBACK_TYPE* Write)(void* pCookie, XnDumpWriterFileHandle hFile, const void* pBuffer, XnUInt32 nBufferSize);
  22 + void (XN_CALLBACK_TYPE* CloseFile)(void* pCookie, XnDumpWriterFileHandle hFile);
  23 +} XnDumpWriter;
  24 +
  25 +//---------------------------------------------------------------------------
  26 +// Functions
  27 +//---------------------------------------------------------------------------
  28 +XN_C_API XnStatus XN_C_DECL xnDumpRegisterWriter(XnDumpWriter* pWriter);
  29 +
  30 +XN_C_API void XN_C_DECL xnDumpUnregisterWriter(XnDumpWriter* pWriter);
  31 +
  32 +XN_C_API XnStatus XN_C_DECL xnDumpSetFilesOutput(XnBool bOn);
  33 +
  34 +//---------------------------------------------------------------------------
  35 +// Helpers
  36 +//---------------------------------------------------------------------------
  37 +#ifdef __cplusplus
  38 +
  39 +class XnDumpWriterBase
  40 +{
  41 +public:
  42 + XnDumpWriterBase() : m_bRegistered(FALSE)
  43 + {
  44 + m_cObject.pCookie = this;
  45 + m_cObject.OpenFile = OpenFileCallback;
  46 + m_cObject.Write = WriteCallback;
  47 + m_cObject.CloseFile = CloseFileCallback;
  48 + }
  49 +
  50 + virtual ~XnDumpWriterBase()
  51 + {
  52 + Unregister();
  53 + }
  54 +
  55 + XnStatus Register()
  56 + {
  57 + XnStatus nRetVal = XN_STATUS_OK;
  58 +
  59 + if (!m_bRegistered)
  60 + {
  61 + OnRegister();
  62 +
  63 + nRetVal = xnDumpRegisterWriter(&m_cObject);
  64 + if (nRetVal != XN_STATUS_OK)
  65 + {
  66 + OnUnregister();
  67 + return (nRetVal);
  68 + }
  69 +
  70 + m_bRegistered = TRUE;
  71 + }
  72 +
  73 + return (XN_STATUS_OK);
  74 + }
  75 +
  76 + void Unregister()
  77 + {
  78 + if (m_bRegistered)
  79 + {
  80 + xnDumpUnregisterWriter(&m_cObject);
  81 + m_bRegistered = FALSE;
  82 +
  83 + OnUnregister();
  84 + }
  85 + }
  86 +
  87 + inline XnBool IsRegistered() { return m_bRegistered; }
  88 +
  89 + virtual XnDumpWriterFileHandle OpenFile(const XnChar* strDumpName, XnBool bSessionDump, const XnChar* strFileName) = 0;
  90 + virtual void Write(XnDumpWriterFileHandle hFile, const void* pBuffer, XnUInt32 nBufferSize) = 0;
  91 + virtual void CloseFile(XnDumpWriterFileHandle hFile) = 0;
  92 +
  93 + operator const XnDumpWriter*() const
  94 + {
  95 + return &m_cObject;
  96 + }
  97 +
  98 +protected:
  99 + virtual void OnRegister() {}
  100 + virtual void OnUnregister() {}
  101 +
  102 +private:
  103 + static XnDumpWriterFileHandle XN_CALLBACK_TYPE OpenFileCallback(void* pCookie, const XnChar* strDumpName, XnBool bSessionDump, const XnChar* strFileName)
  104 + {
  105 + XnDumpWriterBase* pThis = (XnDumpWriterBase*)pCookie;
  106 + return pThis->OpenFile(strDumpName, bSessionDump, strFileName);
  107 + }
  108 +
  109 + static void XN_CALLBACK_TYPE WriteCallback(void* pCookie, XnDumpWriterFileHandle hFile, const void* pBuffer, XnUInt32 nBufferSize)
  110 + {
  111 + XnDumpWriterBase* pThis = (XnDumpWriterBase*)pCookie;
  112 + return pThis->Write(hFile, pBuffer, nBufferSize);
  113 + }
  114 +
  115 + static void XN_CALLBACK_TYPE CloseFileCallback(void* pCookie, XnDumpWriterFileHandle hFile)
  116 + {
  117 + XnDumpWriterBase* pThis = (XnDumpWriterBase*)pCookie;
  118 + return pThis->CloseFile(hFile);
  119 + }
  120 +
  121 + XnDumpWriter m_cObject;
  122 + XnBool m_bRegistered;
  123 +};
  124 +
  125 +#endif
  126 +
  127 +#endif // __XN_DUMP_WRITERS_H__
17 Include/XnEvent.h
@@ -199,6 +199,7 @@ class XnEvent : public XnEventInterface
199 199 * It is highly recommended not to use this macro directly.
200 200 */
201 201 #define _XN_DECLARE_EVENT_CLASS(_class, _interface, _retVal, _raise, _signature, _raise_sign) \
  202 + XN_PRAGMA_START_DISABLED_WARNING_SECTION(XN_HIDES_PARENT_METHOD_WARNING_ID) \
202 203 class _interface : protected XnEvent \
203 204 { \
204 205 public: \
@@ -232,7 +233,9 @@ class XnEvent : public XnEventInterface
232 233 return (XN_STATUS_OK); \
233 234 } \
234 235 XnStatus Clear() { return XnEvent::Clear(); } \
235   - };
  236 + }; \
  237 + XN_PRAGMA_STOP_DISABLED_WARNING_SECTION
  238 +
236 239
237 240 #define _XN_SIGNATURE_0ARG()
238 241 #define _XN_FULL_SIGNATURE_0ARG() void* pCookie
@@ -259,16 +262,8 @@ class XnEvent : public XnEventInterface
259 262 #define _XN_ARGS_5ARG(_name1, _name2, _name3, _name4, _name5) _name1, _name2, _name3, _name4, _name5,
260 263
261 264 /** Declares an event class */
262   -#if XN_PLATFORM == XN_PLATFORM_WIN32
263   - #define XN_DECLARE_EVENT_0ARG(_class, _interface) \
264   - __pragma(warning(push))\
265   - __pragma(warning(disable:4189))\
266   - _XN_DECLARE_EVENT_CLASS(_class, _interface, void, _XN_RAISE_NO_RET_CODE(_XN_ARGS_0ARG()), _XN_FULL_SIGNATURE_0ARG(), _XN_SIGNATURE_0ARG())\
267   - __pragma(warning(pop))
268   -#else
269   - #define XN_DECLARE_EVENT_0ARG(_class, _interface) \
270   - _XN_DECLARE_EVENT_CLASS(_class, _interface, void, _XN_RAISE_NO_RET_CODE(_XN_ARGS_0ARG()), _XN_FULL_SIGNATURE_0ARG(), _XN_SIGNATURE_0ARG())
271   -#endif
  265 +#define XN_DECLARE_EVENT_0ARG(_class, _interface) \
  266 + _XN_DECLARE_EVENT_CLASS(_class, _interface, void, _XN_RAISE_NO_RET_CODE(_XN_ARGS_0ARG()), _XN_FULL_SIGNATURE_0ARG(), _XN_SIGNATURE_0ARG())
272 267
273 268 #define XN_DECLARE_EVENT_0ARG_RETVAL(_class, _interface) \
274 269 _XN_DECLARE_EVENT_CLASS(_class, _interface, XnStatus, _XN_RAISE_WITH_RET_CODE(_XN_ARGS_0ARG()), _XN_FULL_SIGNATURE_0ARG(), _XN_SIGNATURE_0ARG())
392 Include/XnLog.h
@@ -33,6 +33,12 @@
33 33 // Exported Function Declaration
34 34 //---------------------------------------------------------------------------
35 35
  36 +/**
  37 + * @name Initialization
  38 + * Functions for initializing and shutting down the logger.
  39 + * @{
  40 + */
  41 +
36 42 /**
37 43 * This function initializes the log system.
38 44 */
@@ -54,43 +60,57 @@ XN_C_API XnStatus XN_C_DECL xnLogInitFromINIFile(const XnChar* csINIFile, const
54 60 XN_C_API XnStatus XN_C_DECL xnLogInitFromXmlFile(const XnChar* strFileName);
55 61
56 62 /**
57   - * Registers a new Log Writer to receive log entries.
58   - *
59   - * @param pWriter [in] The writer to register
60   - */
61   -XN_C_API XnStatus XN_C_DECL xnLogRegisterLogWriter(const XnLogWriter* pWriter);
  63 +* This function closes the log.
  64 +*/
  65 +XN_C_API XnStatus XN_C_DECL xnLogClose();
62 66
63   -/**
64   - * Unregisters a Log Writer from receiving log entries.
65   - *
66   - * @param pWriter [in] The writer to unregister
  67 +// @}
  68 +
  69 +/**
  70 + * @name Filtering Log Messages
  71 + * Functions for managing filters on the log system.
  72 + * @{
67 73 */
68   -XN_C_API void XN_C_DECL xnLogUnregisterLogWriter(const XnLogWriter* pWriter);
69 74
70 75 /**
71   -* This function closes current log file, and starts a new one
  76 +* Sets the minimum severity to be output from a specific mask (logger name).
  77 +*
  78 +* @param strMask [in] Name of the logger.
  79 +* @param minSeverity [in] Minimum severity to be output. Use @ref XN_LOG_SEVERITY_NONE to output nothing.
72 80 */
73   -XN_C_API XnStatus XN_C_DECL xnLogStartNewFile();
  81 +XN_C_API XnStatus XN_C_DECL xnLogSetMaskMinSeverity(const XnChar* strMask, XnLogSeverity minSeverity);
74 82
75 83 /**
76   -* This function closes the log.
  84 +* Gets the minimum severity to be output from a specific mask (logger name).
  85 +*
  86 +* @param strMask [in] Name of the logger.
  87 +*
  88 +* @returns The minimum severity, or @ref XN_LOG_SEVERITY_NONE is mask will output nothing.
77 89 */
78   -XN_C_API XnStatus XN_C_DECL xnLogClose();
  90 +XN_C_API XnLogSeverity XN_C_DECL xnLogGetMaskMinSeverity(const XnChar* strMask);
  91 +
  92 +// @}
  93 +
  94 +/**
  95 + * @name Log Writers
  96 + * Functions for managing which writers are active in the log system (i.e. which outputs
  97 + * will be generated).
  98 + * @{
  99 + */
79 100
80 101 /**
81   -* Configures if a specific log mask is enabled.
82   -*
83   -* @param csMask [in] The mask to set.
84   -* @param bEnabled [in] TRUE to enable this mask, FALSE otherwise.
85   -*/
86   -XN_C_API XnStatus XN_C_DECL xnLogSetMaskState(const XnChar* csMask, XnBool bEnabled);
  102 + * Registers a new Log Writer to receive log entries.
  103 + *
  104 + * @param pWriter [in] The writer to register
  105 + */
  106 +XN_C_API XnStatus XN_C_DECL xnLogRegisterLogWriter(const XnLogWriter* pWriter);
87 107
88 108 /**
89   -* Configures the minimum severity the log will output.
90   -*
91   -* @param nMinSeverity [in] The minimum severity to output.
92   -*/
93   -XN_C_API XnStatus XN_C_DECL xnLogSetSeverityFilter(XnLogSeverity nMinSeverity);
  109 + * Unregisters a Log Writer from receiving log entries.
  110 + *
  111 + * @param pWriter [in] The writer to unregister
  112 + */
  113 +XN_C_API void XN_C_DECL xnLogUnregisterLogWriter(const XnLogWriter* pWriter);
94 114
95 115 /**
96 116 * Configures if log entries will be printed to console.
@@ -106,8 +126,21 @@ XN_C_API XnStatus XN_C_DECL xnLogSetConsoleOutput(XnBool bConsoleOutput);
106 126 */
107 127 XN_C_API XnStatus XN_C_DECL xnLogSetFileOutput(XnBool bFileOutput);
108 128
  129 +// @}
  130 +
  131 +/**
  132 + * @name File Output
  133 + * Functions for configuring how files are created.
  134 + * @{
  135 + */
  136 +
  137 +/**
  138 +* This function closes current log file, and starts a new one (if file writer i