Impose a limit to the recorded file size
#include <camera/camera_api.h>
camera_error_t camera_set_video_filesize_limit(camera_handle_t handle, uint64_t size_limit, uint32_t prior_warning_seconds)
A limit can be imposed on any video recording that was started using camera_start_video(). When there is less than a programmed number of seconds before the file size limit is reached, the camera will deliver a status event to the application with a value of CAMERA_STATUS_FILESIZE_LIMIT_WARNING. The camera will stop the recording when it is estimated that the recording file size would exceed the file size limit if it would be permitted to continue recording. A status event will be sent to the application with a value of CAMERA_STATUS_FILESIZE_ERROR when this occurs.
Note that you can only call this API when an active recording created by calling camera_start_video() is still active.
The status event is delivered to any status callback functions registered when you called the camera_start_viewfinder() or camera_start_video() functions. The status event will also be delivered via any sigevent that you enabled using the camera_enable_status_event() function. For more information, see "Event mode" and "Callback mode" in the Camera Framework Developer's Guide
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.