@@ -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
@@ -801,16 +801,17 @@ void Freenect2DeviceImpl::start()
801801
802802 state_ = Streaming;
803803 LOG_INFO << " started" ;
804+ return true ;
804805}
805806
806- void Freenect2DeviceImpl::stop ()
807+ bool Freenect2DeviceImpl::stop ()
807808{
808809 LOG_INFO << " stopping..." ;
809810
810811 if (state_ != Streaming)
811812 {
812813 LOG_INFO << " already stopped, doing nothing" ;
813- return ;
814+ return false ;
814815 }
815816
816817 LOG_INFO << " disabling usb transfer submission..." ;
@@ -837,16 +838,17 @@ void Freenect2DeviceImpl::stop()
837838
838839 state_ = Open;
839840 LOG_INFO << " stopped" ;
841+ return true ;
840842}
841843
842- void Freenect2DeviceImpl::close ()
844+ bool Freenect2DeviceImpl::close ()
843845{
844846 LOG_INFO << " closing..." ;
845847
846848 if (state_ == Closed)
847849 {
848850 LOG_INFO << " already closed, doing nothing" ;
849- return ;
851+ return true ;
850852 }
851853
852854 if (state_ == Streaming)
@@ -885,6 +887,7 @@ void Freenect2DeviceImpl::close()
885887
886888 state_ = Closed;
887889 LOG_INFO << " closed" ;
890+ return true ;
888891}
889892
890893PacketPipeline *createDefaultPacketPipeline ()
0 commit comments