camera_set_video_filesize_limit()
Impose a limit to the size of the recording file
Synopsis:
#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)Arguments:
- handle
- The handle returned by a call to the camera_open() function.
- size_limit
- The file size limit to impose, in bytes. Set this to 0 to disable any previous file size limit.
- prior_warning_seconds
- The number of seconds prior to the size limit being reached to issue a warning status event.
Library:
libcamapiDescription:
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.
Using event modeand
Using callback mode.
Returns:
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.
