@@ -259,9 +259,9 @@ class Freenect2DeviceImpl : public Freenect2Device
259259
260260 virtual void setColorFrameListener (libfreenect2::FrameListener* rgb_frame_listener);
261261 virtual void setIrAndDepthFrameListener (libfreenect2::FrameListener* ir_frame_listener);
262- virtual void start ();
263- virtual void stop ();
264- virtual void close ();
262+ virtual bool start ();
263+ virtual bool stop ();
264+ virtual bool close ();
265265};
266266
267267struct PrintBusAndDevice
@@ -671,10 +671,10 @@ bool Freenect2DeviceImpl::open()
671671 return true ;
672672}
673673
674- void Freenect2DeviceImpl::start ()
674+ bool Freenect2DeviceImpl::start ()
675675{
676676 LOG_INFO << " starting..." ;
677- if (state_ != Open) return ;
677+ if (state_ != Open) return false ;
678678
679679 CommandTransaction::Result serial_result, firmware_result, result;
680680
@@ -790,16 +790,17 @@ void Freenect2DeviceImpl::start()
790790
791791 state_ = Streaming;
792792 LOG_INFO << " started" ;
793+ return true ;
793794}
794795
795- void Freenect2DeviceImpl::stop ()
796+ bool Freenect2DeviceImpl::stop ()
796797{
797798 LOG_INFO << " stopping..." ;
798799
799800 if (state_ != Streaming)
800801 {
801802 LOG_INFO << " already stopped, doing nothing" ;
802- return ;
803+ return false ;
803804 }
804805
805806 LOG_INFO << " disabling usb transfer submission..." ;
@@ -820,16 +821,17 @@ void Freenect2DeviceImpl::stop()
820821
821822 state_ = Open;
822823 LOG_INFO << " stopped" ;
824+ return true ;
823825}
824826
825- void Freenect2DeviceImpl::close ()
827+ bool Freenect2DeviceImpl::close ()
826828{
827829 LOG_INFO << " closing..." ;
828830
829831 if (state_ == Closed)
830832 {
831833 LOG_INFO << " already closed, doing nothing" ;
832- return ;
834+ return true ;
833835 }
834836
835837 if (state_ == Streaming)
@@ -863,6 +865,7 @@ void Freenect2DeviceImpl::close()
863865
864866 state_ = Closed;
865867 LOG_INFO << " closed" ;
868+ return true ;
866869}
867870
868871PacketPipeline *createDefaultPacketPipeline ()
0 commit comments