@@ -259,9 +259,9 @@ class Freenect2DeviceImpl : public Freenect2Device
259
259
260
260
virtual void setColorFrameListener (libfreenect2::FrameListener* rgb_frame_listener);
261
261
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 ();
265
265
};
266
266
267
267
struct PrintBusAndDevice
@@ -671,10 +671,10 @@ bool Freenect2DeviceImpl::open()
671
671
return true ;
672
672
}
673
673
674
- void Freenect2DeviceImpl::start ()
674
+ bool Freenect2DeviceImpl::start ()
675
675
{
676
676
LOG_INFO << " starting..." ;
677
- if (state_ != Open) return ;
677
+ if (state_ != Open) return false ;
678
678
679
679
CommandTransaction::Result serial_result, firmware_result, result;
680
680
@@ -790,16 +790,17 @@ void Freenect2DeviceImpl::start()
790
790
791
791
state_ = Streaming;
792
792
LOG_INFO << " started" ;
793
+ return true ;
793
794
}
794
795
795
- void Freenect2DeviceImpl::stop ()
796
+ bool Freenect2DeviceImpl::stop ()
796
797
{
797
798
LOG_INFO << " stopping..." ;
798
799
799
800
if (state_ != Streaming)
800
801
{
801
802
LOG_INFO << " already stopped, doing nothing" ;
802
- return ;
803
+ return false ;
803
804
}
804
805
805
806
LOG_INFO << " disabling usb transfer submission..." ;
@@ -820,16 +821,17 @@ void Freenect2DeviceImpl::stop()
820
821
821
822
state_ = Open;
822
823
LOG_INFO << " stopped" ;
824
+ return true ;
823
825
}
824
826
825
- void Freenect2DeviceImpl::close ()
827
+ bool Freenect2DeviceImpl::close ()
826
828
{
827
829
LOG_INFO << " closing..." ;
828
830
829
831
if (state_ == Closed)
830
832
{
831
833
LOG_INFO << " already closed, doing nothing" ;
832
- return ;
834
+ return true ;
833
835
}
834
836
835
837
if (state_ == Streaming)
@@ -863,6 +865,7 @@ void Freenect2DeviceImpl::close()
863
865
864
866
state_ = Closed;
865
867
LOG_INFO << " closed" ;
868
+ return true ;
866
869
}
867
870
868
871
PacketPipeline *createDefaultPacketPipeline ()
0 commit comments