camera_start_video_viewfinder()
(Deprecated) Start the video viewfinder on the camera
Synopsis:
#include <camera/camera_api.h>
camera_error_t camera_start_video_viewfinder(camera_handle_t handle, void(*viewfinder_callback)(camera_handle_t, camera_buffer_t *, void *), void(*status_callback)(camera_handle_t, camera_devstatus_t, uint16_t, void *), void *arg)
Since:
BlackBerry 10.0.0
Arguments:
- handle
-
The handle returned by a call to the camera_open() function.
- viewfinder_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 that is invoked when a viewfinder buffer becomes available. Set this argument to 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 is invoked when status events occur. Set this argument to 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:
libcamapi (For the qcc command, use the -l camapi option to link against this library)Description:
Deprecated:
As of CAMERA_API_VERSION 3 (BlackBerry 10.3.0). Instead, use the camera_start_viewfinder() function. For more information about new and deprecated viewfinder functionality, see Viewfinder modes.
Only call this function if the CAMERA_FEATURE_VIDEO feature is available. You can determine whether this feature is available by calling the camera_can_feature() function.
- Use the camera_set_videovf_property() function to configure the video viewfinder.
- Use the camera_set_video_property() function to set any video properties.
- Create a screen window to be the parent of the child viewfinder window that will be created by this call.
Once the viewfinder is running, you can record videos, configure scene modes, adjust zoom levels, and other operations. In addition, you can reposition or resize the viewfinder window using the Screen and Windowing API. In order to retrieve a window handle to the viewfinder window that is created, you must listen for the appropriate SCREEN_EVENT_CREATE event using the Screen and Windowing API.
It is important that your application follows the guidelines for resource management outlined in Camera resource management. If you do not observe these guidelines, your application is at risk of crashing due to memory access errors when resource arbitration is performed by the operating system.
Returns:
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.
Last modified: 2014-09-30