Configure the threshold of recording time (in seconds) left on the device before a warning is issued.
camera_error_t camera_set_video_filesize_warning(camera_handle_t handle, uint16_t seconds_remaining)
The handle returned by a call to the camera_open() function.
The desired threshold (in seconds) before the status call function is called when the amount of time is less than the value specified by this argument.
The device has a recording capacity measured in bytes, which can also be expressed as a number of seconds depending on the encoding bit-rate. The recording capacity is indicated as seconds of recording time, which is a reflection of the amount of time left to record the video. While encoding, there is a continual estimation of the how many seconds of recording time remains before the storage device is full.
The camera service invokes the status_callback with status set to CAMERA_STATUS_FILESIZE_WARNING whenever the amount of time left to record video is less than the value set in the seconds_remaining argument. The status_callback is the callback function set when you call the camera_start_photo_viewfinder() or camera_start_video_viewfinder() functions.
Typically, an application would set this to five minutes (or 3000 seconds). Once that threshold is crossed, an application would indicate a low-space warning. You can decide to adjust the threshold lower to receive additional warnings as the recording time approaches zero. For example, you could move the threshold to one minute (60 seconds) for the next warning.