camera_start_video()
Start encoding video.
Synopsis:
#include <camera/camera_api.h>
camera_error_t camera_start_video(camera_handle_t handle, const char *filename, void(*video_callback)(camera_handle_t, camera_buffer_t *, void *), void(*status_callback)(camera_handle_t, camera_devstatus_t, uint16_t, void *), void *arg)
Arguments:
- handle
-
The handle returned by a call to the camera_open() function.
- filename
-
The name of the file to save the video to.
- video_callback
-
A function pointer to a function with the following signature: void function_name( camera_handle_t, camera_buffer_t*, void*). The function is a callback function to invoke when the uncompressed video frame is available. You can use c NULL if no function needs to be called. For information about the callback arguments, see About callback-mode.
- status_callback
-
A function pointer to a function with the following signature: void function_name(camera_handle_t, camera_devstatus_t, uint16_t, void*). The function is a callback that gets invoked when status events occur. You can use NULL if no function needs to be called. For information about the callback arguments, see About callback-mode.
- arg
-
The argument passed to all callback functions, which is the last argument in the callback functions.
Library:
libcamapiDescription:
This function can only be called if the CAMERA_FEATURE_VIDEO is available. You can determine whether the feature is available by calling the camera_can_feature() function.
Video is encoded based on the configured properties. You must use the camera_start_video_viewfinder() to start the viewfinder before you call this function. The audio track will be taken from the active audio input on the device.
Returns:
CAMERA_OK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.