release function not implemented in raspicam_still and raspicam_still_cv
C++ library for controlling Raspberry Pi Camera (with/without OpenCV)
Brought to you by:
ucoava
The release() function is not implemented in RaspiCam_Still and RaspiCam_Still_Cv classes.
This is a problem, as there must be a possibility to start/stop the camera without destroying the Raspicam_Still object (when there is no need to use it or you want to change resolution).
One more observation about this bug: the camera isn't freed at all before quitting the program. Even deleting the Raspicam_Still (or Raspicam_Still_Cv) object won't stop the camera, and any subsequent camera operations will lead to the crash of the program.
Here is a quick'n dirty implementation of the release function. It still has bugs (it seems that the image gets flipped after the first release), but it can disable the camera.
raspicam_still_cv.cpp: add to the RaspiCam_Still_Cv::release() function:
Then, add a public function to the Private_Impl_Still class called release(). Here is my implementation (in private_still_impl.cpp);
I tried to use the destroyCamera function, or the mmal_destroy/disable/etc functions, but they didn't stop the camera.