Updated: October 28, 2024 |
Create and open the next available video file on the camera roll for writing
#include <camera/camera_api.h>
camera_error_t camera_roll_open_video(camera_handle_t handle, int *fd, char *filename, int namelen, camera_roll_video_fmt_t fmt)
The camera roll is a directory on the device where the camera application saves files. The Camera library manages unique filenames on behalf of the application. Use this function to retrieve the next available file from the camera roll. To do so, you require CAMERA_MODE_ROLL access mode when you first call the camera_open() function.
After camera_roll_open_video() successfully returns, a file is created and opened for writing. To close the file, you must call the camera_roll_close_video() function. For information about changing the roll path, see the camera_roll_set_path() function.
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.