Start encoding video.
#include <camera/camera_api.h>
camera_error_t camera_start_encode(camera_handle_t handle,
void(*video_callback)(camera_handle_t, camera_buffer_t *, void *),
void(*enc_video_callback)(camera_handle_t, camera_buffer_t *, void *),
void(*enc_audio_callback)(camera_handle_t, camera_buffer_t *, void *),
void(*status_callback)(camera_handle_t, camera_devstatus_t, uint16_t, void *),
void *arg)
BlackBerry 10.0.0
The handle returned by a call to the camera_open() function.
void function_name( camera_handle_t, camera_buffer_t*, void* );The function is a callback function that is invoked when an uncompressed video frame is available. You can use NULL if no function needs to be called. For information about the callback arguments, see About callback mode.
void function_name( camera_handle_t, camera_buffer_t*, void* );The function is a callback function that is invoked when an encoded video frame is available. This argument is mandatory and can't be a NULL value. For information about the callback arguments, see About callback mode.
void function_name( camera_handle_t, camera_buffer_t*, void* );The function is a callback function that is invoked when an encoded audio frame is available. You can use NULL if no function needs to be called. For information about the callback arguments, see About callback mode.
void function_name( camera_handle_t, camera_devstatus_t, uint16_t, void* );The function is a callback function that is 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.
The argument passed to all callback functions, which is the last argument in the callback functions.
This function can only be called if the CAMERA_FEATURE_VIDEO feature is available. You can determine whether this feature is available by calling the camera_can_feature() function.
The viewfinder must be started in a viewfinder mode that supports video encoding. For more information about viewfinder modes, see Viewfinder modes.
Video is encoded based on the configured properties. The audio track is encoded from the active audio input on the device.
For example, it is illegal to mute or modify the shutter sound of a camera application in Japan and Korea. Ensure that you comply with the laws and regulations for the countries in which you distribute your application. For more information, see the BlackBerry World Vetting Criteria at https://appworld.blackberry.com/isvportal/home.do.
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed. CAMERA_EINVAL is returned if there is a mismatch in video properties set using camera_set_video_property() function.