// start the skeleton stream HRESULT KinectSensor::StartSkeletonStream() { // since this can be call publically // we will ensure the stream is configured and ready if( nullptr == m_pSkeletonStream ) { // enable a stream EnableSkeletonStream(); } // previous call failed, must be memory issue if( nullptr == m_pSkeletonStream ) { return E_OUTOFMEMORY; } // be sure the sensor is initialized before starting stream HRESULT hr = UpdateSensor(); if( FAILED(hr) ) { ResetDevice(); return hr; } return m_pSkeletonStream->StartStream(); }
// start the skeleton stream HRESULT KinectSensor::StartSkeletonStream() { AutoLock lock(m_nuiLock); // since this can be call publically // we will ensure the stream is configured and ready if (nullptr == m_pSkeletonStream) { // enable a stream EnableSkeletonStream(); assert(nullptr != m_pSkeletonStream); } // be sure the sensor is initialized before starting stream HRESULT hr = UpdateSensor(); if (FAILED(hr)) { ResetDevice(); return hr; } return m_pSkeletonStream->StartStream(); }
// default skeleton stream configuration void KinectSensor::EnableSkeletonStream() { EnableSkeletonStream(false, SkeletonSelectionModeDefault, nullptr); }