Updated: October 28, 2024 |
Impose a limit to the size of the recording file
#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 file size 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 this size limit will be reached, the camera will deliver a CAMERA_STATUS_FILESIZE_LIMIT_WARNING status event to the application. The camera will stop the recording when it estimates that the recording file size would exceed the limit if it were permitted to keep recording. A CAMERA_STATUS_FILESIZE_ERROR status event will be sent to the application when this occurs.
You can call this function only when an active recording created by calling camera_start_video() is still active.
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.