enh(io): don't restart video grabber if they are already started
Description
In video grabbers like sight::module::io::video
, if startCamera()
is called twice, then the camera/player is also initialized on the second call. This produces a short stall when this occurs.
Because some applications may call it twice depending on their internal logic (automatic playback for instance). I suggest to simply ignore the second call and not restart the player. This is exactly what is done in one of the grabber implementation sight::module::io::realsense::SScan
.
Functional specifications
In all video grabbers, when receiving startCamera(), do not stop()/start() and simply exit.
Technical specifications
- We need a new function in
IGrabber
to interrogate thestarted
state. - Apply the new rule in all grabbers
sight::module::io::video::SFrameGrabber
sight::module::io::pcl::SFrameGrabber
- Already done in
sight::module::io::realsense::SScan
Test plan
- Test with Tuto17SimpleAR