camera_hdr_take_photo()

Takes an HDR photo using the camera.

Synopsis:

#include <camera/camera_hdr.h>
 
camera_error_t camera_hdr_take_photo(camera_hdr_t hdr,                 
                                     void(*shutter_callback)(camera_handle_t,                 
                                     void *),                 
                                     void(*raw_callback)(camera_handle_t,                 
                                     camera_buffer_t *,                 
                                     void *),                 
                                     void(*postview_callback)(camera_handle_t,                 
                                     camera_buffer_t *,                 
                                     void *),                 
                                     void(*image_callback)(camera_handle_t,                 
                                     camera_buffer_t *,                 
                                     void *),                 
                                     void(*image_callback_unprocessed)(camera_handle_t,                 
                                     camera_buffer_t *,                 
                                     void *),                 
                                     void(*raw_callback_unprocessed)(camera_handle_t,                 
                                     camera_buffer_t *,                 
                                     void *),                 
                                     void *arg,                 
                                     bool wait)

Since:

BlackBerry 10.3.0

Arguments:

hdr

The HDR session handle obtained from a call to camera_hdr_create().

shutter_callback

A function pointer to a function with the following signature: void function_name( camera_handle_t, void*). The function is a callback that gets invoked when the input image capture completes and the HDR processing begins. Typically, the callback function plays a shutter sound. You can use NULL if no function needs to be called.

raw_callback

Use NULL. Reserved for future use.

postview_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 gets invoked when the postview (review) image data is available. This callback is used to provide a postview-sized copy of the HDR photo. Typically, the postview-sized photo is used to provide visual feedback by the UI before the final image is available. You can use NULL if no function needs to be called.

image_callback

A function pointer to a function with the following signature: void function_name( camera_handle_t, camera_buffer_t*, void*). The function that is invoked when the final full-resolution HDR image is available. You can use NULL if no function needs to be called.

image_callback_unprocessed

A function pointer to a function with the following signature: void function_name( camera_handle_t, camera_buffer_t*, void*). The function that is invoked when the normal exposure image (no EV offset) is available. Typically, the unprocessed image may be used to provide a "before and after" comparison of the non-HDR and HDR images. Use NULL if no function needs to be called.

raw_callback_unprocessed

Use NULL. Reserved for future use.

arg

The argument passed to all callback functions. See camera_api.h for more information about callbacks.

wait

A boolean value that indicates whether the function blocks or not. If set to true, this function is blocking and returns after all specified callbacks have returned. If set to false, this function call is non-blocking and returns before all specified callbacks have returned.

Library:

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

Description:

The camera used for HDR capture must be bound to the HDR session using camera_hdr_bind_camera(). The user-provided callback functions are invoked to deliver the image data to your application. There can be only one HDR capture active at any time per HDR session.

This function can only be used in Realtime HDR capture mode.

See camera_api.h for more information regarding the operation of callback functions.

Note: The Camera Features library does not automatically play audible shutter sounds when a picture is taken or a video is recorded. Camera applications must supply their own sound when a photo is captured or a video recording begins and ends. While you can choose to not have a shutter sound when taking a picture - you are responsible to ensure that the application adheres to the local laws of the regions in which you wish to distribute the application.

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.

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-06-24



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

comments powered by Disqus