techyian / MMALSharp

C# wrapper to Broadcom's MMAL with an API to the Raspberry Pi camera.
MIT License
195 stars 33 forks source link

Timeout and Timelapse helper method issues #102

Closed techyian closed 4 years ago

techyian commented 4 years ago

There are regressions in these helper methods. The following issues have been found:

Regressed since v.0.5. In v.0.4.x, code in MMALComponentBase.cs Start() method handled the creation of files each time the output port was started. The creation of files moved to the capture handler for v0.5 and hence for multiple iterations we are not creating a new file.

techyian commented 4 years ago

When adding NewFile() into the iteration loop within these helper methods, local testing shows that for every other file created, EOS is signalled immediately by MMAL strangely and therefore no data is written to the file. Need to investigate further.

techyian commented 4 years ago

Latest commit appears to have sorted this issue. 2 things fixed here: a) Added NewFile method after each timelapse/timeout iteration, b) ensure the camera is stopped before cleaning the port pools.