Microsoft.Kinect A frame used specifically for color images. It provides access to the dimensions, format and pixel data for a color frame. A container for per-frame sensor data buffers. Tracks whether this instance is disposed. 0 == false, 1 == true. We need to use int (vs. bool) for Interlocked.Exchange. Initializes a new instance of the ImageFrame class that represents this frame's data. The ImageType for this frame. The ImageResolution for this frame. The frame number of this frame. The timestamp of this frame. The frame flags of this frame. Disposes the image frame. Finalizes an instance of the ImageFrame class. This is used to notify the developer that they forgot to dispose the frame. To be implemented by derived classes to return data to free lists. Specify true to indicate that the class should clean up all resources. Gets the time of this ImageFrame. Gets the frame identification. Gets the width in pixels of this ImageFrame. Gets the height in pixels of this ImageFrame. Gets the bytes per pixel of this ImageFrame. Gets the total length of the pixel data buffer of this ImageFrame. Gets the frame's source stream. Gets the frame's flags. The underlying stream object. The related frame data. The lock object used to synchronize access as necessary. Initializes a new instance of the ColorImageFrame class. The underlying stream object. The current frame number. The timestamp of the frame. The frame flags. The actual pixel data. Construct a ColorImageFrame for the frameNumber provided, if possible. If the data is not available for the specified frameNumber, this returns null. If this method succeeds, the result must be disposed. The associated ColorImageStream. The frameNumber to retrieve. The timestamp of the frame to retrieve. The frame flags of the frame. Null upon failure, a ColorImageStream upon success, which must be Disposed. This method provides the raw array that contains the color frame's pixel data. A byte array of the color frame's pixel data. This method copies the frame's pixel data to a pre-allocated byte array. The byte array to receive the data. It must be exactly PixelDataLength in length. This method copies the frame's pixel data to a pre-allocated byte array. The IntPtr of the byte array. The count of Bytes to copy to pixelData. This must be equal to the frame’s PixelDataLength. Disposes the frame object. Specify true to indicate that the class should clean up all resources. Gets this frame's Framerate and Resolution. Gets the total length of the pixel data buffer of this ImageFrame. The frame's source stream. Maps between Skeleton, Depth, and Color space for a KinectSensor. Privately held reference to the KinectSensor for performing mapping operations. Initializes a new instance of the CoordinateMapper class from the given parameters. Binary parameters. Method to handle RelationalParametersChanged event. Re-fires to INPC. The object that sent the event. Generic event parameters. Initializes a new instance of the CoordinateMapper class. The KinectSensor to perform mappings for. Based off the function NuiTransformDepthImageToSkeleton from NuiSkeleton.h, which is inline so it is neither directly possible nor is it performant to p-invoke it from managed. X coordinate from the depth image. Y coordinate from the depth image. Depth value from the depth image. A Vector indicating the point on the skeleton corresponding to the depth pixel. Based off the function NuiTransformSkeletonToDepthImage from NuiSkeleton.h, which is inline so it is neither directly possible nor is it performant to p-invoke it from managed. Vector from skeleton to transform. Resulting X coordinate for skeleton point. Resulting Y coordinate for skeleton point. Resulting depth value for skeleton point. Extracts the ImageType from the ColorImageFormat. The ColorImageFormat to convert. The converted ImageType. Maps the entire color frame to depth space. Each element will be the result of mapping the corresponding color pixel into the specified depth frame. Will be equal in length to the number of color pixels. Any color pixel without a corresponding depth pixel will result in a sentinel value. The resulting depth points can be tested by calling KinectSensor.IsKnownPoint(). The desired target image format. The depth format of the source. The depth frame pixel data as retrieved from DepthImageFrame.CopyPixelDataTo. Must be equal in length to Width*Height of the depth format specified by depthImageFormat. The DepthImagePoint array to receive the data. Must be equal in length to Width*Height of the color format specified by colorImageFormat. Because depth image data and color image data come from separate sensors, pixels in the two images may not always line up exactly. The two sensors may have different fields of view, or may not be aimed precisely in the same direction. This means that a point near the edge of the depth image may correspond to a pixel just beyond the edge of the color image, or vice versa. This function accepts coordinates outside the bounds of the depth image. It may return pixels outside the color image. This means that you can use data from the two images in combination, even when the two images do not line up completely. You must verify that the coordinates that are returned lie within the color image before using the coordinates to reference pixels in that color image. The depth image coordinates you specify are not required to be within the bounds of the depth frame image, but they should not be too far outside the depth frame image bounds. If the coordinates are far outside the depth frame image, they are unlikely to map to coordinates inside the bounds of the color image. This function will then return color image coordinates that are unlikely to be useful. Maps the entire color frame to skeleton space. Each element will be the result of mapping the corresponding color pixel into the specified depth frame and then into skeleton space. Will be equal in length to the number of color pixels. Any color pixel without a corresponding depth pixel will result in a sentinel value. The resulting skeleton points can be tested by calling KinectSensor.IsKnownPoint(). The desired target image format. The depth format of the source. The depth frame pixel data, as retrieved from DepthImageFrame.CopyPixelDataTo. Must be equal in length to Width*Height of the depth format specified by depthImageFormat. The SkeletonPoint array to receive the data. Must be equal in length to Width*Height of the color format specified by colorImageFormat. Because depth image data and color image data come from separate sensors, pixels in the two images may not always line up exactly. The two sensors may have different fields of view, or may not be aimed precisely in the same direction. This means that a point near the edge of the depth image may correspond to a pixel just beyond the edge of the color image, or vice versa. This function accepts coordinates outside the bounds of the depth image. It may return pixels outside the color image. This means that you can use data from the two images in combination, even when the two images do not line up completely. You must verify that the coordinates that are returned lie within the color image before using the coordinates to reference pixels in that color image. The depth image coordinates you specify are not required to be within the bounds of the depth frame image, but they should not be too far outside the depth frame image bounds. If the coordinates are far outside the depth frame image, they are unlikely to map to coordinates inside the bounds of the color image. This function will then return color image coordinates that are unlikely to be useful. Maps the entire depth frame to color space. Each element will be the result of mapping the corresponding DepthImagePixel into color space. Will be equal in length to the number of DepthImagePixels. Any DepthImagePixel without a corresponding color pixel will result in a sentinel value. The resulting ColorImagePoints can be tested by calling KinectSensor.IsKnownPoint(). The depth format of the source. The depth frame pixel data, as retrieved from DepthImageFrame.CopyPixelDataTo. Must be equal in length to Width*Height of the depth format specified by depthImageFormat. The desired target image format. The ColorImagePoint array to receive the data. Must be equal in length to Width*Height of the depth format specified by depthImageFormat. Because depth image data and color image data come from separate sensors, pixels in the two images may not always line up exactly. The two sensors may have different fields of view, or may not be aimed precisely in the same direction. This means that a point near the edge of the depth image may correspond to a pixel just beyond the edge of the color image, or vice versa. This function accepts coordinates outside the bounds of the depth image. It may return pixels outside the color image. This means that you can use data from the two images in combination, even when the two images do not line up completely. You must verify that the coordinates that are returned lie within the color image before using the coordinates to reference pixels in that color image. The depth image coordinates you specify are not required to be within the bounds of the depth frame image, but they should not be too far outside the depth frame image bounds. If the coordinates are far outside the depth frame image, they are unlikely to map to coordinates inside the bounds of the color image. This function will then return color image coordinates that are unlikely to be useful. Maps the entire depth frame to skeleton space. Each element will be the result of mapping the corresponding DepthImagePixel from the specified depth frame into skeleton space. Will be equal in length to the number of depth pixels. Any depth pixel without corresponding skeleton point will result in a sentinel value. The resulting SkeletonPoints can be tested by calling KinectSensor.IsKnownPoint(). The depth format of the source. The depth frame pixel data, as retrieved from DepthImageFrame.CopyPixelDataTo. Must be equal in length to Width*Height of the depth format specified by depthImageFormat. The SkeletonPoint array to receive the data. Must be equal in length to Width*Height of the depth format specified by depthImageFormat. Maps from a DepthImagePoint to the corresponding ColorImagePoint. The depth format of the source. The depth point to map. The desired target image format. The ColorImagePoint corresponding to the point in DepthImage space. Because depth image data and color image data come from separate sensors, pixels in the two images may not always line up exactly. The two sensors may have different fields of view, or may not be aimed precisely in the same direction. This means that a point near the edge of the depth image may correspond to a pixel just beyond the edge of the color image, or vice versa. This function accepts coordinates outside the bounds of the depth image. It may return pixels outside the color image. This means that you can use data from the two images in combination, even when the two images do not line up completely. You must verify that the coordinates that are returned lie within the color image before using the coordinates to reference pixels in that color image. The depth image coordinates you specify are not required to be within the bounds of the depth frame image, but they should not be too far outside the depth frame image bounds. If the coordinates are far outside the depth frame image, they are unlikely to map to coordinates inside the bounds of the color image. This function will then return color image coordinates that are unlikely to be useful. Maps from a DepthImagePoint to the corresponding SkeletonPoint. The the depth format to use in the conversion. The depth image point for the depth frame. The skeleton point for the given DepthImagePoint and format. Maps from a SkeletonPoint to the corresponding ColorImagePoint. The SkeletonPoint to map. The desired target image format. The ColorImagePoint for the given skeleton point and format. Because depth image data and color image data come from separate sensors, pixels in the two images may not always line up exactly. The two sensors may have different fields of view, or may not be aimed precisely in the same direction. This means that a point near the edge of the depth image may correspond to a pixel just beyond the edge of the color image, or vice versa. This function accepts coordinates outside the bounds of the depth image. It may return pixels outside the color image. This means that you can use data from the two images in combination, even when the two images do not line up completely. You must verify that the coordinates that are returned lie within the color image before using the coordinates to reference pixels in that color image. The depth image coordinates you specify are not required to be within the bounds of the depth frame image, but they should not be too far outside the depth frame image bounds. If the coordinates are far outside the depth frame image, they are unlikely to map to coordinates inside the bounds of the color image. This function will then return color image coordinates that are unlikely to be useful. Maps from a SkeletonPoint to the corresponding DepthImagePoint. The supplied skeleton point. The depth format to convert to. The DepthImagePoint for the given skeleton point. Gets the binary paramters associated with this instance of CoordinateMapper. Binary parameters. Occurs when a property value changes. This enum has all of the available backlight compensation modes. Favors the average brightness. Favors the center of the scene. Favors lowlights. Favors the center only. This allows for flicker reduction due to power line frequency. Disables flicker reduction. Used for power line frequencies of 50 hertz. Used for power line frequencies of 60 hertz. This class contains all of the available color camera settings. This holds a reference to the associated sensor. Initializes a new instance of the ColorCameraSettings class. The sensor these settings relate to. Resets all color camera settings to their defaults. This triggers the NotifyPropertyChanged if the value is different. The old value. The new value. The property name. This triggers the NotifyPropertyChanged if the value is different. The old value. The new value. The property name. This triggers the NotifyPropertyChanged if the value is different. The old value. The new value. The property name. This triggers the NotifyPropertyChanged if the value is different. The old value. The new value. The property name. Notifies the client of property changes. The name of the property that changed. Gets or sets a value indicating whether the auto exposure is enabled. Gets or sets a value for the exposure time. This property takes effect only when AutoExposure is false. Gets the minimum exposure time. Gets the maximum exposure time. Gets or sets a value for the frame interval. This property takes effect only when AutoExposure is false. Gets the minimum frame interval. Gets the maximum frame interval. Gets or sets a value for the brightness. This property takes effect only when AutoExposure is true. Gets the minimum brightness. Gets the maximum brightness. Gets or sets the desired backlight compensation mode. This property takes effect only when AutoExposure is true. Gets or sets the desired power line frequency. This property takes effect only when AutoExposure is true. Gets or sets a value for the gain. This property takes effect only when AutoExposure is false. Gets the minimum gain. Gets the maximum gain. Gets or sets a value indicating whether the white balance is automatic or not. Gets or sets a value for the white balance. This property takes effect only when AutoWhiteBalance is false. Gets the minimum white balance. Gets the maximum white balance. Gets or sets a value for the white balance. Gets the minimum white balance. Gets the maximum white balance. Gets or sets a value for the white balance. Gets the minimum hue. Gets the maximum hue. Gets or sets a value for the saturation. Gets the minimum saturation. Gets the maximum saturation. Gets or sets a value for the gamma. Gets the minimum gamma. Gets the maximum gamma. Gets or sets a value for the sharpness. Gets the minimum sharpness. Gets the maximum sharpness. This event triggers when a related property changes. The generic DataPool class for a key with three values. The key type. The first value type. The second value type. The third value type. The generic DataPool class for a key with four values. The key type. The first value type. The second value type. The third value type. The fourth value type. The array of private entries. The next available entry. The lock object used to synchronize access. Initializes a new instance of the DataPool class. The number of pool entries to manage. Returns a free entry, allocating if necessary. Must be checked in via CheckInEntryForUpdate. A new Entry to be updated and checked in via CheckInEntryForUpdate. Marks an entry as fully updated, ready to be retrieved via TryLockEntry. The entry that is done being updated, as retrived from CHeckOutFreeEntryForUpdate. The Key may not be null. Attempt to find and lock an entry given the provided Key. If successful, must be unlocked via UnlockEntry. The Key to use to look up an entry. Cannot be null. The entry if found, null otherwise. True if a matching entry is found, false otherwise. Unlocks an entry retrieved via TryLockEntry. Must be an Entry retrieved from this DataPool instance. The entry to unlock. A basic Key/Value pair. Gets or sets the key of the entry. Gets or sets the first value. Gets or sets the second value. Gets or sets the third value. Gets or sets the fourth value. Private subclass of Entry, used for additional bookkeping. The current reference count. Adds a reference count to the entry. Releases a reference count from the entry. Gets a value indicating whether the object is locked or not. Gets or sets a value indicating whether the object is in a pool. Gets or sets a value indicating whether the object is valid. Initializes a new instance of the DataPool class. The number of pool entries to manage. A structure representing a pixel in a DepthImageFrame. The value for an unknown depth. This gets the hash code for a given depth image pixel. The calculated hash code. This method compares two depth image pixel objects. The object to compare. It returns true if they are equal and false otherwise. This method compares two depth image pixel objects. The DepthImagePixel to compare. It returns true if they are equal and false otherwise. This method compares two depth image pixel objects. The first DepthImagePixel to compare. The second DepthImagePixel to compare. It returns true if they are equal and false otherwise. This method compares two depth image pixel objects. The first DepthImagePixel to compare. The second DepthImagePixel to compare. It returns true if they are not equal and false otherwise. Gets or sets the player index for the pixel. Gets or sets the depth (in millimeters) for the pixel. Gets a value indicating whether the Depth value is a known value. A frame used specifically for depth images. It provides access to the dimensions, format and pixel data for a depth frame, and allows for mapping of coordinates between skeleton frames and color frames. A bitmask for extracting the player index bit field from the depth value. The width of the player index bitmask. The underlying depth image stream. The underlying depth frame data. The lock object used to synchronize access as necessary. Initializes a new instance of the DepthImageFrame class. The related depth stream. The current frame number. The current timestamp. The current frame flags. The pixel data. Construct a DepthImageFrame for the frameNumber provided, if possible. If the data is not available for the specified frameNumber, this returns null. If this method succeeds, the result must be disposed. The associated DepthImageStream. The frameNumber to retrieve. The timestamp of the frame to retrieve. The flags for the frame. Null upon failure, a DepthImageStream upon success, which must be Disposed. This method provides the DepthImagePixel array that contains the depth image's pixel data. A DepthImagePixel array of the depth frame's pixel data. Private helper function used by CopyPixelDataTo and Copy DepthImagePixelDataTo. Type of elements to copy. Destination array. Function to perform the copy. Private helper function used by CopyPixelDataTo and Copy DepthImagePixelDataTo. Type of data to copy. Destination array. The length of the destination array. Function to perform the copy. This method copies the frame's pixel data to a pre-allocated pixel array. The pixel array to receive the data. It must be exactly PixelDataLength in length. This method copies the frame's pixel data to a pre-allocated pixel array. The pixel array to receive the data. It must be exactly PixelDataLength in length. This method copies the frame's pixel data to a pre-allocated byte array. The IntPtr of the byte array. The count of Int16s to copy to pixelData. This must be equal to the frame’s PixelDataLength. This method copies the frame's DepthImagePixel data to a pre-allocated byte array. The IntPtr of the byte array. The count of DepthImagePixels to copy to pixelData. This must be equal to the frame’s PixelDataLength. This maps a depth coordinate to a color coordinate. The X coordinate of the depth frame. The Y coordinate of the depth frame. The color format being used. An ImagePoint that contains the X, Y locations in the color frame. Looks up the depth frame coordinates for a given skeleton point. The supplied skeleton point. The ImagePoint that contains the X, Y and depth value of the given skeleton point. Looks up the skeleton point location of the given depth X, Y. The X coordinate of the depth frame. The Y coordinate of the depth frame. The skeleton point for the given X, Y. Disposes the frame object. Specify true to indicate that the class should clean up all resources. Gets this frame's Framerate and Resolution. Gets the depth sensor range with which this frame was captured. Gets the maximum reliable Depth value in mm for the depth sensor range setting used to capture this frame. Gets the minimum reliable Depth value in mm for the depth sensor range setting used to capture this frame. Total length of the pixel data buffer of this ImageFrame. Gets the depth filter that was applied to the frame. The frame's source stream. This struct represents a given X, Y, and depth value in a depth frame. Backing field for X. Backing field for Y. Backing field for Depth. Padding for compat with unmanaged object. This gets the hash code for a given depth image point. The calculated hash code. This method compares two depth image point objects. The object to compare. It returns true if they are equal and false otherwise. This method compares two depth image point objects. The DepthImagePoint to compare. It returns true if they are equal and false otherwise. This method compares two depth image point objects. The first DepthImagePoint to compare. The second DepthImagePoint to compare. It returns true if they are equal and false otherwise. This method compares two depth image point objects. The first DepthImagePoint to compare. The second DepthImagePoint to compare. It returns true if they are not equal and false otherwise. Gets or sets the X location. Gets or sets the Y location. Gets or sets the depth value. Gets a reserved value. Do not use. This struct represents a given X, Y in a color frame. This gets the hash code for a given color image point. The calculated hash code. This method compares two color image point objects. The object to compare. It returns true if they are equal and false otherwise. This method compares two color image point objects. The ColorImagePoint to compare. It returns true if they are equal and false otherwise. This method compares two color image point objects. The first ColorImagePoint to compare. The second ColorImagePoint to compare. It returns true if they are equal and false otherwise. This method compares two color image point objects. The first ColorImagePoint to compare. The second ColorImagePoint to compare. It returns true if they are not equal and false otherwise. Gets or sets the X location. Gets or sets the Y location. Wrapper that holds a collection of event handlers for a specific type and associates a context with them. EventArgs for the specific event. Initializes a new instance of the ContextEventHandler class. Determines whether the context will use Post or Send. Default is Post. Adds an event handler and associates it with the current context. The new event to add to the list of handlers. Removes the event handler associated with the current context. The event to remove from the list of handlers. Invokes all registered event handlers. The sender of the message. The event arguments to be passed to the handler. This method marks the object as disposed. This holds the list of context to handler mappings. This is the method used process the message by the synchronization context. This keeps track of the disposed state of the object. Internal handler that matches the delegates for SynchronizationContext.Post/Send. State packed as ContextEventHandlerArgsWrapper ( handler + sender + args ). Gets a value indicating whether this wrapper has any actual handlers registered. The possible methods for sending data to the synchronization context. The send method is used to pass synchronous message to the context. The post method is used to pass an asynchronous message to the context. Container class to hold event handler, sender and args so that it can be marshalled using the Synchronization context. Initializes a new instance of the ContextEventHandlerArgsWrapper class. The event handler. The sending object. The argument object. Gets the associated event handler. Gets the sending object. Gets the event arguments object. Identifies a SynchronizationContext taking the potential that it is a DispatcherSynchronizationContext into account. In .NET 4.5, WPF made a breaking change to that class that affects stability of the actual value of a SynchronizationContext in WPF apps. While the actual SynchronizationContext instance may change, the internal referenced Dispatcher will not, so we use this for determining identity when available. Name of the internal field in DispatcherSynchronizationContext to reflect on when comparing SynchronizationContextIdentifiers. The unqualified name of the DispatcherSynchronizationContext type. Storage for the Dispatcher object, if one exists. Initializes a new instance of the SynchronizationContextIdentifier class. The SynchronizationContext to extract identity for. Gets the hashcode of the object. Hashcode of the SynchronizationContextIdentifier. Returns whether this SynchronizationContextIdentifier is equivalent to obj. The object to compare for equivalence. True if this SynchronizationContextIdentifier is equivalent to obj, false otherwise. Returns whether this SynchronizationContextIdentifier is equivalent to obj. The object to compare for equivalence. True if this SynchronizationContextIdentifier is equivalent to obj, false otherwise. This method compares two SynchronizationContextIdentifiers. The first SynchronizationContextIdentifier to compare. The second SynchronizationContextIdentifier to compare. Returns true if they are equal, false otherwise. This method compares two SynchronizationContextIdentifiers. The first SynchronizationContextIdentifier to compare. The second SynchronizationContextIdentifier to compare. Returns false if they are equal, true otherwise. Gets the SynchronizationContext held by the SynchronizationContextIdentifier. Container class to associate an event handler with a context so that they act as a single key in a list. Initializes a new instance of the ContextHandlerPair class. The target handler. The target context identifier. Gets the associated synchronization context identifier. Gets the associated event handler. The interface of a filter to be applied to depth frame data. Processes a frame of depth data. Timestamp of the depth frame. Width of the depth frame, in pixels. Height of the depth frame, in pixels. Depth frame data. true if the depth frame was modified; false otherwise. Gets or sets the native depth filter interface. Arguments for the DepthFrameReady events. The related depth stream. The related frame number. The related timestamp. The frame flags. Indicates if the arguments are valid. Initializes a new instance of the DepthImageFrameReadyEventArgs class with a reference to the source Stream and the frame number and timestamp, which allows us to retrieve instance of DepthImageFrames on demand. The source DepthImageStream. The frameNumber for this event. The timestamp for this event. The frame flags for this event. Whether this instance is known a priori to be invalid. Create an instance of DepthImageFrameReadyEventArgs. This must only be called by the owning DepthImageStream, and only after the stream has attempted to retrieve the native frame, otherwise OpenDepthImageFrame will fail. The depth image stream. The frame number. The timestamp. The frame flags. A new DepthImageFrameReadyEventArgs object. Create an instance of DepthImageFrameReadyEventArgs which is known to be invalid. OpenDepthImageFrame will return null. An invalid event arguments. Container for one frame's worth of depth sensor image data Can return null if the data is not available. Upon success, returns the DepthImageFrame corresponding to this event, which must be Disposed. An a new depth image frame. Arguments for the ColorFrameReady events. The related color stream. The related frame number. The related timestamp. The frame flags. Indicates if the arguments are valid. Initializes a new instance of the ColorImageFrameReadyEventArgs class with a reference to the source Stream and the frame number and timestamp, which allows us to retrieve instance of ColorImageFrames on demand. The source ColorImageStream. The frameNumber for this event. The timestamp for this event. The frame flags for this event. Whether this instance is known a priori to be invalid. Create an instance of ColorImageFrameReadyEventArgs. This must only be called by the owning ColorImageStream, and only after the stream has attempted to retrieve the native frame, otherwise OpenColorImageFrame will fail. The color stream. The frame number. The timestamp. The frame flags. A new ColorImageFrameReadyEventArgs object. Create an instance of ColorImageFrameReadyEventArgs which is known to be invalid. OpenColorImageFrame will return null. An invalid ColorImageFrameReadyEventArgs. Container for one frame's worth of color sensor image data Can return null if the data is not available. Upon success, returns the ColorImageFrame corresponding to this event, which must be Disposed. A new ColorImageFrame. The event arguments used when a skeletion frame is ready. The related skeleton stream. The related frame number. The related timestamp. The tracking mode in which the frame was captured. Indicates if the arguments are valid. Initializes a new instance of the SkeletonFrameReadyEventArgs class with a reference to the source Stream and the frame number and timestamp, which allows us to retrieve instance of SkeletonFrames on demand. The source SkeletonStream. The frameNumber for this event. The timestamp for this event. The tracking mode in which the frame was captured. Whether this instance is known a priori to be invalid. Create an instance of SkeletonFrameReadyEventArgs. This must only be called by the owning SkeletonStream, and only after the stream has attempted to retrieve the native frame, otherwise OpenSkeletonFrame will fail. The skeleton stream. The frame number. The timestamp. The tracking mode in which the frame was captured. A new SkeletonFrameReadyEventArgs object. Create an instance of SkeletonFrameReadyEventArgs which is known to be invalid. OpenSkeletonFrame will return null. An invalid SkeletonFrameReadyEventArgs object. Container for one frame's worth of skeleton sensor image data Can return null if the data is not available. Upon success, returns the SkeletonFrame corresponding to this event, which must be Disposed. A new SkeletonFrame. Arguments for the Kinect sensor's AllFramesReady event. The related color image frame event arguments. The related depth image frame event arguments. The related skeleton frame event arguments. Initializes a new instance of the AllFramesReadyEventArgs class. The related color event arguments. The related depth event arguments. The related skeletion event arguments. The most recent frame from the Kinect sensor's color image stream. Can be null if the data is no longer available. Upon success, the value must be Disposed. A new ColorImageFrame. The most recent frame from the Kinect sensor's depth image stream. Can be null if the data is no longer available. Upon success, the value must be Disposed. A new DepthImageFrame. The most recent frame from the Kinect sensor's skeleton stream. Can be null if the data is no longer available. Upon success, the value must be Disposed. A new SkeletonFrame. Default facade will create a DMO object using registered COM server, and will call native layer directly. Wrapper interface used to abstract DMO object creation, destruction and other native calls, to allow for mocking. Creates an instance of Kinect DMO object. DMO object created. Can never be null. Destroy DMO object previously created via . DMO object which should be destroyed. Get metadata about the available microphone array devices. Array to hold audio device metadata. If null, only is populated. Number of available microphone array devices. Get metadata about the available speaker devices. Array to hold audio device metadata. If null, only is populated. Number of available speaker devices. Determines if the specified microphone device corresponds to the Kinect™ sensor associated with this . Microphone array device to match against this sensor. true if microphone array device matches the associated Kinect™ sensor. false otherwise. false is always returned for null device IDs. Create an event used to signal the to stop streaming. A new . used to get audio microphone device and audio DMO information. Initializes a new instance of the DmoAudioWrapper class. used to get audio microphone device and audio DMO information. Creates an instance of Kinect DMO object. DMO object created. Can never be null. Destroy DMO object previously created via . DMO object which should be destroyed. Implementation does nothing, since DMO object is managed by underlying . Get metadata about the available microphone array devices. Array to hold audio device metadata. If null, only is populated. Number of available microphone array devices. Get metadata about the available speaker devices. Array to hold audio device metadata. If null, only is populated. Number of available speaker devices. Determines if the specified microphone device corresponds to the Kinect™ sensor associated with this . Microphone array device to match against this sensor. true if microphone array device matches the associated Kinect™ sensor. false otherwise. false is always returned for null device IDs. Create an event used to signal the to stop streaming. A new . Class used to group native identifier definitions needed to interop with a DMO. Interface identifier for interface. Interface identifier for interface. This interface provides methods for manipulating a Microsoft DirectX Media Object (DMO). This method retrieves the number of input and output streams. Receives the number of input streams. Receives the number of output streams. This method retrieves information about an input stream, such as any restrictions on the number of samples per buffer, and whether the stream performs a lookahead on the input data. This information never changes. Zero-based index of an input stream on the DMO. Receives a bitwise combination of zero or more DMO_INPUT_STREAM_INFO_FLAGS flags. This method retrieves information about an output stream; for example, whether the stream is discardable and whether it uses a fixed sample size. This information never changes. Zero-based index of an output stream on the DMO. Receives a bitwise combination of zero or more DMO_OUTPUT_STREAM_INFO_FLAGS flags. This method retrieves a preferred media type for a specified input stream. Zero-based index of an input stream on the DMO. Zero-based index on the set of acceptable media types. Reference to a DMO_MEDIA_TYPE structure. The method fills the structure with the media type information. The format block might be null, in which case the format type GUID is GUID_NULL. This method retrieves a preferred media type for a specified output stream. Zero-based index of an output stream on the DMO. Zero-based index on the set of acceptable media types. Reference to a DMO_MEDIA_TYPE structure. The method fills the structure with the media type information. The format block might be null, in which case the format type GUID is GUID_NULL. This method sets the media type on an input stream or tests whether a media type is acceptable. Zero-based index of an input stream on the DMO. DMO_MEDIA_TYPE structure that specifies the media type. Bitwise combination of zero or more flags from the DMO_SET_TYPE_FLAGS enumeration. This method sets the media type on an output stream or tests whether a media type is acceptable. Zero-based index of an output stream on the DMO. DMO_MEDIA_TYPE structure that specifies the media type. Bitwise combination of zero or more flags from the DMO_SET_TYPE_FLAGS enumeration. This method retrieves the media type that was set for an input stream, if any. Zero-based index of an input stream on the DMO. Reference to a DMO_MEDIA_TYPE structure. The method fills the structure with the media type information. This method retrieves the media type that was set for an output stream, if any. Zero-based index of an output stream on the DMO. Reference to a DMO_MEDIA_TYPE structure. The method fills the structure with the media type information. This method retrieves the buffer requirements for a specified input stream. Zero-based index of an input stream on the DMO. Receives the minimum size of an input buffer for this stream, in bytes. Receives the maximum amount of data that the DMO will hold for a lookahead, in bytes. If the DMO does not perform a lookahead on the stream, the value is zero. Receives the required buffer alignment, in bytes. If the input stream has no alignment requirement, the value is 1. This method retrieves the buffer requirements for a specified output stream. Zero-based index of an output stream on the DMO. Receives the minimum size of an output buffer for this stream, in bytes. Receives the required buffer alignment, in bytes. If the output stream has no alignment requirement, the value is 1. This method retrieves the maximum latency on a specified input stream. Zero-based index of an input stream on the DMO. Receives the maximum latency. This method sets the maximum latency on a specified input stream. For the definition of maximum latency, see . Zero-based index of an input stream on the DMO. Maximum latency. This method flushes all internally buffered data. This method signals a discontinuity on the specified input stream. Zero-based index of an input stream on the DMO. This method allocates any resources needed by the DMO. Calling this method is always optional. This method frees resources allocated by the DMO. Calling this method is always optional. This method queries whether an input stream can accept more input data. Zero-based index of an input stream on the DMO. Receives either zero or DMO_INPUT_STATUSF_ACCEPT_DATA. This method delivers a buffer to the specified input stream. Zero-based index of an input stream on the DMO. interface for buffer. Bitwise combination of zero or more flags from the DMO_INPUT_DATA_BUFFER_FLAGS enumeration. Time stamp that specifies the start time of the data in the buffer. If the buffer has a valid time stamp, set the DMO_INPUT_DATA_BUFFERF_TIME flag in the dwFlags parameter. Otherwise, the DMO ignores this value. Reference time specifying the duration of the data in the buffer. If this value is valid, set the DMO_INPUT_DATA_BUFFERF_TIMELENGTH flag in the dwFlags parameter. Otherwise, the DMO ignores this value. This method generates output from the current input data. Bitwise combination of zero or more flags from the DMO_PROCESS_OUTPUT_FLAGS enumeration. Number of output buffers. Array of DMO_OUTPUT_DATA_BUFFER structures containing the output buffers. Specify the size of the array in the cOutputBufferCount parameter. Receives a reserved value (zero). The application should ignore this value. This method acquires or releases a lock on the DMO. Call this method to keep the DMO serialized when performing multiple operations. Value that specifies whether to acquire or release the lock. If the value is nonzero, a lock is acquired. If the value is zero, the lock is released. This structure describes an output buffer used by a DirectX DMO. Value of pinned native pointer to the interface of a buffer allocated by the application. Status flags. After processing output, the DMO sets this member to a bitwise combination of zero or more DMO_OUTPUT_DATA_BUFFER_FLAGS flags. Time stamp that specifies the start time of the data in the buffer. If the buffer has a valid time stamp, the DMO sets this member and also sets the DMO_OUTPUT_DATA_BUFFERF_TIME flag in the dwStatus member. Otherwise, ignore this member. Reference time specifying the length of the data in the buffer. If the DMO sets this member to a valid value, it also sets the DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH flag in the dwStatus member. Otherwise, ignore this member. This interface provides methods for manipulating a data buffer. Any buffer passed to a Microsoft DirectX Media Object (DMO) must implement this interface. This method specifies the length of the data currently in the buffer. Size of the data, in bytes. The value must not exceed the buffer's maximum size. Call the method to obtain the maximum size. This method retrieves the maximum number of bytes this buffer can hold. Pointer to a variable that receives the buffer's maximum size, in bytes. This method retrieves the buffer and the size of the valid data in the buffer. that receives the native memory address of the buffer array. The parameter can be IntPtr.Zero. Reference to a variable that receives the size of the valid data, in bytes. This structure defines the format of waveform-audio data. Waveform-audio format type. Number of channels in the waveform-audio data. Monaural data uses one channel and stereo data uses two channels. Sample rate, in samples per second (Hertz), that each channel should be played or recorded. If wFormatTag is WAVE_FORMAT_PCM, then common values for nSamplesPerSecare 8.0 kHz, 11.025 kHz, 22.05 kHz, and 44.1 kHz. For non-PCM formats, this member must be computed according to the manufacturer's specification of the format tag. Required average data-transfer rate, in bytes per second, for the format tag. If wFormatTag is WAVE_FORMAT_PCM, nAvgBytesPerSec should be equal to the product of nSamplesPerSec and nBlockAlign. For non-PCM formats, this member must be computed according to the manufacturer's specification of the format tag. Playback and record software can estimate buffer sizes by using the nAvgBytesPerSec member. Block alignment, in bytes. The block alignment is the minimum atomic unit of data for the wFormatTag format type. If wFormatTag is WAVE_FORMAT_PCM, nBlockAlign should be equal to the product of nChannels and wBitsPerSample divided by 8 (bits per byte). For non-PCM formats, this member must be computed according to the manufacturer's specification of the format tag. Playback and record software must process a multiple of nBlockAlign bytes of data at a time. Data written and read from a device must always start at the beginning of a block. For example, it is illegal to start playback of PCM data in the middle of a sample (that is, on a non-block-aligned boundary). Bits per sample for the wFormatTag format type. If wFormatTag is WAVE_FORMAT_PCM, then wBitsPerSample should be equal to 8 or 16. For non-PCM formats, this member must be set according to the manufacturer's specification of the format tag. Some compression schemes cannot define a value for wBitsPerSample, so this member can be zero. Size, in bytes, of extra format information appended to the end of the WAVEFORMATEX structure. This information can be used by non-PCM formats to store extra attributes for the wFormatTag. If no extra information is required by the wFormatTag, this member must be set to zero. For WAVE_FORMAT_PCM formats only, this member is ignored. This structure describes the format of the data used by a stream in a DirectX DMO. Media major type GUID for audio types. Media subtype GUID for PCM audio signals. Media subtype GUID for wave audio signals. Media format type GUID for WAVEFORMATEX formats. A GUID identifying the stream's major media type. This must be one of the DMO Media Types. Subtype GUID of the stream. If TRUE, samples are of a fixed size. This field is informational only. For audio, it is generally set to TRUE. For video, it is usually TRUE for uncompressed video and FALSE for compressed video. If TRUE, samples are compressed using temporal (interframe) compression. A value of TRUE indicates that not all frames are key frames. This field is informational only. Size of the sample, in bytes. For compressed data, the value can be zero. GUID specifying the format type. The pbFormat member points to the corresponding format structure. This field is not used. Size of the format block of the media type. Pointer to the format structure. The structure type is specified by the formattype member. The format structure must be present, unless formattype is GUID_NULL or FORMAT_None. Initializes a new instance of the DMO_MEDIA_TYPE class. Associates this instance with the specified audio format, allocating native memory as appropriate. Audio format to associate with this instance. Finalizes an instance of the DMO_MEDIA_TYPE class. Frees native resources associated with this object, such as the memory used to hold the format structure. Frees native resources associated with this object, such as the memory used to hold the format structure. If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. This class represents a pre-allocated buffer, managed by the StaticMediaBuffer client. Its main purpose is to present somebody else's buffer as a . Native pointer to buffer data. Maximum number of bytes that can be stored in buffer. Number of bytes currently stored in buffer that are ready to be consumed. Prevents a default instance of the StaticMediaBuffer class from being created. Invalidates all buffer data, getting buffer ready to be written-to again from the beginning. New maximum size of buffer. Initializes a new instance of the StaticMediaBuffer class from the specified buffer data and size. Native pointer to buffer data. Number of bytes allocated for pointer. This method specifies the length of the data currently in the buffer. Size of the data, in bytes. The value must not exceed the buffer's maximum size. Call the method to obtain the maximum size. This method retrieves the maximum number of bytes this buffer can hold. Pointer to a variable that receives the buffer's maximum size, in bytes. This method retrieves the buffer and the size of the valid data in the buffer. that receives the native memory address of the buffer array. The parameter can be IntPtr.Zero. Reference to a variable that receives the size of the valid data, in bytes. Exposes methods for enumerating, getting, and setting property values. Gets the number of properties attached to the file. Receives the number of properties in store. Gets a property key from the store's array of properties. The index of the property key in the array of structures. This is a zero-based index. Receives a structure that contains the unique identifier for a property. Gets data for a specific property. structure that contains a unique identifier for the property in question. Receives an object that contains the property data. Sets a new property value, or replaces or removes an existing value. structure that contains a unique identifier for the property in question. Reference to an object that contains the new property data. Saves a property change. Specifies the FMTID/PID identifier that programmatically identifies a property. A unique GUID for the property. A property identifier (PID). It is recommended that you set this value to PID_FIRST_USABLE. Any value greater than or equal to 2 is acceptable. Provides ability to get/set audio beam direction for Kinect™ sensor, as well as the ability to get the position of current sound source relative to sensor. Gets the currently selected beam direction (i.e., angle that Kinect™ audio sensor gives relative preference over other angles). Receives the horizontal angle (in degrees) of the currently selected beam in camera coordinates, where the x-z axes define the horizontal plane. The angle is relative to the z-axis, which is perpendicular to the Kinect sensor. Sets the currently selected beam direction (i.e., angle that Kinect™ audio sensor gives relative preference over other angles). The horizontal angle (in degrees) to set as the new beam angle, in camera coordinates, where the x-z axes define the horizontal plane. The angle is relative to the z-axis, which is perpendicular to the Kinect™ sensor. Provides the best estimate of the sound source location relative to the Kinect™ sensor. Receives the estimated horizontal angle (in degrees) to the sound source, in camera coordinates, where the x-z axes define the horizontal plane. The angle is relative to the z-axis, which is perpendicular to the Kinect™ sensor. Receives a measure of the confidence (in [0.0,1.0] interval) in the estimated value for . Type of audio echo cancellation. No echo cancellation or suppression. Echo cancellation only. Echo cancellation and echo suppression. Type of beam angle determination. Automatic Beam determination based on fixed coefficients. Automatic Beam determination based on dynamic coefficients. User set beam angle. Argument for the BeamAngleChanged event. Initializes a new instance of the BeamAngleChangedEventArgs class. This constructor is internal to prevent external creation. Gets the angle (in degrees) of the direction towards which the audio beam is pointing, i.e.: the direction towards which the kinect sensor is listening. When facing the Kinect: 0: center positive angles: right negative angles: left Range is -50 to +50 degrees. Argument for the SoundSourceAngleChanged event. Initializes a new instance of the SoundSourceAngleChangedEventArgs class. This constructor is internal to prevent external creation. Gets the angle (in degrees) from kinect sensor towards the current sound source. When facing the Kinect: 0: center positive angles: right negative angles: left Range is -50 to +50 degrees. Gets a measure of our confidence in the sound source angle. This value is in the range [0,1], 1 being the highest possible confidence. Main class for capturing audio from Kinect and get access to sound source localization. Value of first valid DMO property ID. ID of DMO property used to turn Acoustic Echo Cancellation mode on and off. ID of DMO property used to toggle between source mode and filter mode. ID of DMO property used to specify the indexes of microphone and speaker devices that are bound to DMO. ID of DMO property used to turn Feature mode on and off. ID of DMO property used to turn Noise Suppression on and off. ID of DMO property used to turn Automatic Gain Control on and off. ID of DMO property used to configure how many times acoustic echo suppression algorithm is run. ID of DMO property used to configure beamforming mode. Gets the smallest possible value for . Gets the largest possible value for . Gets the smallest possible value for . Gets the largest possible value for . Name of audio capture thread. Format GUID used to identify DMO property keys. Returns a that corresponds to the specified property id. ID of property for which corresponding will be returned. corresponding to property ID. Sets DMO property value in DMO property dictionary and flags properties as pending to be applied to DMO object. ID of property to set. Value of property to set. Gets DMO property value from DMO property dictionary. ID of property to get. Value of requested property. Will be null before first time property is set, so internal code should handle this and also set appropriate defaults for all properties accessible to clients. Method to be called in audio capture thread to apply DMO properties specified by client in main thread. Property store to which queued-up properties will be applied. Whenever a property is set, we flag that we have properties pending to be applied to DMO. Also, whenever a capture thread is started we also flag that we have properties pending to be applied to DMO. Then, whenever capture thread notices that this flag is set, it applies all property values in property bag to DMO, not merely the ones that have changed since last time. This won't result in a noticeable performance overhead, because there are only a handful of DMO properties that we care about, and doing things this way is simpler than having a mechanism to keep track of property diffs. Throws an exception if feature mode is not turned on. Called by setters for properties that require feature mode to be turned on for proper functioning. Default value for stale read threshold overridable in . Dictionary of DMO property keys to property values. true when there are properties set by client still pending to be applied to DMO. false otherwise. Facade object used to call into native layer in an easily mockable way. Lock object used to protect DMO property get/set operations. Lock object used to protect audio capture initialization, uninitialization and resource disposal. actively capturing audio. If null, no stream is currently being captured. Sound source angle detected by DMO during audio capture. Confidence measured by DMO for sound source angle value, during audio capture. Beam angle detected by DMO during audio capture. Manual beam angle specified by client. Beam angle to set on DMO in capture thread. The object that owns this audio source. Handler for event that fires when the sound source changes. Handler for event that fires when the sound source changes. Initializes a new instance of the KinectAudioSource class. that owns this audio source. Facade to use for performing native call operations. This constructor is internal and is injectable with different objects for testing purposes. Initializes a new instance of the KinectAudioSource class, with default properties set. that owns this audio source. Starts capturing audio from the device. The data can be read using the returned stream. If there are no reads to the stream for longer than this threshold the DMO discards any buffered audio. This prevents stale data from being returned in scenarios such as speech recognition and dialog systems, when the consumption of audio samples may stop for a while. Higher values for this threshold (e.g.: multiple seconds) are advisable if clients notice dropped audio packets, such as is more likely in high CPU-load scenarios. Pass TimeSpan.MaxValue to avoid hitting this threshold. A stream of audio samples, in 16khz, 16-bit PCM format. If the stream data is not read and the buffered audio exceeds the size specified in , the oldest samples are discarded. Starts capturing audio from the device. The data can be read using the returned stream. A stream of audio samples, in 16khz, 16-bit PCM format. If the data is not read for more than 500ms, buffered data is discarded to prevent returning old audio. Stops the capturing and closes the stream. The specified value that determines how the DMO performs echo cancellation and suppression. Change the echo cancellation and echo suppression configuration according to the specified values. Specifies how many times the DMO will perform acoustic echo suppression (AES) on the residual signal after echo cancellation has been applied. 0 implies echo suppression is turned off, and 1 and 2 are acceptable values used to turn this on. Specifies which acoustic echo cancellation mode we should use. _AEC_SYSTEM_MODE.ArrayAndEchoCancellation turns AEC on and _AEC_SYSTEM_MODE.ArrayOnly turns AEC off. The specified value that determines how the beam angle is controlled. Updates the current beam angle and fires the event. Beam angle, in radians. Updates the current sound sounce angle and confidence values, and fires the event if beyond a threshold. Sound source angle, in radians. ConfidenceLevel, in 0-1 range. Returns the angle last set by the client and then clears it (sets it to double.MinValue). The manual beam angle (in degrees) to be applied to DMO. Enumerates all sound capture (e.g.: microphone) devices in system. An enumeration of sound capture device metadata, where the metadata returned for each enumerated device is enough to uniquely identify capture device within system. Returns the device index corresponding to the default speaker for the system. An integer in range [0,{number of speaker devices}-1] representing the device index for the default speaker device. Finds the microphone index that matches the sensor associated with this audio source. The index of the matching microphone array device, if a matching device was found. null otherwise. Stops audio capture, if necessary, and disposes all resources used by the . Gets a reference to the DMO wrapper, used internally by the audio stream. Gets or sets microphone and speaker device indexes currently bound to DMO. Maps to the DMO property MFPKEY_WMAAECMA_DEVICE_INDEXES. Sets the index of microphone device associated with audio processing pipeline. Internally used to match the sensor to its audio device. Gets or sets a value indicating whether feature mode is turned on. ON by default. Maps to the DMO property MFPKEY_WMAAECMA_FEATURE_MODE. If feature mode is enabled, this in turn enables turning on DMO features such as noise suppression and acoustic gain control. Sets the microphone array beam forming mode. Requires FeatureMode set. _MIC_ARRAY_MODE.SingleBeam by default. Maps to the DMO property MFPKEY_WMAAECMA_FEATR_MICARR_MODE. Event that fires when the beam angle changes. Event that fires when the beam angle changes. Gets the smallest possible value for . Gets the largest possible value for . Gets the smallest possible value for . Gets the largest possible value for . Gets or sets the echo cancellation and suppression mode. Default is None (i.e.: echo cancellation and echo suppression are both turned off). Gets or sets the beam angle mode that determines how the beam angle is controlled. Default is Automatic. Gets the most recent sound source position observed, in degrees. This property gets updated continuously after calling Start(). Gets the most recent measurement of our confidence in the sound source position. This value is in the range [0,1], 1 being the highest possible confidence. This property gets updated continuously after calling Start(). Gets or sets index of speaker device used to identify the sound being produced by computer in order to perform echo cancellation. Gets or sets a value indicating whether Noise Suppression is enabled. ON by default. Maps to the DMO property MFPKEY_WMAAECMA_FEATR_NS. Gets or sets a value indicating whether Automatic Gain Control is enabled. OFF by default. Recommended for non-speech scenarios. Maps to the DMO property MFPKEY_WMAAECMA_FEATR_AGC. Gets the sound source angle that the audio array is currently focusing on, in degrees. Gets or sets manual Beam angle, in degrees. Only valid when is set to Manual. Beamforming mode for the microphone array. Values map to the values of DMO property MFPKEY_WMAAECMA_FEATR_MICARR_MODE. Single channel. Last 8 bits specify which channel to use - NOT USED. Simply sum all channels - NOT USED. Perform beamformer. Beam selected by internal source localizer. Perform beamformer. Always select the center beam - NOT USED. Perform beamformer. Beam selected externally by applications. Perform adaptive beamformer. Beam selected by internal source localizer. System mode for the microphone array echo cancellation pipeline. Values map to the values of DMO property MFPKEY_WMAAECMA_FEATR_SYSTEM_MODE. Audio data from microphone array will be streamed with NO AEC processing applied to it. Audio data from microphone array will be streamed with AEC processing applied to it. A Stream implementation to read data from the DMO output in a .NET friendly way. Status flag returned by IMediaObject::ProcessOutput. WASAPI error indicating that the specified capture device has become invalid. Number of milliseconds' worth of data to allocate to each buffer in buffer pool. Number of bytes to allocate to each buffer in buffer pool. Minimum number of milliseconds' worth of captured audio to keep in buffer pool. Maximum number of milliseconds' worth of captured audio to keep in buffer pool. Number of milliseconds' worth of additional data to be discarded when we hit the threshold for stale read data. The DMO buffers 0.1 seconds of mic data on the input, but some of it may already be making its way down the pipeline. Experimentally 250ms works best. Event used to let capture thread know when it should stop capturing audio data. that owns this stream. Pool of data buffers waiting to be used for audio capture. Queue of buffers with data pending to be read by stream client. Object used to synchronize multithreaded access to data capture/read buffers. Event used to wake up threads waiting to read from this stream. true if we've ever started to capture audio data through this stream instance. false otherwise. Audio capture thread. Current audio data buffer from which client will read data. Next data index within current audio data buffer from which client will read data. Number of bytes that have been read from this stream. true if we're actively capturing audio data. false otherwise. Timestamp of last time that client stopped reading data. Used in conjunction with _readStaleThreshold to detect if the reader stopped reading data. If so, we want to discard old data on the next read. If nothing is read for this amount of time, we assume that the client has purposefully stopped reading from stream, so we start with fresh data next time they request to read data. Exception, if any, encountered during capture thread execution. Initializes a new instance of the class. that owns the stream being created If there are no reads to the stream for longer than this threshold the DMO discards any buffered audio. This prevents stale data from being returned in scenarios such as speech recognition and dialog systems, when the consumption of audio samples may stop for a while. Pass TimeSpan.MaxValue to avoid hitting this threshold. Stops capture thread and truncates pending stream reads. Starts capture thread and prepares stream for reading. Resets tracking of stale data as if data had just been read, so that no data will be discarded until {now + readStaleThreshold}. Configure media type in media object and allocate streaming resources. to initialize. Get number of buffers appropriate to use in a write buffer pool that keeps track of the specified number of milliseconds' worth of buffer. Number of milliseconds in readStaleThreshold. See . Number of buffers in write buffer pool. Thread procedure for audio capture thread. UNUSED - Thread Procedure default parameter. This thread creates a DMO and calls it in a loop to get captured audio. Properties set on KinectAudioSource are read during the capture loop and applied to DMO. Thread handles audio device invalidation errors and generates a stream of silent audio until device becomes valid again. Enqueues the captured stream buffer into the data queue from which client will read stream. Buffer that was produced by audio capture operation. Gets a buffer from the write buffer pool, if possible. Otherwise it gets the oldest buffer from the read buffer queue. A buffer ready to be written-to. Frees a if it has been initialized. Handle to free. When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device. Unsupported in this implementation. Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. An array of bytes. When this method returns, the buffer contains the specified byte array with the values between and ( + - 1) replaced by the bytes read from the current source. The zero-based byte offset in at which to begin storing the data read from the current stream. The maximum number of bytes to be read from the current stream. The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. Release an individual read buffer, returning it to the write buffer pool. Buffer to release. Release all read buffers, returning them to the write buffer pool. Sets the position within the current stream. This implementation represents a live stream, so this method just returns the byte position relative to SeekOrigin.Current, without adjusting the actual stream position. Byte offset relative to SeekOrigin.Current. A value of type SeekOrigin indicating the reference point used to obtain the new position. Parameter value is ignored in this implementation. The new position within the current stream. When overridden in a derived class, sets the length of the current stream. Not supported in this implementation. The desired length of the current stream in bytes. When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. Not supported in this implementation. An array of bytes. This method copies bytes from to the current stream. The zero-based byte offset in at which to begin copying bytes to the current stream. The number of bytes to be written to the current stream. Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Gets the read buffer queue. Gets a value indicating whether the current stream supports reading. Gets a value indicating whether the current stream supports seeking. Gets a value indicating whether the current stream supports writing. Gets the length in bytes of the stream. Always returns -1 in this implementation. Gets or sets the position within the current stream. Set is unsupported in this implementation. Helper class that represents a data buffer used for capturing audio data and making it available for clients to read. Initializes a new instance of the class. Maximum number of bytes buffer can hold. Gets or sets number of bytes of valid data contained in buffer. Gets byte array containing buffer data. Helper class to keep track of audio beam and sound source angle changes during audio capture. Last observed value for beam angle. Last observed value for sound source angle. Last observed value for sound source confidence. that owns this . object used to get and set the audio beam angle. Initializes a new instance of the AudioAngleTracker class. that owns the new angle tracker. object used to get and set the audio beam angle. Track changes in beam angle and sound source position, triggering events for client as appropriate. Helper class to manage writing to the appropriate write buffer and queuing up data into the read queue when it's ready to be read by stream clients. Managed buffer that will receive data from native layer. that owns this . Initializes a new instance of the BufferManager class. that owns the new buffer manager. Write the specified data into the current write buffer, queuing write buffer into read queue if it gets full. Data to write into write buffer. Number of bytes to write. Write empty data (zeroes) into the current write buffer, queuing write buffer into read queue if it gets full. Number of bytes to write. Performs the specified write action, queuing write buffers into read queue as they get full. Number of bytes to write into current write buffer. Action to perform on current write buffer. Queues any data lingering in current write buffer into the read buffer queue, ready for client to read it. Managed wrapper for ETW code. This is the core provider responsible for the reports. This is EventDescriptor for the GetSegmentationBegin event. This is EventDescriptor for the GetSegmentationEnd event. This is EventDescriptor for the ProcessInputBufferBegin event. This is EventDescriptor for the ProcessInputBufferEnd event. This is EventDescriptor for the NotifyFrameReadyStart event. This is EventDescriptor for the NotifyFrameReadyEnd event. This is EventDescriptor for the ProcessFrameStart event. This is EventDescriptor for the ProcessFrameEnd event. This is EventDescriptor for the GetSkeletonsBegin event. This is EventDescriptor for the GetSkeletonsEnd event. This is EventDescriptor for the UnpackBayerStart event. This is EventDescriptor for the UnpackBayerEnd event. This is EventDescriptor for the FrameStart event. This is EventDescriptor for the FrameEnd event. This is EventDescriptor for the MapDepthFrameToColorFrameStart event. This is EventDescriptor for the MapDepthFrameToColorFrameEnd event. This is EventDescriptor for the MapDepthToColorImagePointStart event. This is EventDescriptor for the MapDepthToColorImagePointEnd event. This is EventDescriptor for the MapSkeletonPointToColorStart event. This is EventDescriptor for the MapSkeletonPointToColorEnd event. This is EventDescriptor for the MapSkeletonPointToDepthStart event. This is EventDescriptor for the MapSkeletonPointToDepthEnd event. This is EventDescriptor for the MapDepthToSkeletonPointStart event. This is EventDescriptor for the MapDepthToSkeletonPointEnd event. This is EventDescriptor for the ManagedNuiTransformDepthImageToSkeletonStart event. This is EventDescriptor for the ManagedNuiTransformDepthImageToSkeletonEnd event. This is EventDescriptor for the ManagedNuiTransformSkeletonToDepthImageStart event. This is EventDescriptor for the ManagedNuiTransformSkeletonToDepthImageEnd event. This is EventDescriptor for the NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolutionStart event. This is EventDescriptor for the NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolutionEnd event. This is EventDescriptor for the NuiImageGetColorPixelCoordinateFrameFromDepthPixelFrameAtResolutionStart event. This is EventDescriptor for the NuiImageGetColorPixelCoordinateFrameFromDepthPixelFrameAtResolutionEnd event. This is EventDescriptor for the NuiImageStreamOpenStart event. This is EventDescriptor for the NuiImageStreamOpenEnd event. This is EventDescriptor for the NuiImageStreamGetNextFrameStart event. This is EventDescriptor for the NuiImageStreamGetNextFrameEnd event. This is EventDescriptor for the NuiImageStreamReleaseFrameStart event. This is EventDescriptor for the NuiImageStreamReleaseFrameEnd event. This is EventDescriptor for the NuiInitializeStart event. This is EventDescriptor for the NuiInitializeEnd event. This is EventDescriptor for the AllFramesReady event. This is EventDescriptor for the ColorFrameReady event. This is EventDescriptor for the DepthFrameReady event. This is EventDescriptor for the SkeletonFrameReady event. This is EventDescriptor for the StopDeviceStart event. This is EventDescriptor for the StopDeviceEnd event. This is EventDescriptor for the SingleStreamStopStart event. This is EventDescriptor for the SingleStreamStopEnd event. This is EventDescriptor for the DetectGenuineDeviceStart event. This is EventDescriptor for the DetectGenuineDeviceEnd event. This is EventDescriptor for the CreateDeviceStart event. This is EventDescriptor for the CreateDeviceEnd event. This is EventDescriptor for the ReEnumerateDevicesStart event. This is EventDescriptor for the ReEnumerateDevicesEnd event. This is EventDescriptor for the OutputStreamInitStart event. This is EventDescriptor for the OutputStreamInitEnd event. This is EventDescriptor for the SingleStreamStartStart event. This is EventDescriptor for the SingleStreamStartEnd event. This is EventDescriptor for the SkeletalTrackerInitializeStart event. This is EventDescriptor for the SkeletalTrackerInitializeEnd event. This is EventDescriptor for the KinectSensorInitializeStart event. This is EventDescriptor for the KinectSensorInitializeEnd event. This is EventDescriptor for the SkeletonStageBGRStart event. This is EventDescriptor for the SkeletonStageBGREnd event. This is EventDescriptor for the SkeletonStageCDRPStart event. This is EventDescriptor for the SkeletonStageCDRPEnd event. This is EventDescriptor for the SkeletonStageHeadDetectorStart event. This is EventDescriptor for the SkeletonStageHeadDetectorEnd event. This is EventDescriptor for the SkeletonStageExemplarStart event. This is EventDescriptor for the SkeletonStageExemplarEnd event. This is EventDescriptor for the SkeletonStageCentroidsStart event. This is EventDescriptor for the SkeletonStageCentroidsEnd event. This is EventDescriptor for the SkeletonStageModelFittingStart event. This is EventDescriptor for the SkeletonStageModelFittingEnd event. This is EventDescriptor for the FrameRequestDropped event. This is EventDescriptor for the UnexpectedFrameRequestError event. This is EventDescriptor for the FrameStateChanged event. This is EventDescriptor for the FrameDropped event. This is EventDescriptor for the NuiInitializeInfo event. This is EventDescriptor for the NuiImageStreamOpenInfo event. This is EventDescriptor for the NuiShutdownTrace event. This is EventDescriptor for the InternalNuiShutdownTrace event. This is EventDescriptor for the NuiSkeletonTrackingEnableTrace event. This is EventDescriptor for the NuiSkeletonTrackingDisableTrace event. This is EventDescriptor for the NuiTransformSmoothInfo event. This is EventDescriptor for the NuiSkeletonSetTrackedSkeletonsInfo event. This is EventDescriptor for the NuiSetFrameEndEventInfo event. This is EventDescriptor for the NuiImageStreamGetNextFrameInfo event. This is EventDescriptor for the NuiSkeletonGetNextFrameInfo event. This is EventDescriptor for the NuiDeviceConnectionIdInfo event. This is EventDescriptor for the NuiUniqueIdInfo event. This is EventDescriptor for the NuiCreateSensorByIndexInfo event. This is EventDescriptor for the NuiCreateSensorByIdInfo event. This is EventDescriptor for the NuiImageStreamSetImageFrameFlagsInfo event. This is EventDescriptor for the NuiAudioBeamGetBeamInfo event. This is EventDescriptor for the NuiAudioBeamGetPositionInfo event. This is EventDescriptor for the NuiAudioBeamSetBeamInfo event. This is EventDescriptor for the NuiGetAudioSourceInfo event. This is EventDescriptor for the AudioDmoSetPropertyInfo event. This is EventDescriptor for the ManagedKinectSensorStartInfo event. This is EventDescriptor for the ManagedImageStreamDisabledInfo event. This is EventDescriptor for the ManagedFrameReadyEventAddedInfo event. This is EventDescriptor for the ManagedFrameReadyEventRemovedInfo event. This is EventDescriptor for the ManagedOpenNextFrameInfo event. This is EventDescriptor for the ManagedOpenFrameFromEventInfo event. This is EventDescriptor for the ManagedOpenFrameFromAllFramesEventInfo event. This is EventDescriptor for the ManagedAllFramesReadyEventAddedInfo event. This is EventDescriptor for the ManagedAllFramesReadyEventRemovedInfo event. This is EventDescriptor for the MapColorFrameToDepthFrameStart event. This is EventDescriptor for the MapColorFrameToDepthFrameEnd event. This is EventDescriptor for the MapColorFrameToDepthFrame_InterpolateGapsStart event. This is EventDescriptor for the MapColorFrameToDepthFrame_InterpolateGapsEnd event. This is EventDescriptor for the MapColorFrameToSkeletonFrameStart event. This is EventDescriptor for the MapColorFrameToSkeletonFrameEnd event. This is EventDescriptor for the MapDepthFrameToSkeletonFrameStart event. This is EventDescriptor for the MapDepthFrameToSkeletonFrameEnd event. Initializes static members of the KinectEtwProvider class. This is the event method for GetSegmentationBegin. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for GetSegmentationEnd. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for ProcessInputBufferBegin. This method returns true if succeeded, and false otherwise. This is the event method for ProcessInputBufferEnd. This method returns true if succeeded, and false otherwise. This is the event method for NotifyFrameReadyStart. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for NotifyFrameReadyEnd. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for ProcessFrameStart. The frameOverlapId parameter. The streamId parameter. This method returns true if succeeded, and false otherwise. This is the event method for ProcessFrameEnd. The frameOverlapId parameter. The streamId parameter. This method returns true if succeeded, and false otherwise. This is the event method for GetSkeletonsBegin. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for GetSkeletonsEnd. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for UnpackBayerStart. This method returns true if succeeded, and false otherwise. This is the event method for UnpackBayerEnd. This method returns true if succeeded, and false otherwise. This is the event method for FrameStart. The streamType parameter. The bufferIndex parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for FrameEnd. The streamType parameter. The bufferIndex parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for MapDepthFrameToColorFrameStart. This method returns true if succeeded, and false otherwise. This is the event method for MapDepthFrameToColorFrameEnd. This method returns true if succeeded, and false otherwise. This is the event method for MapDepthToColorImagePointStart. This method returns true if succeeded, and false otherwise. This is the event method for MapDepthToColorImagePointEnd. This method returns true if succeeded, and false otherwise. This is the event method for MapSkeletonPointToColorStart. This method returns true if succeeded, and false otherwise. This is the event method for MapSkeletonPointToColorEnd. This method returns true if succeeded, and false otherwise. This is the event method for MapSkeletonPointToDepthStart. This method returns true if succeeded, and false otherwise. This is the event method for MapSkeletonPointToDepthEnd. This method returns true if succeeded, and false otherwise. This is the event method for MapDepthToSkeletonPointStart. This method returns true if succeeded, and false otherwise. This is the event method for MapDepthToSkeletonPointEnd. This method returns true if succeeded, and false otherwise. This is the event method for ManagedNuiTransformDepthImageToSkeletonStart. This method returns true if succeeded, and false otherwise. This is the event method for ManagedNuiTransformDepthImageToSkeletonEnd. This method returns true if succeeded, and false otherwise. This is the event method for ManagedNuiTransformSkeletonToDepthImageStart. This method returns true if succeeded, and false otherwise. This is the event method for ManagedNuiTransformSkeletonToDepthImageEnd. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolutionStart. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolutionEnd. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageGetColorPixelCoordinateFrameFromDepthPixelFrameAtResolutionStart. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageGetColorPixelCoordinateFrameFromDepthPixelFrameAtResolutionEnd. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageStreamOpenStart. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageStreamOpenEnd. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageStreamGetNextFrameStart. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageStreamGetNextFrameEnd. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageStreamReleaseFrameStart. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageStreamReleaseFrameEnd. This method returns true if succeeded, and false otherwise. This is the event method for NuiInitializeStart. This method returns true if succeeded, and false otherwise. This is the event method for NuiInitializeEnd. This method returns true if succeeded, and false otherwise. This is the event method for AllFramesReady. The colorFrameTimestamp parameter. The depthFrameTimestamp parameter. The skeletonFrameTimestamp parameter. This method returns true if succeeded, and false otherwise. This is the event method for ColorFrameReady. The timestamp parameter. This method returns true if succeeded, and false otherwise. This is the event method for DepthFrameReady. The timestamp parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonFrameReady. The timestamp parameter. This method returns true if succeeded, and false otherwise. This is the event method for StopDeviceStart. This method returns true if succeeded, and false otherwise. This is the event method for StopDeviceEnd. This method returns true if succeeded, and false otherwise. This is the event method for SingleStreamStopStart. The streamType parameter. This method returns true if succeeded, and false otherwise. This is the event method for SingleStreamStopEnd. This method returns true if succeeded, and false otherwise. This is the event method for DetectGenuineDeviceStart. This method returns true if succeeded, and false otherwise. This is the event method for DetectGenuineDeviceEnd. This method returns true if succeeded, and false otherwise. This is the event method for CreateDeviceStart. This method returns true if succeeded, and false otherwise. This is the event method for CreateDeviceEnd. This method returns true if succeeded, and false otherwise. This is the event method for ReEnumerateDevicesStart. This method returns true if succeeded, and false otherwise. This is the event method for ReEnumerateDevicesEnd. This method returns true if succeeded, and false otherwise. This is the event method for OutputStreamInitStart. This method returns true if succeeded, and false otherwise. This is the event method for OutputStreamInitEnd. This method returns true if succeeded, and false otherwise. This is the event method for SingleStreamStartStart. The streamType parameter. This method returns true if succeeded, and false otherwise. This is the event method for SingleStreamStartEnd. This method returns true if succeeded, and false otherwise. This is the event method for SkeletalTrackerInitializeStart. This method returns true if succeeded, and false otherwise. This is the event method for SkeletalTrackerInitializeEnd. This method returns true if succeeded, and false otherwise. This is the event method for KinectSensorInitializeStart. This method returns true if succeeded, and false otherwise. This is the event method for KinectSensorInitializeEnd. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageBGRStart. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageBGREnd. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageCDRPStart. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageCDRPEnd. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageHeadDetectorStart. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageHeadDetectorEnd. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageExemplarStart. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageExemplarEnd. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageCentroidsStart. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageCentroidsEnd. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageModelFittingStart. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for SkeletonStageModelFittingEnd. The streamId parameter. The width parameter. The height parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for FrameRequestDropped. This method returns true if succeeded, and false otherwise. This is the event method for UnexpectedFrameRequestError. This method returns true if succeeded, and false otherwise. This is the event method for FrameStateChanged. The streamType parameter. The frameNumber parameter. The state parameter. This method returns true if succeeded, and false otherwise. This is the event method for FrameDropped. The streamType parameter. The frameNumber parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiInitializeInfo. The deviceId parameter. The processName parameter. The flags parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageStreamOpenInfo. The hStream parameter. The imageType parameter. The imageResolution parameter. The imageFrameFlags parameter. The hNextFrameEvent parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiShutdownTrace. This method returns true if succeeded, and false otherwise. This is the event method for InternalNuiShutdownTrace. This method returns true if succeeded, and false otherwise. This is the event method for NuiSkeletonTrackingEnableTrace. The hNextFrameEvent parameter. The dwFlags parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiSkeletonTrackingDisableTrace. This method returns true if succeeded, and false otherwise. This is the event method for NuiTransformSmoothInfo. The smoothing parameter. The correction parameter. The prediction parameter. The jitterRadius parameter. The maxDeviationRadius parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiSkeletonSetTrackedSkeletonsInfo. The skeleton1 parameter. The skeleton2 parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiSetFrameEndEventInfo. The hEvent parameter. The dwFrameEventFlag parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageStreamGetNextFrameInfo. The hStream parameter. The dwMillisecondsToWait parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiSkeletonGetNextFrameInfo. The dwMillisecondsToWait parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiDeviceConnectionIdInfo. The kinectId parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiUniqueIdInfo. The kinectId parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiCreateSensorByIndexInfo. The index parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiCreateSensorByIdInfo. The strInstanceId parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiImageStreamSetImageFrameFlagsInfo. The hStream parameter. The dwImageFrameFlags parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiAudioBeamGetBeamInfo. The dAngle parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiAudioBeamGetPositionInfo. The dAngle parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiAudioBeamSetBeamInfo. The dAngle parameter. This method returns true if succeeded, and false otherwise. This is the event method for NuiGetAudioSourceInfo. This method returns true if succeeded, and false otherwise. This is the event method for AudioDmoSetPropertyInfo. The pid parameter. The value parameter. This method returns true if succeeded, and false otherwise. This is the event method for ManagedKinectSensorStartInfo. The deviceID parameter. This method returns true if succeeded, and false otherwise. This is the event method for ManagedImageStreamDisabledInfo. The type parameter. This method returns true if succeeded, and false otherwise. This is the event method for ManagedFrameReadyEventAddedInfo. The type parameter. This method returns true if succeeded, and false otherwise. This is the event method for ManagedFrameReadyEventRemovedInfo. The type parameter. This method returns true if succeeded, and false otherwise. This is the event method for ManagedOpenNextFrameInfo. The streamType parameter. The millisecondsWait parameter. This method returns true if succeeded, and false otherwise. This is the event method for ManagedOpenFrameFromEventInfo. The type parameter. This method returns true if succeeded, and false otherwise. This is the event method for ManagedOpenFrameFromAllFramesEventInfo. The type parameter. This method returns true if succeeded, and false otherwise. This is the event method for ManagedAllFramesReadyEventAddedInfo. This method returns true if succeeded, and false otherwise. This is the event method for ManagedAllFramesReadyEventRemovedInfo. This method returns true if succeeded, and false otherwise. This is the event method for MapColorFrameToDepthFrameStart. This method returns true if succeeded, and false otherwise. This is the event method for MapColorFrameToDepthFrameEnd. This method returns true if succeeded, and false otherwise. This is the event method for MapColorFrameToDepthFrame_InterpolateGapsStart. This method returns true if succeeded, and false otherwise. This is the event method for MapColorFrameToDepthFrame_InterpolateGapsEnd. This method returns true if succeeded, and false otherwise. This is the event method for MapColorFrameToSkeletonFrameStart. This method returns true if succeeded, and false otherwise. This is the event method for MapColorFrameToSkeletonFrameEnd. This method returns true if succeeded, and false otherwise. This is the event method for MapDepthFrameToSkeletonFrameStart. This method returns true if succeeded, and false otherwise. This is the event method for MapDepthFrameToSkeletonFrameEnd. This method returns true if succeeded, and false otherwise. This is a local wrapper for the EventProvider. Initializes a new instance of the EventProviderVersionTwo class. The guid of the provider. This method determines if it needs to write the event. The event description to write. This returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the FrameData template. The event description. The value for the streamId parameter. The value for the width parameter. The value for the height parameter. The value for the frameNumber parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the ProcessFrameData template. The event description. The value for the frameOverlapId parameter. The value for the streamId parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the FrameLifecycleData template. The event description. The value for the streamType parameter. The value for the bufferIndex parameter. The value for the frameNumber parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the AllFramesReadyData template. The event description. The value for the colorFrameTimestamp parameter. The value for the depthFrameTimestamp parameter. The value for the skeletonFrameTimestamp parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the FrameReadyData template. The event description. The value for the timestamp parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the StreamTypeOnly template. The event description. The value for the streamType parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the FrameStateData template. The event description. The value for the streamType parameter. The value for the frameNumber parameter. The value for the state parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the FrameDroppedData template. The event description. The value for the streamType parameter. The value for the frameNumber parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the NuiImageStreamOpenData template. The event description. The value for the hStream parameter. The value for the imageType parameter. The value for the imageResolution parameter. The value for the imageFrameFlags parameter. The value for the hNextFrameEvent parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the NuiInitializeData template. The event description. The value for the deviceId parameter. The value for the processName parameter. The value for the flags parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the NuiSkeletonTrackingData template. The event description. The value for the hNextFrameEvent parameter. The value for the dwFlags parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the NuiTransformSmoothParams template. The event description. The value for the smoothing parameter. The value for the correction parameter. The value for the prediction parameter. The value for the jitterRadius parameter. The value for the maxDeviationRadius parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the NuiSkeletonSetTrackedSkeletonsData template. The event description. The value for the skeleton1 parameter. The value for the skeleton2 parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the NuiSetFrameEndEventData template. The event description. The value for the hEvent parameter. The value for the dwFrameEventFlag parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the NuiImageStreamGetNextFrameData template. The event description. The value for the hStream parameter. The value for the dwMillisecondsToWait parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the NuiSkeletonGetNextFrameData template. The event description. The value for the dwMillisecondsToWait parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the KinectIdStringData template. The event description. The value for the kinectId parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the NuiCreateSensorByIndexData template. The event description. The value for the index parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the NuiCreateSensorByIdData template. The event description. The value for the strInstanceId parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the NuiImageStreamSetImageFrameFlagsData template. The event description. The value for the hStream parameter. The value for the dwImageFrameFlags parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the AudioAngleData template. The event description. The value for the dAngle parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the AudioPropertyData template. The event description. The value for the pid parameter. The value for the value parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the ManagedFramesReadyRegistrationData template. The event description. The value for the type parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the ManagedImageStreamData template. The event description. The value for the type parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the ManagedOpenNextFrameData template. The event description. The value for the streamType parameter. The value for the millisecondsWait parameter. This method returns true if successful, and false otherwise. This method is a wrapper to marshal the data into the event for the KinectSensorStartData template. The event description. The value for the deviceID parameter. This method returns true if successful, and false otherwise. This struct is used to marshal data into the native ETW service. The event data's data pointer. The event data size. This field is reserverd. Wrapper of a native filter to be applied to depth frame data. Processes a frame of depth data. Timestamp of the depth frame. Width of the depth frame, in pixels. Height of the depth frame, in pixels. Depth frame data. true if the depth frame was modified; false otherwise. Gets or sets the native depth filter interface. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to A bad index or id was used when referencing a Kinect sensor.. Looks up a localized string similar to This API cannot be called when an event listener has been set.. Looks up a localized string similar to The capture has already been started. Looks up a localized string similar to The capture has not been started. Looks up a localized string similar to The Color Stream must be Enabled to get next Color image frame. Call KinectSensor.ColorStream.Enable(). Looks up a localized string similar to Depth filter must implement the native INuiDepthFilter interface. Looks up a localized string similar to This Depth Stream must be Enabled to get next Depth image frame. Call KinectSensor.DepthStream.Enable(). Looks up a localized string similar to The attached Kinect device is not genuine.. Looks up a localized string similar to The attached Kinect device is not supported.. Looks up a localized string similar to Elevation angle must be between Elevation Minimum/Maximum. Looks up a localized string similar to Native DLL failed in get device name. Looks up a localized string similar to This API has returned an exception from an HRESULT: 0x{0:X}. Looks up a localized string similar to The feature is not supported by this version of the hardware. Looks up a localized string similar to The specified Image Format is not supported.. Looks up a localized string similar to Warning: An ImageFrame instance was not Disposed.. Looks up a localized string similar to JointType index value must match Joint.JointType. Looks up a localized string similar to Unexpected value for BeamAngleMode. Looks up a localized string similar to Unexpected value for EchoCancellationMode. Looks up a localized string similar to Kinect is already in use in another process.. Looks up a localized string similar to Kinect must be running to control the motor. Looks up a localized string similar to Kinect is not ready. Looks up a localized string similar to The Kinect sensor plugged into your computer is for use on the Xbox 360. You may continue using your Xbox 360 Kinect sensor on your computer for development purposes. Microsoft does not guarantee full compatibility for Kinect for Windows applications and the Xbox 360 Kinect Sensor.. Looks up a localized string similar to The Kinect sensor plugged into your computer is for use on the Xbox 360. To run a Kinect for Windows application, you must plug in a Kinect for Windows sensor.. Looks up a localized string similar to NativeStreamHandle can't be Zero. Looks up a localized string similar to Feature mode needs to be set to True before setting this property. Looks up a localized string similar to Could not find a Kinect audio device. Looks up a localized string similar to The operation is not supported. Looks up a localized string similar to The data buffer length must match the length required by the associated ImageFormat.. Looks up a localized string similar to KinectSensor must be running to get next frame. Call KinectSensor.Start(). Looks up a localized string similar to KinectSensor must be running in order to start audio stream. Looks up a localized string similar to The data buffer must have length equal to SkeletonArrayLength.. Looks up a localized string similar to SkeletonEngine must be Enabled to get next skeleton frame. Call KinectSensor.SkeletonEngine.Enable(). Looks up a localized string similar to Warning: A SkeletonFrame instance was not Disposed.. Looks up a localized string similar to Could not access the hardware. Looks up a localized string similar to Unexpected depth range. Looks up a localized string similar to Unexpected UniqueDeviceName format. Event data for the StatusChanged event. Initializes a new instance of the StatusChangedEventArgs class. Internal ctor to prevent external creation. Gets the reported status for the sensor. Gets the sensor that has changed status. Internal class for arguments passed from NuiSensor. Gets or sets the device instance id for the sensor hub. Gets or sets the device instance id for the sensor camera. Gets or sets the mapped status for the sensor. Represents the collection of all Kinect™ sensors on the host. Lock for the sensor collection. List of acitve sensors. This must be a ThreadSafeList because the base class (ReadOnlyCollection) may want to access it while s_sensorsLock is locked. Static instance of this collection. List of all sensors. Not all are active. Caches native callback delegate to ensure it does not get garbage collected. Called whenever a kinect changes status. Prevents a default instance of the KinectSensorCollection class from being created. Initializes a new instance of this collection. Singleton accessor or KinectSensorCollection. Creates KinectSensor objects for all native INuiSensors. The singleton instance of this class. Callback function for getting status notifications from native. HRESULT status from the sensor. Sensor hub device instance id. Sensor camera device instance id. May be null. User data for the callback. Always null for this callback. Fires the StatusChanged event. InternalStatusChangedEventArgs object. Updates the list of active sensors to contain all sensors that are connected. Removes a sensor from the list, allowing the sensor object to be recreated. KinectSensor to be removed. Name of sensor to recreate. IDisposable.Dispose implementation. Gets the static instance of this collection. Called whenever a kinect changes status. Sent from KinectSensorCollection. Returns a sensor based on the DeviceConnectionId or UniqueKinectId. Can pass in either the value from KinectSensor.DeviceConnectionId or KinectSensor.UniqueKinectId. The sensor associated with the given id. Keep in sync with _NUI_IMAGE_TYPE. Depth and Player. Color only. Color in YUV format. Color in YUV RAW format. Depth only. Infrared only. Color in 8-bit Bayer format. Keep in sync with _NUI_IMAGE_RESOLUTION. Default or invalid. 80x60 resolution. 320x240 resolution. 640x480 resolution. 1280x960 resolution. This MUST match the values defined in NUIImageCamera.h. Empty value. Depth frame was captured in near mode. This MUST match the values defined in NUIImageCamera.h. Empty value. Return S_FALSE instead of E_NUI_FRAME_NO_DATA if NuiImageStreamGetNextFrame( ) doesn't have a frame ready and a timeout != INFINITE is used. Set the depth stream to near mode. Use distinct values for depth values that are either too close, too far or unknown. The abstract ImageStream class. Initializes a new instance of the ImageStream class. The related sensor. The ImageStreamFlags. Used to indicate of a new frame is ready. Indicates of the stream is capturing. The native stream handle. The current ImageStreamFlags. The lock object used for synchronizing access to the stream. Enable the stream. Disable the stream. Starts the stream. Stops the stream. Populates the FrameWidth and FrameHeight values. Sets the width and height based on the given resolution. The resolution. The width. The height. Looks up the number of bytes per pixel. The image type. The number of bytes per pixel. Opens the stream. Closes the stream. Override in base classes to store the pixel data during the window when it's available from native code. The frameNumber of the pixel data. The native description of the pixel data. The ImageType of the pixels. The Resolution of the pixels. The native stream handle. The native image frame. Retrieves the next frame from the sensor, and calls the abstract method "StorePixels" with the data, if present. This allows the derived ImageStream classes to store the data. Time to wait for a new frame from the sensor, in milliseconds. The frameNumber of the new frame. The timestamp of the new frame. The frame flags of the new frame. Returns true if the new frame was available, false otherwise. Disposes the stream. Gets the width in pixels of each ImageFrame from this ImageStream. Gets the height in pixels of each ImageFrame from this ImageStream. Gets or sets the bytes per pixel of each ImageFrame from this ImageStream. Gets or sets the total length of the pixel data buffer of each ImageFrame from this ImageStream. Gets the associated sensor. Gets the buffer count. Gets or sets the image resolution. Gets the image type. Gets a value indicating whether the ImageStream is enabled. Gets or sets the ImageStreamFlags. Native API declarations from Kinect10.dll and KinectAudio10.dll. Success HRESULT code. Sets a callback function that gets notified when the sensor connection status changes. Use this method to handle the case of a user connecting or disconnecting a Kinect sensor. Function pointer to the callback function. Pointer to optional context data that will be passed to the callback. Gets device information for the connected Kinect sensors. Pointer to an array of NUI_MICROPHONE_ARRAY_DEVICE structures, allocated by the caller, each of which receives the device information for a single connected Kinect sensor. If you set this parameter to NULL, the piDeviceCount parameter will still receive the number of connected Kinect sensors. Size of the array pointed to by the pDeviceInfo parameter. Receives the number of connected Kinect sensors. When this function returns, this parameter is set to the number of structures in the array pointed to by the pDeviceInfo parameter that contain valid information. Gets the active speaker devices found on the system. Pointer to an array of NUI_SPEAKER_DEVICE structures, allocated by the caller, each of which receives the device information for a single connected speaker device. If you set this parameter to NULL, the piDeviceCount parameter will still receive the number of connected speaker devices. Size of the array pointed to by the pDeviceInfo parameter. Receives the number of connected speaker devices. When this function returns, this parameter is set to the number of structures in the array pointed to by the pDeviceInfo parameter that contain valid information. Gets the number of kinects on the machine, including disconnected ones. Pointer to an integer in which to return the number of Kinect sensors. Returns S_OK if successful; otherwise, returns a failure code. Creates an instance of the Kinect sensor with the specified index so that an application can open and use it. Applications that support more than one Kinect sensor call NuiCreateSensorByIndex to access the second and subsequent devices. This function returns a pointer to an INuiSensor interface, which provides functions that are identical to those in NuiApi.h, NuiImageCamera.h, and NuiSkeleton.h., but operate on a particular device instance. The zero-based index of the Kinect sensor to open. Valid values range from zero to one less than the value returned by the NuiGetSensorCount function. A pointer that receives a reference to the created INuiSensor interface. Returns S_OK if successful; otherwise, returns one of the failure codes in the following table. E_OUTOFMEMORY - The maximum number of Kinect sensors are already open. E_POINTER - The ppNuiSensor parameter does not represent a valid address. Creates an instance of the Kinect sensor with the specified ID so that an application can open and use it. Applications that support more than one Kinect sensor call NuiCreateSensorById to access the second and subsequent devices. This function returns a pointer to an INuiSensor interface, which provides functions that are identical to those in NuiApi.h, NuiImageCamera.h, and NuiSkeleton.h., but operate on a particular device instance. A pointer to the ID of the Kinect sensor to open. A pointer that receives a reference to the created INuiSensor interface. Returns S_OK if successful; otherwise, returns one of the failure codes in the following table. E_OUTOFMEMORY - The maximum number of Kinect sensors are already open. E_POINTER - The ppNuiSensor parameter does not represent a valid address. Associates the calling thread with the specified task. The name of the task to be performed. This name must match the name of one of the subkeys of the following key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks. The unique task identifier. The first time this function is called, this value must be 0 on input. The index value is returned on output and can be used as input in subsequent calls. If the function succeeds, it returns a handle to the task. If the function fails, it returns 0. To retrieve extended error information, call GetLastError. Indicates that a thread is no longer performing work associated with the specified task. A handle to the task. This handle is returned by the AvSetMmThreadCharacteristics or AvSetMmMaxThreadCharacteristics function. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. This function must be called from the same thread that called the AvSetMmThreadCharacteristics or AvSetMmMaxThreadCharacteristics function to create the handle. Otherwise, the function will fail. Utility to retrieve the address of gFailureStack in Kinect10.dll to allow inspection of the failure "flight recorder". The address of Kinect10!gFailureStack as a UInt64. In 32 bit, only the lower 4 bytes are used. Calculate Bone Orientations. Pointer to the skeleton data to calculate joint angles for. Pointer to an array of _NUI_SKELETON_BONE_ORIENTATION of dimension NUI_SKELETON_POSITION_COUNT (20). This array must be allocated by the user before calling this function. Returns S_OK if successful; otherwise, returns one of the failure codes in the following table. E_INVALIDARG - The parameter is NULL. E_POINTER - The parameter is NULL. S_FALSE - The joints required to calculate the skeleton root are not visible. Hierarchical bone rotations are set to Identity. Declaration of native NuiStatusCallback typedef. HRESULT status from the sensor. Sensor hub device instance id. Sensor camera device instance id. May be null. User data registered with NuiSetDeviceStatusCallback. A structure used by NuiGetMicrophoneArrayDevices to return the Kinect sensors found on the system. Maximum length for device friendly name. The device friendly name. Device unique identifier. This device index can be passed to KinectAudioSource.MicrophoneIndex. A structure used by NuiGetSpeakerDevices to get the number of speaker devices. String length for speaker device name. The device friendly name. This device index can be passed to KinectAudioSource.SpeakerIndex. A Boolean value that indicates whether the speaker device is the default. Status of the KinectSensor. The status is undefined. USB unplugged or device not found. Kinect is fully connected and ready to use. The device has been attached and is initializing. The device returned an unexpected error. Audio not found. Device likely unpowered. Some part of the devices is not connected. This device is not a genuine Kinect. This device is not supported. There is not enough bandwidth on the USB hub. A Disposable wrapper for a ReaderWriterLockSlim, which provides for easy scoped locking via a using block. Also provides Write Upgrade functionality. Lockable object to lock and unlock. Desired lock mode. Initializes a new instance of the AutoLock struct. Enters the desired lock mode on the given lock. Lock the given lock. Lock mode to start with. If mode is upgradable, this may change. Upgrades the lock from UpgradableRead to Write. New AutoLock object with write lock. Unlocks the given lock and sets the LockMode to none. Kind of lock you need. No lock is desired. A Read lock is desired. A Read lock that may be upgraded to Write lock is desired. A Write lock is desired. AutoLock extensions for ReaderWriterLockSlim. Returns a read AutoLock on the given lock. Slim to act upon. New AutoLock object. Returns an upgradable AutoLock for the given lock. Slim to act upon. New AutoLock object. Returns an write AutoLock for the given lock. Slim to act upon. New AutoLock object. A Microsoft Kinect™ sensor. Index of color FrameStateHelper in the _frameHelpers array. Index of depth FrameStateHelper in the _frameHelpers array. Index of skeletal FrameStateHelper in the _frameHelpers array. This is an pointer to the internal debug stack that is used for diagnosing failures within the Kinect runtime. We would like to use the _initLock for multi-reader/single writer access to this class. Unfortunately, ReaderWriterLockSlim must itself be Disposed, meaning that we need a thread-safe means to detect Disposal. So, we use a normal lock to check the IsDisposed state and acquire the _initLock, which allows us to spend most of the time under the R/W lock rather than the full lock. To ensure safe use of these locks, _initLock must always be acquired under a held _disposeLock, and _disposeLock must never be acquired under _initLock. Lock for disposing the sensor. The KinectAudioSource object. True if the unsupported message has been written to the debug stream. Initializes a new instance of the KinectSensor class with the given INuiSensor. Note that there should be ONLY one KinectSensor object per INuiSensor. INuiSensor to wrap. Replace the NuiSensor with another one. Used when a user plugs a sensor into a different USB port. New nuiSensor to wrap. Creates the stream objects for this sensor. Non-locking version of UniqueKinectId. The camera device instance id. Provides the USB hub device instance id. Non-locking. USB hub device instance id. Non-locking version of Status property. The status of the sensor. Maps the NuiStatus HRESULT to a KinectStatus. The HRESULT to map. Mapped KinectStatus. The last status found for this sensor. Event that fires when a new depth frame is available from this Kinect sensor. Event that fires when a new color frame is available from this Kinect sensor. Event that fires when a new skeleton frame is available from this Kinect sensor. Event that fires when new frames are available from each of this Kinect sensor's active streams. Privately cached reference to the associated CoordinateMapper object for the sensor. Tests whether the DepthImagePixel has a known value. The DepthImagePixel to test. Returns true if the DepthImagePixel has a known value, false otherwise. Tests whether the ColorImagePoint has a known value. The ColorImagePoint to test. Returns true if the ColorImagePoint has a known value, false otherwise. Tests whether the DepthImagePoint has a known value. The DepthImagePoint to test. Rreturns false if depth value == 0. Tests whether the SkeletonPoint has a known value. The SkeletonPoint to test. Returns true if the Skeleton point has a known value, false otherwise. Gets the current accelerometer reading of the Kinect sensor. A Vector4 pointing in the directon of gravity. The accelerometer reading is returned as a 3d vector pointing in the direction of gravity (i.e. floor (gravity) on a non-accelerating sensor). The unit of the vector is in gravity units (g), 9.81m/s^2. The coordinate system is centered on the sensor, right-handed coordinate system with positive-Z in the direction the sensor is pointing at. In the default sensor rotation (horizontal, level placement), this will return the vector (0, -1.0, 0, 0). The w value of the Vector4 is always set to 0.0. Maps from a depth coordinate with depth value to color coordinates. The depth format of the source. The X coordinate of the depth frame. The Y coordinate of the depth frame. The value from the depth frame's pixel data at the given coordinates (depthX, depthY). The desired target image format. The ColorImagePoint corresponding to the point in DepthImage space. Maps every point in a depth frame to the corresponding location in a ColorImageFormat coordinate space. The depth format of the source. The depth frame pixel data, as retrieved from DepthImageFrame.CopyPixelDataTo. Must be equal in length to Width*Height of the depth format specified by depthImageFormat. The desired target image format. The ColorImagePoint array to receive the data. Each element will be be the result of mapping the corresponding depthPixelDatum to the specified ColorImageFormat coordinate space. Must be equal in length to depthPixelData. Looks up the color frame coordinates for a given skeleton point. The supplied skeleton point. The color format to convert to. The ColorImagePoint corresponding to the given skeleton point. Looks up the depth frame coordinates for a given skeleton point. The supplied skeleton point. The depth format to convert to. The DepthImagePoint that contains the X, Y and depth value of the given skeleton point. Looks up the skeleton point location of the given depth X, Y. The format to use in the conversion. The X coordinate of the depth frame. The Y coordinate of the depth frame. The value from the depth frame's pixel data at the given coordinates (depthX, depthY). The skeleton point for the given X, Y, depth and format. Based off the function NuiTransformDepthImageToSkeleton from NuiSkeleton.h, which is inline so it is neither directly possible nor is it performant to p-invoke it from managed. X coordinate from the depth image. Y coordinate from the depth image. Depth value from the depth image. A Vector indicating the point on the skeleton corresponding to the depth pixel. Based off the function NuiTransformSkeletonToDepthImage from NuiSkeleton.h, which is inline so it is neither directly possible nor is it performant to p-invoke it from managed. Vector from skeleton to transform. Resulting X coordinate for skeleton point. Resulting Y coordinate for skeleton point. Resulting depth value for skeleton point. Event indiating that the thread should exit. NOTE: moved from constructor to inside Initialize so that we can reuse this object after unInitialize. Array of FrameStateHelpers for all frames. Options desired for the sensor. Options requested from the sensor. Start streaming data from this Kinect. This needs to be called whether polling or registering for the events. It also needs to be called to get control of the Camera. This API may throw System.IO.IOException if the KinectSensor is already in use by another process. Stop streaming data from this Kinect. This method is used by the SkeletonStream to inform the sensor that it wants the skeleton engine running. This will re-call Initialize to fire up or shut down the skeleton engine if needed. Indicates if the skeletal engine is should be turned on or off. Calls NuiInitialize with the desired options. Must be called under a _initLock in Write mode. Must not be called if IsRunningInternal is true. The desired optoins. Must be called under a _initLock in Write mode. Must not be called if IsRunningInternal is false. The frame processing background thread. Frame processing thread procedure. ManualResetEvent tripped when the thread should exit. Pulls a depth frame out of the NUI pipeline, if available. Pulls a color frame out of the NUI pipeline, if available. Pulls a skeletal frame out of the NUI pipeline, if available. Frees all memory associated with the sensor. Terminates all streaming. Throws an ObjectDisposedException if this instance is diposed. If this instance is not disposed, will return an AutoLock entered for Read. The read lock. Throws an ObjectDisposedException if this instance is diposed. If this instance is not disposed, will return an AutoLock entered for UpgradeableRead. The upgradable lock. Thrown if the object is disposed. Throws an ObjectDisposedException if this instance is diposed. If this instance is not disposed, will return an AutoLock entered for Write. The write lock. Throws an InvalidOperationEception is this instance is not disposed and is not running. Must be called under _initLock for thread safety. Thrown if the sensor is not running. Gets the index of the nui device. Do not expose this to the end user. NOTE: Clients of this method expect it to be non-locking. Gets the collection of all Kinect™ sensors. Gets the internal wrapper for INuiSensor. Gets the unique device connection name for the sensor. This is the camera device instance id. Gets the USB HUB device instance id. Gets the reported status of the sensor. Gets or sets the last status for this sensor. Gets or sets a value indicating whether the sensor was running. Event that fires when a new depth frame is available from this Kinect sensor. Event that fires when a new color frame is available from this Kinect sensor. Event that fires when a new skeleton frame is available from this Kinect sensor. Event that fires when new frames are available from each of this Kinect sensor's active streams. Gets a value indicating whether the depth frame handler has subscriptions. Gets a value indicating whether the color frame handler has subscriptions. Gets a value indicating whether the skeleton frame handler has subscriptions. Gets a value indicating whether the AllFrames handler has subscriptions. Gets the CoordinateMapper object for the sensor. Gets the depth stream for the sensor. Gets the color stream for the sensor. Gets the skeleton stream for the sensor. Gets the audio source for the sensor. Gets the maximum camera elevation angle in degrees. Gets the minimum camera elevation angle in degrees. Gets or sets the desired camera elevation angle. See the documentation about the limits of this property. Gets or sets a value indicating whether the infrared emitter is disabled. Default value of false. Gets or sets a filter to be applied to each depth frame. Gets a value indicating whether the Kinect is currently streaming data. To set it, call Start() or Stop(). Gets a value indicating whether the Kinect is currently streaming data. Non-locking version of IsRunning. Gets a value indicating whether this KinectSensor has been disposed. This class and its more strongly typed subclass is a very specific utility for handling the multiple frame types that KinectSensor managed, sorts and dispatches. Set new args at the specified timestamp. HaveDispatchedEvent will become false. The new args. Must match the correct type for this instance. The timestamp of this args. The framenumber of this args. Invoke the current args with the handler supplied at construction time, if there are listeners. HaveDispatchedEvent will become true after this call even if there weren't any listeners. The sender of the event. Reset the instance to no args and no timestamp, returning the args (if present) for the caller to use if desired. The Args (if any) that were set in this instance. Determine whether this FrameStateHelper is a candidate for invocation. This happens if: There are Args to dispatch and We have not already dispatched the event and The timestamp is earlier than the timestamp the caller provides. Note that this does *not* imply that HasListeners is true - just that this instance is the next candidate (based on timestamp and frame number). The earliest timestamp being considered by the caller. The timestamp must be < earliest, or == and framenumber < earliestframenumber. The earliest framenumber being considered by the caller. The timestamp must be < earliest, or == and framenumber < earliestframenumber. Whether or not this FrameStateHelper is a candiate for invocation. Gets or sets the most recent timestamp for this frame type. Gets or sets the most recent framenumber for this frame type. Gets a value indicating whether this instance is ready for updated args. This can happen if the args are null or have already been dispatched, or if there are no type specific listeners. If this is false, we should not call SetArgs because we have data that needs to be dispatched. Gets a value indicating whether there are currently args stored in this instance. Gets or sets a value indicating whether the args currently held by this class have been dispatched. Gets a value indicating whether the wrapped even handler has listeners. This is used to help the FrameStateHelper determine which stream it belongs to. The color stream. The depth stream. The skeleton stream. The concrete, strongly typed version of FrameStateHelper, typed to the Args type. The type of EventArgs handled by this instance. Wrapped handler object. Used for logging to tell which stream this frame belongs to. Arguments for the wrapped handler. Initializes a new instance of the FrameStateHelper class with a wrapped handler. The frame type this helper is associated with. The wrapped handler. Set new args at the specified timestamp. HaveDispatchedEvent will become false. The new args. Must match the correct type for this instance. The timestamp of this args. The framenumber of this args. Invoke the current args with the handler supplied at construction time, if there are listeners. HaveDispatchedEvent will become true after this call even if there weren't any listeners. The sender of the event. Reset the instance to no args and no timestamp, returning the args (if present) for the caller to use if desired. The Args (if any) that were set in this instance. Gets a value indicating whether there are currently args stored in this instance. Gets a value indicating whether the wrapped even handler has listeners. Options for initializing an INuiSensor. Must be in sync with NuiApi.h. No options chosen. Both depth and player index desired. Note that this uses the skeletal engine. Color frames desired. Skeletal frames desired. Depth frames desired. Audio capture (Microphone array) desired. These are the possible states for a tracked skeleton. This means the skeleton is not being tracked. The skeleton is being tracked, but we only know the general position, and we do not know the specific joint locations. The skeleton is being tracked and the joint data is available for consumption. These flags are used to indicate of a skeleton is passing outside of the frame. All of the player's body is in frame. Part of the player's body is out of frame to the camera's right. Part of the player's body is out of frame to the camera's left. Part of the player's body is out of frame above the camera's field of view. Part of the player's body is out of frame below the camera's field of view. This struct is used to setup the skeleton smoothing values. Calculates the hash code of the TransformSmoothParameters. The hash code. Determines if the two objects are equal. The object to compare to. This method returns true if they are equal and false otherwise. Determines if the two objects are equal. The TransformSmoothParameters to compare to. This method returns true if they are equal and false otherwise. Determines if the two objects are equal. The first TransformSmoothParamters to compare. The second TransformSmoothParamters to compare. This method returns true if they are equal and false otherwise. Determines if the two objects are not equal. The first TransformSmoothParamters to compare. The second TransformSmoothParamters to compare. This method returns true if they are not equal and false otherwise. Gets or sets the smoothing value. Gets or sets the correction value. Gets or sets the prediction value. Gets or sets the jitter radius value. Gets or sets the maximum deviation radius value. This class contains the skeleton frame returned by the Kinect API. The associated skeleton stream. The associated skeleton data. The data access lock. Tracks whether this instance is disposed. 0 == false, 1 == true. We need to use int (vs. bool) for Interlocked.Exchange. Initializes a new instance of the SkeletonFrame class. The associated SkeletonStream object. The current frames number. The timestamp on the frame. The tracking mode in which the frame was captured. The related SkeletonData. Creates a new skeleton frame object. The associated SkeletonStream. The new frame number. The frames timestamp. The tracking mode in which the frame was captured. The new SkeletonFrame object. This method copies the skeleton data to an array of skeleton data. The target array to receive the data. This method disposes the skeleton frame. Finalizes an instance of the SkeletonFrame class. This destructor is used to notify the developer if they have forgotten to dispose of the frame correctly. To be used to return data to free lists. If SkeletonFrame is ever unsealed, this must change to protected virtual. Specify true to indicate that the class should dispose clean up all resources. Gets or sets the timestamp for the frame. Gets or sets the frame number for the frame. Gets the tracking mode in which this frame was captured. Gets or sets the floor's clip plane. The floats should be in this order from the native type: x, y, z, w. Gets the total length of the skeleton data buffer of this SkeletonFrame. Gets the depth filter that was applied to the frame. This class is used to track all of the known data about a skeleton returned from the skeleton stream. An array of all possible JointType values. Initializes a new instance of the Skeleton class. The native skeleton data. Initializes a new instance of the Skeleton class. The source skeleton to copy the data from. Initializes a new instance of the Skeleton class with a default JointCollection. Backing store for the BoneOrientations property. This method copies the data from the native data. The native skeleton data. This method copies the data from another skeleton. The source skeleton. Invalidates the bone orientations, forcing them to be recalculated the next time they are requested. This method calculates the hierarchical and absolute bone rotations for each joint in the skeleton. The array of bone orientations to be updated. Returns true if joint calculation successful, false otherwise. Gets or sets the skeleton's current tracking state. Gets or sets the skeleton's tracking ID. Gets or sets the skeleton's position. Gets or sets the skeleton's joints. Gets or sets the skeleton's bone orientations. Gets or sets the edges that this skeleton is clipped on. This struct is used to describe a skeleton's joint. This method calculates the hash code for a joint. The joint's hash code. This method compares two joint objects. The object to compare. It returns true if they are equal and false otherwise. This method compares two joint objects. The joint to compare. It returns true if they are equal and false otherwise. This method compares two joint objects. The first joint to compare. The second joint to compare. It returns true if they are equal and false otherwise. This method compares two joint objects. The first joint to compare. The second joint to compare. It returns true if they are not equal and false otherwise. Gets or sets the joint's position. Gets the joint's type. Gets or sets the tracking state of this joint. This contains all of the possible joint types. The center of the hip. The bottom of the spine. The center of the shoulders. The players head. The left shoulder. The left elbow. The left wrist. The left hand. The right shoulder. The right elbow. The right wrist. The right hand. The left hip. The left knee. The left ankle. The left foot. The right hip. The right knee. The right ankle. The right foot. The tracking state of a specific joint. The joint is not tracked and no data is known about this joint. The joint location is inferred. The data should be used with the understanding that the confidence level of the location is very low. The joint is tracked and the data can be trusted. Matrix4 is a row-major matrix containing the joint rotation information in the top left 3x3 and zero for translation. Compares two Matrix4 objects for equality. The object to compare. Returns true if they are equal and false otherwise. Compares two Matrix4 objects for equality. The Matrix4 to compare. Returns true if they are equal and false otherwise. Gets the hash code for a given Matrix4. The calculated hash code. Compares two Matrix4 objects for equality. The first Matrix4 to compare. The second Matrix4 to compare. Returns true if they are equal and false otherwise. Compares two Matrix4 objects for inequality. The first Matrix4 to compare. The second Matrix4 to compare. Returns true if they are not equal and false otherwise. Returns a Matrix4 that is a copy of a native _Matrix4 structure. The native structure. The managed structure. Gets or sets Row 1, Column 1. Gets or sets Row 1, Column 2. Gets or sets Row 1, Column 3. Gets or sets Row 1, Column 4. Gets or sets Row 2, Column 1. Gets or sets Row 2, Column 2. Gets or sets Row 2, Column 3. Gets or sets Row 2, Column 4. Gets or sets Row 3, Column 1. Gets or sets Row 3, Column 2. Gets or sets Row 3, Column 3. Gets or sets Row 3, Column 4. Gets or sets Row 4, Column 1. Gets or sets Row 4, Column 2. Gets or sets Row 4, Column 3. Gets or sets Row 4, Column 4. Gets the identity matrix. Vector4 is a 4-element vector. Compares two Vector4 objects for equality. The object to compare. Returns true if they are equal and false otherwise. Compares two Vector4 objects for equality. The Vector4 to compare. Returns true if they are equal and false otherwise. Gets the hash code for a given Vector4. The calculated hash code. Compares two Vector4 objects for equality. The first Vector4 to compare. The second Vector4 to compare. Returns true if they are equal and false otherwise. Compares two Vector4 objects for inequality. The first Vector4 to compare. The second Vector4 to compare. Returns true if they are not equal and false otherwise. Returns a Vector4 that is a copy of a native _Vector4 structure. The native structure. The managed structure. Gets or sets the X element. Gets or sets the Y element. Gets or sets the Z element. Gets or sets the W element. This class contains a collection of joints returned for a given skeleton. The array of joint data. Initializes a new instance of the JointCollection class. Back reference to Skeleton class. This method is used to enumerate the list of joints. The related enumerator. This method is used to enumerate the list of joints. The related enumerator. Back reference to Skeleton class to enable us to flag writes to joints and re-calculate joint angles. Gets the number of joints available. Accesses the requested joint. The JointType being requested. The requested joint. Orientation information for an individual bone in a skeleton. Initializes a new instance of the BoneOrientation class. The joint corresponding to the endpoint of the bone. Sets the confidence and rotations of the BoneOrientation to their default values. Copies data from a native _NUI_SKELETON_BONE_ORIENTATION structure. The native structure. Copies data from another Bone Orientation class. The bone orientation to copy. Joint types representing the starting joint for each bone (the parent of the bone's endpoint joint). Gets the skeleton joint at which the bone ends. Gets the skeleton joint at which the bone starts. Gets or sets the rotation of the bone relative to its "parent" bone in the skeleton. Gets or sets the rotation of the bone relative to the camera coordinate system. Rotation of an individual bone. Gets or sets a matrix representation of the bone rotation. Gets or sets a quaternion representation of the bone rotation. This class contains a collection of bone orientations returned for a given skeleton. The array of joint data. Indicates whether the bone orientation data is valid (has been recalculated since the joint positions last changed). Initializes a new instance of the BoneOrientationCollection class. Back reference to Skeleton class. This method is used to enumerate the list of bone orientations. The related enumerator. This method is used to enumerate the list of bone orientations. The related enumerator. Recalculates the bone orientations. Invalidates the bone orientations, forcing them to be recalculated the next time they are requested. Back reference to Skeleton class to enable us to re-calculate joint angles. Gets the number of bone orientations available. Gets or sets a value indicating whether the joint orientations are valid. Accesses the requested bone orientation. The JointType for the bone being requested. The requested bone orientation. Available skeleton tracking modes. Default skeleton tracking (tracks all 20 joints). Seated skeleton tracking (tracks only the upper 10 joints). This class maintains the stream of data related to the skeleton. This flag is returned in dwFlags of a skeleton frame that was captured while in seated mode. This value prevents the INuiSensor::NuiSkeletonGetNextFrame method from returning E_NUI_FRAME_NO_DATA errors. Instead, calls to NuiSkeletonGetNextFrame block execution until data is available or the timeout period passes. This value disables the default player selection mode and enables the title to choose which detected skeletons are tracked. This value is used to enable seated skeleton tracking support. This value is used to enable skeleton tracking while the depth camera is in near mode. This constant is the maximum number of trackable skeletons. This is the associated KinectSensor. This is the stream's pool for SkeletonData. Initializes a new instance of the SkeletonStream class. The associated KinectSensor. This event is used to indicate the availability of a new skeleton frame. This field indicates of the stream is enabled or not. This field indicates if the app is choosing skeletons or not. Indicates whether the pipeline is running in seated or default tracking mode. Indicates whether skeleton tracking is enabled when the depth camera is in near mode. This method is called to enable the skeleton stream with the default smoothing values. This method is called to enable the skeleton stream. The desired smoothing parameters. This method is called to disable the skeleton stream. This private method sets the enable state. The value to set it to. This method sets the smoothing state. The value to set it to. The related smoothing parameters to use. This method chooses the default skeletons. This method chooses a skeleton to track. The skeleton ID the application wishes to track. This method chooses a skeleton to track. The first skeleton ID the application wishes to track. The second skeleton ID the application wishes to track. This field indicates of the stream is tracking skeletons or not. This private method begins tracking skeletons. This private method stops tracking skeletons. This internal method starts tracking. This internal method stops tracking. Retrieves the next SkeletonFrame from the sensor. The SkeletonFrame must be disposed. The time to wait for a new frame from the sensor, in milliseconds. The next ColorImageFrame, or null if the timeout has expired. Used to store the skeleton data during the window when it's available from native code. The frameNumber of the skeleton data. The native description of the skeleton data. The floorClipPlane of the new frame. Retrieves the next frame from the sensor, and calls "StoreSkeletonData" with the data, if present. The time to wait for a new frame from the sensor, in milliseconds. The frameNumber of the new frame. The timestamp of the new frame. The tracking mode in which the frame was captured. This method returns true if the method succeeded and false otherwise. This method locks the associated skeleton frame. The frame number to lock. The available frame. This method unlocks the frame data. The skeleton frame to unlock. This method disposes the SkeletonStream. Gets the associated KinectSensor. Gets a value indicating whether the skeleton stream is enabled. Gets or sets a value indicating whether the application will be responsible for choosing skeletons or not. Gets or sets the tracking mode. The current tracking mode of the skeleton stream. The default value is SkeletonTrackingMode.Default. This property may be set at any time, regardless of the current state of SkeletonStream.IsEnabled or KinectSensor.IsRunning. If the tracking mode is changed while both SkeletonStream.IsEnabled and KinectSensor.IsRunning are true, any skeletons currently being tracked will be lost. Indicates that the Kinect sensor is in a state that prevents skeleton tracking from running. Gets or sets a value indicating whether skeleton tracking is enabled when the KinectSensor's DepthImageStream.Range is DepthRange.Near. The current tracking mode of the flag. The default value is false. Indicates that the Kinect sensor is in a state that prevents skeleton tracking from running. Gets the associated smoothing parameters. Gets a value indicating whether smoothing is enabled. Gets the total length of the skeleton data buffer of each SkeletonFrame from this SkeletonStream. IList implementation with locking on all operations. Type of generic IList to implement. Initializes a new instance of the ThreadSafeList class with a new lock. Initializes a new instance of the ThreadSafeList class with an existing new lock. Existing lock to use for this list. Lock object to use for all operations. Wrapped list object. Adds the elements of the specified collection to the end of the ThreadSafeList<T>. The collection whose elements should be added to the end of the ThreadSafeList<T>. The collection itself cannot be null, but it can contain elements that are null, if type T is a reference type. Collection is null. Searches for the specified object and returns the zero-based index of the first occurrence within the entire ThreadSafeList<T>. The object to locate in the ThreadSafeList<T>. The value can be null for reference types. The zero-based index of the first occurrence of item within the entire ThreadSafeList<T>, if found; otherwise, –1. Inserts an element into the ThreadSafeList<T> at the specified index. The zero-based index at which item should be inserted. The object to insert. The value can be null for reference types. Index is less than 0.-or-index is greater than ThreadSafeList<T>.Count. Removes the element at the specified index of the ThreadSafeList<T>. The zero-based index of the element to remove. Index is less than 0.-or-index is equal to or greater than ThreadSafeList<T>.Count. Adds an object to the end of the ThreadSafeList<T>. The object to be added to the end of the ThreadSafeList<T>. The value can be null for reference types. Removes all elements from the ThreadSafeList<T>. Determines whether an element is in the ThreadSafeList<T>. The object to locate in the ThreadSafeList<T>. The value can be null for reference types. true if item is found in the ThreadSafeList<T>; otherwise, false. Copies the entire ThreadSafeList<T> to a compatible one-dimensional array, starting at the beginning of the target array. The one-dimensional System.Array that is the destination of the elements copied from ThreadSafeList<T>. The System.Array must have zero-based indexing. The zero-based index in array at which copying begins. Array is null. ArrayIndex is less than 0. The number of elements in the source ThreadSafeList<T> is greater than the available space from arrayIndex to the end of the destination array. Copies the entire ThreadSafeList<Tgt; to a compatible one-dimensional array, starting at the beginning of the target array. The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.List<Tgt;. The System.Array must have zero-based indexing. Array is null. The number of elements in the source ThreadSafeList<Tgt; is greater than the number of elements that the destination array can contain. Removes the first occurrence of a specific object from the ThreadSafeList<T>. The object to remove from the ThreadSafeList<T>. The value can be null for reference types. true if item is successfully removed; otherwise, false. This method also returns false if item was not found in the ThreadSafeList<T>. Returns an enumerator that iterates through the ThreadSafeList<T>. This support function exists to satisfy code quality warning CA2000. Otherwise, it would be in-line. A ThreadSafeList<T>.Enumerator for the ThreadSafeList<T>. Returns an enumerator that iterates through the ThreadSafeList<T>. This enumerator is a SNAPSHOT of the list. Keep this in mind when using this enumerator. A ThreadSafeList<T>.Enumerator for the ThreadSafeList<T>. Returns an enumerator that iterates through the ThreadSafeList<T>. This enumerator is a SNAPSHOT of the list. Keep this in mind when using this enumerator. A ThreadSafeList<T>.Enumerator for the ThreadSafeList<T>. Gets or sets the element at the specified index. The zero-based index of the element to get or set. The element at the specified index. Gets the number of elements actually contained in the ThreadSafeList<T>. Gets a value indicating whether the list is read only. Returns true. Provides a SNAPSHOT enumerator of the list. Keep this in mind when using this enumerator. Snapshot to enumerate. Internal enumerator of the snapshot. Initializes a new instance of the ThreadSafeEnumerator class, creating a snapshot of the given list. List to snapshot. Disposes the underlying enumerator. Does not set _list or _enum to null so calls will still proxy to the disposed instance (and throw the proper exception). Advances the enumerator to the next element of the collection. true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. The collection was modified after the enumerator was created. Sets the enumerator to its initial position, which is before the first element in the collection. The collection was modified after the enumerator was created. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. Gets the element in the collection at the current position of the enumerator. The element in the collection at the current position of the enumerator. This struct describes a 3 dimensional point in skeleton space. This method compares two skeleton point objects. The object to compare. It returns true if they are equal and false otherwise. This method compares two skeleton point objects. The SkeletonPoint to compare. It returns true if they are equal and false otherwise. This gets the hash code for a given skeleton point. The calculated hash code. This method compares two skeleton point objects. The first SkeletonPoint to compare. The second SkeletonPoint to compare. It returns true if they are equal and false otherwise. This method compares two skeleton point objects. The first SkeletonPoint to compare. The second SkeletonPoint to compare. It returns true if they are not equal and false otherwise. Gets or sets the X coordinate of the skeleton point. Gets or sets the Y coordinate of the skeleton point. Gets or sets the Z coordinate of the skeleton point. Image formats for the Color Image Stream. It represents Image Data format, Framerate, and Resolution. The image format is undefined. RGB data (32 bits per pixel, layout corresponding to PixelFormats.Bgr32). Resolution of 640 by 480 at 30 Frames per second. RGB data (32 bits per pixel, layout corresponding to PixelFormats.Bgr32). Resolution of 1280 by 960 at 12 Frames per second. The data is collected from the Kinect as YUV, but it is translated to: RGB data (32 bits per pixel, layout corresponding to PixelFormats.Bgr32). Resolution of 640 by 480 at 15 Frames per second. YUV data (32 bits per pixel, layout corresponding to D3DFMT_LIN_UYVY). Resolution of 640 by 480 at 15 Frames per second. Infrared data (16 bits per pxel) Resolution of 640 by 480 at 30 Frames per second. Bayer data (8 bits per pixel, layout in alternating pixels of red, green and blue). Resolution of 640 by 480 at 30 Frames per second. Bayer data (8 bits per pixel, layout in alternating pixels of red, green and blue). Resolution of 1280 by 960 at 12 Frames per second. Represents the stream of Color Image data from the Kinect. It should only be used as a property of a KinectSensor. The current image type of this stream. The current image format of this stream. The related color data pool. The color camera settings field. This method returns the resolution scale of the value provided. The source value. The scaled value based on a 640x480 resolution. Initializes a new instance of the ColorImageStream class. The sensor this stream relates to. Enables the Color Image Stream for this Kinect Sensor using the default of ColorImageFormat.RgbResolution640x480Fps30. Enables the Color Image Stream for this Kinect Sensor, with the specified format. The Image Data format, Framerate, and Resolution. Retrieves the next ColorImageFrame from the sensor. The ColorImageFrame must be disposed. The time to wait for a new frame from the sensor, in milliseconds. The next ColorImageFrame, or null if the timeout has expired. Store the pixel data during the window when it's available from native code. The frameNumber of the pixel data. The native description of the pixel data. The ImageType of the pixels. The Resolution of the pixels. The native stream handle. The native image frame. This method locks the pixel data for a given frame number. The frame number. A locked pixel data if available. This method unlocks the pixel data. The data to unlock. This method looks up the image resolution based on a given color format. The color format. The ImageResolution for the ColorImageFormat. This method looks up the ColorImageFormat for the given ImageType and ImageResolution. The image type. The image resolution. The ColorImageFormat for the combination. Returns the required length for a pixel data array based on the provided ColorImageFormat. The ColorImageFormat for which to lookup the required pixel data array length. The required length for a pixel data array based on the provided ColorImageFormat. Gets the nominal focal length of color image in pixels, adjusted for resolution. Gets the inverse of the NominalFocalLengthInPixels, or 1/NominalFocalLengthInPixels. Gets the nominal diagonal field of view of color image. Gets the nominal horizontal field of view of color image. Gets the nominal vertical field of view of color image. Gets the color camera settings. Gets the current Framerate and Resolution. Gets the ImageType for the stream. Possible Ranges for the Depth Sensor. Default or XBox range: 800mm to 4000mm. Range adjusted for up-close viewing: 400mm to 3000mm. Image formats for the Depth Image Stream. It represents Framerate, and Resolution. The image format is undefined. Resolution of 640 by 480 at 30 Frames per second. Resolution of 320 by 240 at 30 Frames per second. Resolution of 80 by 60 at 30 Frames per second. Represents the stream of Depth Image data from the Kinect. It should only be used as a property of a KinectSensor. The default minimum depth. The default maximum depth. The near mode minimum depth. The near mode maximum depth. The value indicating too near. The value indicating too far. The value for an unknown depth. The depth bytes per pixel constant. This method returns the resolution scale of the value provided. The source value. The scaled value based on a 320x240 resolution. The current depth range mode. The current minimum depth value. The current maximum depth value. The current depth image format. The depth data pool. Initializes a new instance of the DepthImageStream class. The related sensor object. Enables the Depth Image Stream for this Kinect Sensor using the default value of DepthImageFormat.Resolution640x480Fps30. Enables the Depth Image Stream for this Kinect Sensor, with the specified format. The Framerate, and Resolution. Retrieves the next DepthImageFrame from the sensor. The DepthImageFrame must be disposed. Time to wait for a new frame from the sensor, in milliseconds. The next DepthImageFrame, or null if the timeout has expired. Store the pixel data during the window when it's available from native code. The frameNumber of the pixel data. The native description of the pixel data. The ImageType of the pixels. The Resolution of the pixels. The native stream handle. The native image frame. This method locks the pixel data for a given frame number. The frame number. A locked pixel data if available. This method unlocks the pixel data. The data to unlock. This method looks up the image resolution based on a given depth format. The depth format. The ImageResolution for the DepthImageFormat. This method looks up the DepthImageFormat for the given ImageType and ImageResolution. The image type. The image resolution. The DepthImageFormat for the combination. Returns the required length for a pixel data array based on the provided DepthImageFormat. The DepthImageFormat for which to lookup the required pixel data array length. The required length for a pixel data array based on the provided DepthImageFormat. Gets the nominal focal length of depth image in pixels, adjusted for resolution. Gets the inverse of the NominalFocalLengthInPixels, or 1/NominalFocalLengthInPixels. Gets the nominal diagonal field of view of depth image. Gets the nominal horizontal field of view of depth image. Gets the nominal vertical field of view of depth image. Gets or sets the current sensitive range of the Depth Sensor. Gets the current Framerate, and Resolution. Gets the constant Depth value for data that is too near for the sensor to accurately track. This value is guaranteed to be smaller than MinDepth. Note that objects very near the sensor may actually return UnknownDepth. Gets the constant Depth value for data that is too far beyond the sensor range. This value is guaranteed to be larger than MaxDepth. Gets the constant Depth value for data that is at an unknown distance. Gets the minimum Depth value in mm for the current sensor range setting. Gets the maximum Depth value in mm for the current sensor range setting. This property can change based on external changes to Sensor.SkeletonStream, and therefore must be queried every time the value is required. IPropertyStore property indexes for INuiSensor. Default value. Not used. Internal IsSupported property for sensor. Provides the location of a sound source. Wrapper for INuiAudioBeam COM interface. Initializes a new instance of the NuiAudioBeam class with the given audio device. The audio device to wrap. The wrapped audio device. Gets the currently selected beam direction. Receives the horizontal angle (in radians) of the currently selected beam in camera coordinates, where the x-z axes define the horizontal plane. The angle is relative to the z-axis, which is perpendicular to the Kinect sensor. Sets the currently selected beam direction. The KinectAudio DMO supports 11 beams. They have fixed directions ranging from −0.875 radians to +0.875 radians in .0175 radian increments, which corresponds to approximately −50 degrees to +50 degrees, in ten degree increments. The beam angle, in radians. Important : To use SetBeam, you must set the KinectAudio DMO's MFPKEY_WMAAECMA_FEATR_MICARR_MODE property key to MIC_ARRAY_MODE.MICARRAY_EXTERN_BEAM. Provides the best estimate of the sound source location, as determined by the KinectAudio DMO's sound source localizer. Receives the estimated horizontal angle (in radians) to the sound source in camera coordinates, where the x-z axes define the horizontal plane. The angle is relative to the z-axis, which is perpendicular to the Kinect sensor. Receives the confidence value of the estimate. You must call IMediaObject::ProcessOutput before calling GetPosition. This method drives the processing of audio samples through the audio pipeline, which is required for determining the source direction. GetPosition will be successful only if ProcessOutput has returned S_OK. Do not simply check for success, because ProcessOutput can also return S_FALSE if it lacks sufficient data to proceed. If ProcessOutput returns S_FALSE, continue calling the method until it returns S_OK, and then call GetPosition. GetPosition is based on a measurement queue. If the queue empties, the function returns zero for both parameters. Gets the wrapped audio device. A class for performing mapping between depth space, color space, and skeleton space. Privately cached copy of INuiCoordinateMapper interface. Initializes a new instance of the NuiCoordinateMapper class. The INuiCoordinateMapper interface to wrap. Initializes a new instance of the NuiCoordinateMapper class. The INuiCoordinateMapper interface to wrap. Common constructor functionality. Returns the relational parameters from native and copys them into a byte array. The relational parameters. Event variable for RelationalParametersChanged. Calls marshalled to main thread. Gets the pixel coordinates in color space that correspond to the specified pixel coordinates in depth space, using the specified depth resolution. The resolution of the depth image, as a NUI_IMAGE_RESOLUTION enumeration constant. The DepthImagePoint to map to color space. Color type. The resolution of the color image, as a NUI_IMAGE_RESOLUTION enumeration constant. The ColorImagePoint to recieve the mapped value. Converts a frame's worth of data from depth space to color space. The resolution of the depth image, as a NUI_IMAGE_RESOLUTION enumeration constant. The data from an entire depth frame . Color type. The resolution of the color image, as a NUI_IMAGE_RESOLUTION enumeration constant. Array to hold the color frame X,Y coordinates for each pixel in the depth frame. Gets the pixel coordinates in skeleton space that correspond to the specified pixel in color space, using the provided color and depth resolutions. Color type. The resolution of the color image, as a NUI_IMAGE_RESOLUTION enumeration constant. The resolution of the depth image, as a NUI_IMAGE_RESOLUTION enumeration constant. The input array of DepthImagePixels to map from, size should be equal to that specified by eDepthResolution. The output array of SkeletonPoints, size should be equal to that specified by eColorResolution. Gets the pixel coordinates in skeleton space that correspond to the specified pixel in depth space, using the provided depth resolution. The resolution of the depth image, as a NUI_IMAGE_RESOLUTION enumeration constant. The input array of DepthImagePixels to map from, size should be equal to that specified by eDepthResolution. The output array of SkeletonPoints, size should be equal to that specified by eDepthResolution. Gets the pixel coordinates in depth space that correspond to the specified pixel coordinates in color space, using the provided color and depth resolutions. Color type. The resolution of the color image, as a NUI_IMAGE_RESOLUTION enumeration constant. The resolution of the depth image, as a NUI_IMAGE_RESOLUTION enumeration constant. The input array of DepthImagePixels to map from, size should be equal to that specified by eDepthResolution. The output array of DepthImagePoints, size should be equal to that specified by eColorResolution. Called by the native runtime when the underlying parameters have changed. Returns S_OK always. Fires when the paramaters have been changed (e.g. by KinectStudio). Wraps the native INuiSensor interface, which provides native access to a sensor. The wrapped sensor. The current depth filter. All depth filters ever used by this sensor. Initializes a new instance of the NuiSensor class. Wrapper for INuiSensor. Slightly more managed friendly than a raw INuiSensor. INuiSensor object to wrap. Gets the zero-based sensor index. Returns the sensor index. Initializes the NUI engine. The NUI subsystems to initialize, as a bitwise-OR combination of the NUI_INITIALIZE constants. Caches the INuiAudioBeam object for the sensor. Gets the audio source from a specific sensor. The INuiAudioBeam interface for the audio source. Caches the INuiCoordinateMapper object for the sensor. Gets the coordinate mapping object from a specific sensor. The INuiCoordinateMapper interface for the sensor. Shuts down the NUI engine. Sets the event that signals the last frame. A handle to the event. The frame event options, as a bitwise-OR combination of the NUI_IMAGE_STREAM_FLAG constants. Opens an image stream. A NUI_IMAGE_TYPE value that specifies which image stream to open. The valid values for this parameter depend on the flags that you passed to the dwFlags parameter of the INuiSensor::NuiInitialize method. A NUI_IMAGE_RESOLUTION value that specifies which resolution to use for the image stream. The valid values for this parameter depend on the flags that you passed to the dwFlags parameter of the INuiSensor::NuiInitialize method. Not used; specify NULL. The number of frames that the NUI runtime should buffer. The maximum value is NUI_IMAGE_STREAM_FRAME_LIMIT_MAXIMUM. Most applications should use a frame limit of two. A handle to a manual reset event that will be fired when the next frame in the stream is available. A pointer that receives a handle to the opened stream. Sets the image frame flags for the specified stream. A handle to the stream. The image frame flags. Gets the image frame flags for the specified stream. A handle to the stream. A DWORD that receives the image frame flags. Gets the next frame of data from the specified image stream. A handle to the image stream. This stream must have been opened by a call to the NuiImageStreamOpen method. The timeout (in milliseconds) before returning without a new frame. A pointer to a NUI_IMAGE_FRAME structure that receives the next image frame in the specified stream. The pFrameTexture member of the structure points to an INuiFrameTexture instance that contains the frame data. Returns S_OK if successful; otherwise, returns a failure code. Releases the specified frame of data from the specified stream. A handle to the stream. This stream must have been opened by a call to the INuiSensor::NuiImageStreamOpen method. A pointer to the frame to release. Returns a pointer to an INuiFrameTexture that contains the data of a depth frame in NUI_DEPTH_IMAGE_PIXEL format (instead of packed USHORTs). A handle to the open depth stream. The NUI_IMAGE_FRAME for which the texture is being requested. This must be a valid frame returned by a call to NuiImageStreamGetNextFrame on hStream, and not yet released by a call to NuiImageStreamReleaseFrame. Returns true if the frame was captured in near mode; false if it was captured in default mode. Returns a pointer to an INuiFrameTexture containing the depth pixels. The lifetime of this texture is tied to the lifetime of pImageFrame; application code must not access the texture after NuiImageStreamRelease has been called on pImageFrame. Gets the pixel coordinates in color space that correspond to the specified pixel coordinates in depth space, using the specified depth resolution. The resolution of the color image, as a NUI_IMAGE_RESOLUTION enumeration constant. The resolution of the depth image, as a NUI_IMAGE_RESOLUTION enumeration constant. The optional zoom and pan settings of the color image, as a pointer to a NUI_IMAGE_VIEW_AREA structure. To ensure that the settings are valid, use the ViewArea member of the NUI_IMAGE_FRAME that you are registering pixels against. Do not instantiate and populate this structure manually. The X coordinate in depth image space. The Y coordinate in depth image space. The depth value in depth image space. This value is constrained between NUI_IMAGE_DEPTH_MINIMUM and NUI_IMAGE_DEPTH_MINIMUM. Pointer to a LONG value that receives the X coordinate of the pixel in color image space. This pointer must be non-NULL when you call this function. If this method does not return S_OK, this data is invalid. This value can be outside of the bounds of the color image. Pointer to a LONG value that receives the Y coordinate of the pixel in color image space. This pointer must be non-NULL when you call this function. If this method does not return S_OK, this data is invalid. This value can be outside of the bounds of the color image. Converts a frame's worth of data from depth space to color space. The resolution of the color image, as a NUI_IMAGE_RESOLUTION enumeration constant. The resolution of the depth image, as a NUI_IMAGE_RESOLUTION enumeration constant. The data from an entire depth frame . Array to hold the color frame X,Y coordinates for each pixel in the depth frame. Sets the elevation angle of the Kinect sensor. The elevation angle relative to gravity, in degrees. A value of zero indicates that the sensor array should point exactly horizontally. Positive values indicate that the sensor array should point above the horizon, and negative values indicate that the sensor array should point below the horizon. This value is constrained between NUI_CAMERA_ELEVATION_MINIMUM and NUI_CAMERA_ELEVATION_MAXIMUM. Gets the elevation angle of the Kinect sensor. The current elevation angle relative to gravity, in degrees. The pointer must be non-NULL when you call the function. After the function call returns, the LONG value contains the elevation angle. Valid angles range from NUI_CAMERA_ELEVATION_MINIMUM to NUI_CAMERA_ELEVATION_MAXIMUM. Gets the current accelerometer reading of the Kinect sensor. A Vector4 pointing in the directon of gravity. The accelerometer reading is returned as a 3d vector pointing in the direction of gravity (i.e. floor (gravity) on a non-accelerating sensor). The unit of the vector is in gravity units (g), 9.81m/s^2. The coordinate system is centered on the sensor, right-handed coordinate system with positive-Z in the direction the sensor is pointing at. In the default sensor rotation (horizontal, level placement), this will return the vector (0, -1.0, 0, 0). The w value of the Vector4 is always set to 0.0. Enables skeletal tracking. A handle to an application-allocated, manual reset event that will be set whenever a new frame of skeleton data is available, and will be reset whenever the latest frame data is returned. This can be NULL. Flags that control skeleton tracking, as a bitwise-OR combination of the values in the following table. Flag Description NUI_SKELETON_TRACKING_FLAG_SUPPRESS_NO_FRAME_DATA - Prevents the INuiSensor::NuiSkeletonGetNextFrame method from returning E_NUI_FRAME_NO_DATA errors. Instead, calls to NuiSkeletonGetNextFrame block execution until data is available or the timeout period passes. NUI_SKELETON_TRACKING_FLAG_TITLE_SETS_TRACKED_SKELETONS - Disables the default player selection mode and enables the title to choose which detected skeletons are tracked. Disables skeleton tracking. S_OK if successful; otherwise, returns a failure code. Gets the next frame of data from the skeleton stream. The timeout (in milliseconds) before returning without a new frame. A pointer to a NUI_SKELETON_FRAME structure that receives the next image frame in the skeleton stream. Returns S_OK if successful; otherwise, returns one of the following failure codes: E_POINTER, E_NUI_FRAME_NO_DATA. Filters skeleton positions to reduce jitter between frames. Points to a NUI_SKELETON_FRAME Structure that contains the skeleton data to be smoothed. On exit, the skeleton data in the structure has been replaced by smoothed data. If this function does not return S_OK, this data is unchanged. The parameters for the smoothing function. See the NUI_TRANSFORM_SMOOTH_PARAMETERS structure for a description of the parameters. Gets the sensor connection ID. The hub device instance id. Gets the unique ID for the sensor. The camera device instance id. Gets the audio array ID. Returns the audio array ID. Gets the connection status of the Kinect sensor. Returns S_OK if successful; otherwise, returns one of the following failure codes: E_NUI_NOTCONNECTED. Gets the flags that were passed to the INuiSensor::NuiInitialize method. Returns the initialization flags. Sets an array of IDs for skeletal tracking. The tracking ID for the first skeleton. The tracking ID for the second skeleton. Retrieves the color camera settings native object. This method will throw if the settings are not supported. The color camera settings. Returns the depth filter corresponding to a depth or skeleton frame captured at a particular timestamp. The timestamp at which the frame was captured. The depth filter that was applied to the frame. Gets a value indicating whether the device is a supported Kinect. Returns a private property from the NuiSensors IPropertyStore. Index of the property to retrieve. The property value. Gets or sets a value indicating whether the infrared emitter is disabled. Default value of false. Gets or sets a filter to be applied to each depth frame. This is the wrapper class for the color camera settings. This field holds on to the INuiColorCameraSettings object. Initializes a new instance of the NuiColorCameraSettings class. The underlying native settings object. This method enables or disables the sensor's auto exposure setting. The bool indicating if the setting is enabled or disabled. Gets the current value for auto white balance. Returns true if this is enabled, false otherwise. Sets the white balance. This property only works when AutoWhiteBalance is disabled. The desired white balance. Gets the current white balance setting. If AutoWhiteBalance is true, this will only return the last known value. The current value of the white balance setting. Gets the minimum acceptable value for white balance. The minimum value. Gets the maximum acceptable value for white balance. The maximum value. Sets the desired contrast. The desired contrast. Gets the current contrast. The current contrast. Gets the minimum contrast. The minimum. Gets the maximum contrast. The maximum. Sets the desired hue. The desired hue. Gets the current hue. The current hue. Gets the minimum hue. The minimum. Gets the maximum hue. The maximum. Sets the desired saturation. The desired saturation. Gets the current saturation. The current saturation. Gets the minimum saturation. The minimum. Gets the maximum saturation. The maximum. Sets the desired gamma. The desired gamma. Gets the current gamma. The current gamma. Gets the minimum gamma. The minimum. Gets the maximum gamma. The maximum. Sets the desired sharpness. The desired sharpness. Gets the current sharpness. The current sharpness. Gets the minimum sharpness. The minimum. Gets the maximum sharpness. The maximum. This method enables or disables the sensor's auto exposure setting. The bool indicating if the setting is enabled or disabled. Gets the current value for auto exposure. Returns true if enabled, false otherwise. Sets the desired exposure time. The desired exposure time. Gets the current exposure time. The current exposure time. Gets the minimum exposure time. The minimum. Gets the maximum exposure time. The maximum. Sets the desired frame interval. The desired frame interval. Gets the current frame interval. The current frame interval. Gets the minimum frame interval. The minimum. Gets the maximum frame interval. The maximum. Sets the desired brightness. The desired brightness.. Gets the current brightness. The current brightness. Gets the minimum brightness. The minimum. Gets the maximum brightness. The maximum. Sets the desired power line frequency. The desired frequency. Gets the current power line frequency. The current frequency. Sets the desired backlight compensation mode. The desired mode. Gets the current backlight compensation mode. The current mode. Sets the desired gain. The desired gain. Gets the current gain. The current gain. Gets the minimum gain. The minimum. Gets the maximum gain. The maximum. This resets the color camera settings to their defaults. Translates HRESULTs from native NUI API's and COM interfaces to managed exceptions. The sensor does not support the requested feature (e.g. near mode). The given sensor is not a genuine Kinect™ sensor. The given sensor is not a supported Kinect™ sensor. Probably an XBox Kinect™ on a non-developer machine. Invalid index sent to NuiCreateSensorByIndex or NuiCreateSensorById. A Win32 API returned ERROR_REQUEST_ABORTED. This means that the per-device mutex has already been created in NuiInitialize, and therefore we conclude that the device is already in use. Throws a managed exception for the given native HRESULT from the NUI API. Native HRESULT returned from API.