none
Where is the number of multiple buffers for Kinect streams specified (mentioned in Data Streams topic)? RRS feed

  • Question

  • This is probably a simple question, but I've had trouble finding the answer in the documentation and forums.  I'm using C# with Kinect SDK 1.5.  On the help page http://msdn.microsoft.com/en-us/library/hh973075 that discusses Data Streams, it says "an application typically uses multiple buffers per frame for each stream. An application can request up to four buffers; two is adequate for most usage scenarios."  I would like to specify four buffers on a Kinect stream, but I can't seem to find where to specify this.  I've looked in the various Kinect stream classes and the KinectSensor class.  Where is the number of multiple buffers for Kinect data streams specified?  Or can it be specified in this version?  Thanks.
    Saturday, August 18, 2012 9:44 PM

Answers

  • Sorry... That documentation is imprecise.  Control over buffer count is only available in our native c++ APIs.  Can you elaborate on what scenario you're trying to address?

    Thanks!


    -Adam Smith [MSFT]

    • Proposed as answer by Gary_Lewis Monday, August 20, 2012 5:37 PM
    • Marked as answer by kengr Thursday, August 23, 2012 9:39 PM
    Sunday, August 19, 2012 3:01 AM

All replies

  • Sorry... That documentation is imprecise.  Control over buffer count is only available in our native c++ APIs.  Can you elaborate on what scenario you're trying to address?

    Thanks!


    -Adam Smith [MSFT]

    • Proposed as answer by Gary_Lewis Monday, August 20, 2012 5:37 PM
    • Marked as answer by kengr Thursday, August 23, 2012 9:39 PM
    Sunday, August 19, 2012 3:01 AM
  • In the native APIs, I assume you're referring to the NuiImageStreamOpen API's dwFrameLimit argument, which can be up to 4 (i.e., NUI_IMAGE_STREAM_FRAME_LIMIT_MAXIMUM).  Please let me know if you are referring to something else in the native API.

    The application scenario is that an occasional frame in the application requires some additional image processing (once I have received it through the frame ready event), and that takes additional time.  (Spinning off a thread to perform the extra processing is possible, but for now I want to keep things simple.)  When that processing happens, I want to minimize the chance of dropping immediately subsequent frames.  So, my goal was to set the number of buffers to the max of 4, to minimize dropped frames during those times.

    In the C# environment, is the underlying number of buffers set by default to 2?  My client has a requirement of developing this project in C#, and dipping into native only if absolutely necessary.  I assume I could PInvoke to the native API, but it's not clear to me how to translate the NUI native image stream handle to the KinectSensor ColorStream on the managed side.  If this is not possible from C# in this version of the SDK, I'd like to request that access ro of this parameter be provided in a future version.

    Sunday, August 19, 2012 4:28 PM