camera_set_video_filesize_warning()

Configure the threshold of recording time left on the device before a warning is issued.

Synopsis:

#include <camera/camera_api.h>
 
camera_error_t camera_set_video_filesize_warning(camera_handle_t handle,                 
                                                 uint16_t seconds_remaining)

Since:

BlackBerry 10.0.0

Arguments:

handle

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

seconds_remaining

The desired threshold (in seconds) remaining in a recording when a warning status event will be delivered.

Library:

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

Description:

The device has a recording capacity measured in bytes, which can also be expressed as a number of seconds depending on the encoding bit-rate. The recording capacity is indicated as seconds of recording time, which is a reflection of the amount of time left before a video recording will be stopped. While encoding, there is a continual estimation of the how many seconds of recording time remains before the storage device is full.

The camera will deliver a status event to the application with a value of CAMERA_STATUS_FILESIZE_WARNING when the estimated amount of time left to record video is less than the value set in the seconds_remaining argument. The status event is delivered to any status callback functions registered when you called the camera_start_viewfinder() or camera_start_video() functions. The status event will also be delivered via any sigevent that you enabled using the camera_enable_status_event() function. See About event mode and About callback mode for additional details.

The time remaining that is calculated is an estimate based on the encoder's past performance and is subject to jitter. For this reason, the calculated time remaining may not be perfectly accurate.

Typically, an application would set this to five minutes (or 3000 seconds). Once that threshold is crossed, an application would indicate a low-space warning. You can decide to adjust the threshold lower to receive additional warnings as the recording time approaches 0. For example, you could move the threshold to one minute (60 seconds) for the next warning.

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-11-11



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

comments powered by Disqus