I've written a C application which primary feature is to display the camera input full screen, with some UI overlay, with minimal lag. I've used MMAL to capture the camera, and OpenVG to draw the overlay.
Now I'd like to add as a secondary feature (as in, it shouldn't compromise the primary feature) recording of the whole screen to a video file for archiving purposes. The video should ideally record exactly what was shown (minus compression artifacts).
Is there any way I could feed the whole screen to some video encoder which ideally uses the hardware encoder? For example can I write some MMAL component that would capture the screen and that I'd connect to the MMAL H.264 encoder?