I'm making a project using a compute module and piCamera that uses a continuously running circular buffer to capture data.
When I start recording, I get a nice exception if the camera isn't connected. The problem is that I get nothing if I disconnect the camera mid recording. Trying to capture some video just gives me whatever was in the buffer before.
This is a pretty big problem in my application, I would prefer to have no video rather than misleading video. Is there any way I can find out if the camera is still working and connected? I can't stop and start the video to do this, I want to poll a function or similiar. Preferably actually outputting data rather than just having the I2C connected.