Skip to content

Commit

Permalink
Updated to version 1.5.2.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenNI committed Dec 19, 2011
1 parent ba3048e commit 1c1367c
Show file tree
Hide file tree
Showing 130 changed files with 5,648 additions and 2,964 deletions.
35 changes: 35 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,41 @@
Detailed Change log:
--------------------

Version 1.5.2.7 (Unstable version - Dec 18th 2011)
--------------------------------------------------
* Java UserTracker sample will now draw the limbs only when both joints have a non-zero confidence.
* .NET samples will now show their source files in the visual studio project.
* NiUserSelection - Enhanced the documentation.
* PoseDetectionCapability::StopPoseDetection will now return proper errors.
* .Net Wrappers: Disposing a device node now also destroys the node.
* xnNodeInfoGetTreeStringRepresentation was added to all wrappers.
* Linux: keep ref count for the libusb events thread, so it will be shutdown automatically when all read threads have stopped.
* Added option to show low confidence limbs as dotted lines in the user selection sample.
* Recordings playbacks: make sure seek is also performed in a lock, so it wouldn't collide with the reader thread.
* Bug Fix: The samples cannot be copied to another folder and be compiled.
* Data Dump: Adding frame sync information checks.
* NiUseExtension sample: added a clear message about the need to register the extension module.
* .Net Wrappers: Added the DataPtr property to Generator class.
* .Net wrappers: Fixed a bug where MapGenerator.BytesPerPixel was missing.
* .Net Wrappers: FindExistingNode now returns null instead of throwing an exception if no node exists.
* Java Wrappers: StartPoseDetection and StopPoseDetection are declared deprecated, and were replaced by startPoseDetection and stopPoseDetection.
* Linux: Cross compilation is now based on environment variables.
* .Net Wrappers: Projective/RealWorld conversion - added a version which accepts a preallocated array.
* USB Driver version was updated to 3.1.3.1.
* NiBackRecorder: removed unneeded calls to Release().
* NiConvertXToONI: removed unused seekNode.
* Android: makefiles are now compatible to ndk v7.
* .Net Wrapper: Added the missing DeviceIdentificationCapability class.
* New API: xnStopSinglePoseDetection.
* Bug Fix: Seeking before the first WaitXUpdateAll() caused undetermined behavior.
* Android: Added the NiSimpleSkeleton sample.
* Java Wrappers: Added missing enum values.
* .NET Wrappers: Added missing enum values.
* Android UserTracker sample: Adjusted to work without a calibration pose.
* USB Driver: adding support for PrimeSense's 0601 product ID.
* Log: initializing from INI file would reset the output directory.
* 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.

Version 1.4.0.2 (Unstable version - Nov 17th 2011)
--------------------------------------------------
* 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.
Expand Down
Binary file modified Documentation/OpenNI.chm
Binary file not shown.
8 changes: 6 additions & 2 deletions Include/ARC/XnPlatformARC.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,14 @@ typedef size_t XnSizeT;
/** Indicates a deprecated function */
#define XN_API_DEPRECATED(msg)

#define XN_DEPRECATED_WARNING_IDS
#define XN_HIDES_PARENT_METHOD_WARNING_ID
#define XN_CONDITION_IS_CONST_WARNING_ID
#define XN_PRAGMA_START_DISABLED_WARNING_SECTION(warnings)
#define XN_PRAGMA_STOP_DISABLED_WARNING_SECTION

/** Declares a global shared library export function. */
#define XN_API_EXPORT_INIT()

#define XN_DEPRECATED_WARNING_IDS 1

#endif //_XN_PLATFORM_ARC_H_

6 changes: 6 additions & 0 deletions Include/Linux-x86/XnPlatformLinux-x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ typedef size_t XnSizeT;
/** Indicates a deprecated function */
#define XN_API_DEPRECATED(msg) __attribute__((warning("This function is deprecated: " msg)))

#define XN_DEPRECATED_WARNING_IDS
#define XN_HIDES_PARENT_METHOD_WARNING_ID
#define XN_CONDITION_IS_CONST_WARNING_ID
#define XN_PRAGMA_START_DISABLED_WARNING_SECTION(warnings)
#define XN_PRAGMA_STOP_DISABLED_WARNING_SECTION

/** Declares a global shared library export function. */
#define XN_API_EXPORT_INIT()

Expand Down
17 changes: 15 additions & 2 deletions Include/Win32/XnPlatformWin32.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,24 @@ typedef size_t XnSizeT;
#endif

#ifdef __INTEL_COMPILER
#define XN_DEPRECATED_WARNING_IDS 1786
#define XN_DEPRECATED_WARNING_IDS 1786
#define XN_HIDES_PARENT_METHOD_WARNING_ID 1125
#define XN_CONDITION_IS_CONST_WARNING_ID
#else
#define XN_DEPRECATED_WARNING_IDS 4995 4996
#define XN_DEPRECATED_WARNING_IDS 4995 4996
#define XN_HIDES_PARENT_METHOD_WARNING_ID
#define XN_CONDITION_IS_CONST_WARNING_ID 4127
#endif

#define XN_PRAGMA_START_DISABLED_WARNING_SECTION(warnings) \
__pragma(warning(push)) \
__pragma(warning(disable:XN_HIDES_PARENT_METHOD_WARNING_ID))

#define XN_PRAGMA_STOP_DISABLED_WARNING_SECTION \
__pragma(warning(pop))



/** Declares a global shared library export function. */
#define XN_API_EXPORT_INIT() \
BOOL APIENTRY DllMain (HMODULE /*hModule*/, DWORD nReasonForCall, LPVOID /*lpReserved*/) \
Expand Down
19 changes: 18 additions & 1 deletion Include/XnCppWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,8 @@ namespace xn

/** @copybrief xnNodeInfoGetCreationInfo
* For full details and usage, see @ref xnNodeInfoGetCreationInfo
*/ inline const XnChar* GetCreationInfo() const
*/
inline const XnChar* GetCreationInfo() const
{
return xnNodeInfoGetCreationInfo(m_pInfo);
}
Expand All @@ -1233,6 +1234,14 @@ namespace xn
return xnNodeInfoGetAdditionalData(m_pInfo);
}

/** @copybrief xnNodeInfoGetTreeStringRepresentation
* For full details and usage, see @ref xnNodeInfoGetTreeStringRepresentation
*/
inline XnStatus GetTreeStringRepresentation(XnChar* csResultBuffer, XnUInt32 nBufferSize) const
{
return xnNodeInfoGetTreeStringRepresentation(m_pInfo, csResultBuffer, nBufferSize);
}

private:
inline void SetUnderlyingObject(XnNodeInfo* pInfo);

Expand Down Expand Up @@ -4603,6 +4612,14 @@ namespace xn
return xnStopPoseDetection(GetHandle(), user);
}

/** @copybrief xnStopSinglePoseDetection
* For full details and usage, see @ref xnStopSinglePoseDetection
*/
inline XnStatus StopSinglePoseDetection(XnUserID user, const XnChar* strPose)
{
return xnStopSinglePoseDetection(GetHandle(), user, strPose);
}

/** @copybrief xnRegisterToPoseCallbacks
* For full details and usage, see @ref xnRegisterToPoseCallbacks
*/
Expand Down
3 changes: 3 additions & 0 deletions Include/XnDataTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ typedef void* XnValue;
class decl ClassName \
{ \
public: \
XN_PRAGMA_START_DISABLED_WARNING_SECTION(XN_CONDITION_IS_CONST_WARNING_ID) \
\
static XnValue CreateValueCopy(Type const& orig) \
{ \
if (sizeof(Type) > sizeof(XnValue)) \
Expand Down Expand Up @@ -104,6 +106,7 @@ typedef void* XnValue;
return *p; \
} \
} \
XN_PRAGMA_STOP_DISABLED_WARNING_SECTION \
};

/**
Expand Down
17 changes: 6 additions & 11 deletions Include/XnEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class XnEvent : public XnEventInterface
* It is highly recommended not to use this macro directly.
*/
#define _XN_DECLARE_EVENT_CLASS(_class, _interface, _retVal, _raise, _signature, _raise_sign) \
XN_PRAGMA_START_DISABLED_WARNING_SECTION(XN_HIDES_PARENT_METHOD_WARNING_ID) \
class _interface : protected XnEvent \
{ \
public: \
Expand Down Expand Up @@ -232,7 +233,9 @@ class XnEvent : public XnEventInterface
return (XN_STATUS_OK); \
} \
XnStatus Clear() { return XnEvent::Clear(); } \
};
}; \
XN_PRAGMA_STOP_DISABLED_WARNING_SECTION


#define _XN_SIGNATURE_0ARG()
#define _XN_FULL_SIGNATURE_0ARG() void* pCookie
Expand All @@ -259,16 +262,8 @@ class XnEvent : public XnEventInterface
#define _XN_ARGS_5ARG(_name1, _name2, _name3, _name4, _name5) _name1, _name2, _name3, _name4, _name5,

/** Declares an event class */
#if XN_PLATFORM == XN_PLATFORM_WIN32
#define XN_DECLARE_EVENT_0ARG(_class, _interface) \
__pragma(warning(push))\
__pragma(warning(disable:4189))\
_XN_DECLARE_EVENT_CLASS(_class, _interface, void, _XN_RAISE_NO_RET_CODE(_XN_ARGS_0ARG()), _XN_FULL_SIGNATURE_0ARG(), _XN_SIGNATURE_0ARG())\
__pragma(warning(pop))
#else
#define XN_DECLARE_EVENT_0ARG(_class, _interface) \
_XN_DECLARE_EVENT_CLASS(_class, _interface, void, _XN_RAISE_NO_RET_CODE(_XN_ARGS_0ARG()), _XN_FULL_SIGNATURE_0ARG(), _XN_SIGNATURE_0ARG())
#endif
#define XN_DECLARE_EVENT_0ARG(_class, _interface) \
_XN_DECLARE_EVENT_CLASS(_class, _interface, void, _XN_RAISE_NO_RET_CODE(_XN_ARGS_0ARG()), _XN_FULL_SIGNATURE_0ARG(), _XN_SIGNATURE_0ARG())

#define XN_DECLARE_EVENT_0ARG_RETVAL(_class, _interface) \
_XN_DECLARE_EVENT_CLASS(_class, _interface, XnStatus, _XN_RAISE_WITH_RET_CODE(_XN_ARGS_0ARG()), _XN_FULL_SIGNATURE_0ARG(), _XN_SIGNATURE_0ARG())
Expand Down
5 changes: 5 additions & 0 deletions Include/XnMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,9 @@
TypeName(const TypeName&); \
void operator=(const TypeName&)

/** Disables the "local variable is initialized but not referenced" warning (if you need
to use this variable in an assert */
#define XN_REFERENCE_VARIABLE(x) \
((void)x)

#endif //_XN_MACROS_H_
9 changes: 9 additions & 0 deletions Include/XnModuleCFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,14 @@ XnStatus XN_CALLBACK_TYPE __ModuleStopPoseDetection(XnModuleNodeHandle hGenerato
_XN_VALIDATE_CAPABILITY_INTERFACE(pInterface);
return pInterface->StopPoseDetection(user);
}
XnStatus XN_CALLBACK_TYPE __ModuleStopSinglePoseDetection(XnModuleNodeHandle hGenerator, XnUserID user, const XnChar* strPose)
{
ModuleProductionNode* pProdNode = (ModuleProductionNode*)hGenerator;
ModuleUserGenerator* pNode = dynamic_cast<ModuleUserGenerator*>(pProdNode);
ModulePoseDetectionInteface* pInterface = pNode->GetPoseDetectionInteface();
_XN_VALIDATE_CAPABILITY_INTERFACE(pInterface);
return pInterface->StopSinglePoseDetection(user, strPose);
}

XnStatus XN_CALLBACK_TYPE __ModuleRegisterToPoseCallbacks(XnModuleNodeHandle hGenerator, XnModulePoseDetectionCallback PoseDetectionStartCB, XnModulePoseDetectionCallback PoseDetectionEndCB, void* pCookie, XnCallbackHandle* phCallback)
{
Expand Down Expand Up @@ -1899,6 +1907,7 @@ void XN_CALLBACK_TYPE __ModuleGetPoseDetectionInterface(XnModulePoseDetectionCap
pInteface->GetAllAvailablePoses = __ModuleGetAllAvailablePoses;
pInteface->StartPoseDetection = __ModuleStartPoseDetection;
pInteface->StopPoseDetection = __ModuleStopPoseDetection;
pInteface->StopSinglePoseDetection = __ModuleStopSinglePoseDetection;
pInteface->RegisterToPoseCallbacks = __ModuleRegisterToPoseCallbacks;
pInteface->UnregisterFromPoseCallbacks = __ModuleUnregisterFromPoseCallbacks;

Expand Down
1 change: 1 addition & 0 deletions Include/XnModuleCppInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ namespace xn

virtual XnStatus StartPoseDetection(const XnChar* strPose, XnUserID user) = 0;
virtual XnStatus StopPoseDetection(XnUserID user) = 0;
virtual XnStatus StopSinglePoseDetection(XnUserID user, const XnChar* strPose) = 0;

virtual XnStatus RegisterToPoseDetectionCallbacks(XnModulePoseDetectionCallback StartPoseCB, XnModulePoseDetectionCallback EndPoseCB, void* pCookie, XnCallbackHandle& hCallback) = 0;
virtual void UnregisterFromPoseDetectionCallbacks(XnCallbackHandle hCallback) = 0;
Expand Down
2 changes: 2 additions & 0 deletions Include/XnModuleInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,8 @@ typedef struct XnModulePoseDetectionCapabilityInterface
void (XN_CALLBACK_TYPE* UnregisterFromPoseDetected)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback);
XnStatus (XN_CALLBACK_TYPE* RegisterToOutOfPose)(XnModuleNodeHandle hGenerator, XnModulePoseDetectionCallback handler, void* pCookie, XnCallbackHandle* phCallback);
void (XN_CALLBACK_TYPE* UnregisterFromOutOfPose)(XnModuleNodeHandle hGenerator, XnCallbackHandle hCallback);

XnStatus (XN_CALLBACK_TYPE* StopSinglePoseDetection)(XnModuleNodeHandle hGenerator, XnUserID user, const XnChar* strPose);
} XnModulePoseDetectionCapabilityInterface;

/** User generator Interface. */
Expand Down
39 changes: 18 additions & 21 deletions Include/XnOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,91 +166,88 @@ typedef enum {
/** Creates a new type object and validates that allocation succeeded. */
#if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
#define XN_VALIDATE_NEW(ptr, type, ...) \
__pragma(warning (push)) \
__pragma(warning (disable: 4127)) \
do { \
{ \
(ptr) = XN_NEW(type, __VA_ARGS__); \
if ((ptr) == NULL) \
{ \
return (XN_STATUS_ALLOC_FAILED); \
} \
} while (0) \
__pragma(warning (pop))
}

#elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
#define XN_VALIDATE_NEW(ptr, type, ...) \
do { \
{ \
(ptr) = XN_NEW(type, ##__VA_ARGS__); \
if ((ptr) == NULL) \
{ \
return (XN_STATUS_ALLOC_FAILED); \
} \
} while (0)
}
#elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_ARC_VAARGS_STYLE
#define XN_VALIDATE_NEW(ptr, type...) \
do { \
{ \
(ptr) = XN_NEW(type); \
if ((ptr) == NULL) \
{ \
return (XN_STATUS_ALLOC_FAILED); \
} \
} while (0)
}
#else
#define XN_VALIDATE_NEW(ptr, type) \
do { \
{ \
(ptr) = XN_NEW(type); \
if ((ptr) == NULL) \
{ \
return (XN_STATUS_ALLOC_FAILED); \
} \
} while (0)
}
#endif

/** Creates a new type object, validates that allocation succeeded, and initializes the object (type must have an Init function). */
#if XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_WIN32_VAARGS_STYLE
#define XN_VALIDATE_NEW_AND_INIT(ptr, type, ...) \
do { \
{ \
XN_VALIDATE_NEW(ptr, type, __VA_ARGS__); \
XnStatus rc = (ptr)->Init(); \
if (rc != XN_STATUS_OK) \
{ \
XN_DELETE(ptr); \
return (rc); \
} \
} while (0)
}
#elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_GCC_VAARGS_STYLE
#define XN_VALIDATE_NEW_AND_INIT(ptr, type, ...) \
do { \
{ \
XN_VALIDATE_NEW(ptr, type, ##__VA_ARGS__); \
XnStatus rc = (ptr)->Init(); \
if (rc != XN_STATUS_OK) \
{ \
XN_DELETE(ptr); \
return (rc); \
} \
} while (0)
}
#elif XN_PLATFORM_VAARGS_TYPE == XN_PLATFORM_USE_ARC_VAARGS_STYLE
#define XN_VALIDATE_NEW_AND_INIT(ptr, type...) \
do { \
{ \
XN_VALIDATE_NEW(ptr, type); \
XnStatus rc = (ptr)->Init(); \
if (rc != XN_STATUS_OK) \
{ \
XN_DELETE(ptr); \
return (rc); \
} \
} while (0)
}
#else
#define XN_VALIDATE_NEW_AND_INIT(ptr, type) \
do { \
{ \
XN_VALIDATE_NEW(ptr, type); \
XnStatus rc = (ptr)->Init(); \
if (rc != XN_STATUS_OK) \
{ \
XN_DELETE(ptr); \
return (rc); \
} \
} while (0)
}
#endif

// Strings
Expand Down Expand Up @@ -392,7 +389,7 @@ XN_C_API void XN_C_DECL xnOSWriteMemoryReport(const XnChar* csFileName);
}

// called only if ctor threw exception
static void operator delete(void* p, const XnChar* csFunction, const XnChar* csFile, XnUInt32 nLine, const XnChar* csAdditional)
static void operator delete(void* p, const XnChar* /*csFunction*/, const XnChar* /*csFile*/, XnUInt32 /*nLine*/, const XnChar* /*csAdditional*/)
{
xnOSLogMemFree(p);
xnOSFree(p);
Expand All @@ -411,7 +408,7 @@ XN_C_API void XN_C_DECL xnOSWriteMemoryReport(const XnChar* csFileName);
}

// called only if ctor threw exception
static void operator delete[](void* p, const XnChar* csFunction, const XnChar* csFile, XnUInt32 nLine, const XnChar* csAdditional)
static void operator delete[](void* p, const XnChar* /*csFunction*/, const XnChar* /*csFile*/, XnUInt32 /*nLine*/, const XnChar* /*csAdditional*/)
{
xnOSLogMemFree(p);
xnOSFree(p);
Expand Down
2 changes: 1 addition & 1 deletion Include/XnPlatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#endif

#include "Win32/XnPlatformWin32.h"
#elif defined(android) && defined(__arm__)
#elif defined(ANDROID) && defined(__arm__)
#include "Android-Arm/XnPlatformAndroid-Arm.h"
#elif (linux && (i386 || __x86_64__))
#include "Linux-x86/XnPlatformLinux-x86.h"
Expand Down
8 changes: 8 additions & 0 deletions Include/XnPrdNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -2041,6 +2041,14 @@ XN_C_API XnStatus XN_C_DECL xnStartPoseDetection(XnNodeHandle hInstance,const X
*/
XN_C_API XnStatus XN_C_DECL xnStopPoseDetection(XnNodeHandle hInstance, XnUserID user);
/**
* @brief Stop detection of a specific pose for a specific user
*
* @param hInstance [in] A handle to the instance
* @param user [in] Id of user
* @param strPose [in] Name of the pose
*/
XN_C_API XnStatus XN_C_DECL xnStopSinglePoseDetection(XnNodeHandle hInstance, XnUserID user, const XnChar* strPose);
/**
* @brief Register to callbacks for pose events
*
* @param hInstance [in] A handle to the instance
Expand Down
Loading

0 comments on commit 1c1367c

Please sign in to comment.