Skip to content

Commit

Permalink
Fixed colour stream not (re)starting properly
Browse files Browse the repository at this point in the history
  • Loading branch information
SoylentGraham committed Mar 31, 2021
1 parent 684fe63 commit 5f79303
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Freenect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ void Freenect::TDevice::Close()
mDepthMode.is_valid = false;

Result = freenect_stop_video( mDevice );
mColourMode.is_valid = false;

Result = freenect_close_device( mDevice );
IsOkay( Result, "freenect_close_device" );
Expand Down Expand Up @@ -517,6 +518,7 @@ void Freenect::TDevice::EnableDepthStream(SoyPixelsMeta Meta)
//freenect_stop_depth( &Device );
Result = freenect_start_depth( mDevice );
Freenect::IsOkay( Result, "freenect_start_depth" );
std::Debug << __PRETTY_FUNCTION__ << " Started depth stream" << std::endl;

mDepthFormat = Meta;
}
Expand Down Expand Up @@ -545,7 +547,8 @@ void Freenect::TDevice::EnableColourStream(SoyPixelsMeta Meta)
//freenect_stop_depth( &Device );
Result = freenect_start_video( mDevice );
Freenect::IsOkay( Result, "freenect_start_color" );

std::Debug << __PRETTY_FUNCTION__ << " Started colour stream" << std::endl;

mColourFormat = Meta;
}

Expand Down

0 comments on commit 5f79303

Please sign in to comment.