Retrieve viewfinder buffers from the camera.


#include <camera/camera_api.h>
camera_error_t camera_get_viewfinder_buffers(camera_handle_t handle,                 
                                             camera_eventkey_t key,                 
                                             camera_buffer_t *inbuffer,                 
                                             camera_buffer_t *outbuffer)


BlackBerry 10.0.0



The handle returned by a call to the camera_open() function.


The key value that was returned by a call to the camera_enable_viewfinder_event() function.


A pointer to the input camera_buffer_t struct returned by the camera.


A pointer to the output camera_buffer_t struct returned by the camera.


libcamapi (For the qcc command, use the -l camapi option to link against this library)


Use this function to retrieve buffers with viewfinder data. Only call this function after receiving a viewfinder event.

Viewfinder events are enabled using camera_enable_viewfinder_event(). Use the camera_return_buffer() when you are finished processing a buffer. For more information about event mode, see scope="peer">About event mode. For more information about when inbuffer and outbuffer are used, see camera_eventmode_t.

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.


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

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus