Functions
Callback Data Support Functions

Functions for managing data received from callbacks. More...

Functions

TangoErrorType TangoSupport_createImageBufferManager (TangoImageFormatType format, int width, int height, TangoSupport_ImageBufferManager **manager)
 Create an object for maintaining a set of image buffers for a specified image format and size.
TangoErrorType TangoSupport_freeImageBufferManager (TangoSupport_ImageBufferManager *manager)
 Delete the image buffer manager object.
TangoErrorType TangoSupport_getLatestImageBuffer (TangoSupport_ImageBufferManager *manager, TangoImageBuffer **image_buffer)
 Check if updated color image data is available. If so, swap new data to the front buffer and set image_buffer to point to the front buffer. Multiple calls to this function must be made from the same thread.
TangoErrorType TangoSupport_getLatestImageBufferAndNewDataFlag (TangoSupport_ImageBufferManager *manager, TangoImageBuffer **image_buffer, bool *new_data)
 Check if updated color image data is available. If so, swap new data to the front buffer and set image_buffer to point to the front buffer. Multiple calls to this function must be made from the same thread. Set new_data to true when image_buffer points to new data.
TangoErrorType TangoSupport_setImageBufferCopyRegion (TangoSupport_ImageBufferManager *manager, int y_only, uint32_t begin_line, uint32_t end_line)
 Limit copying of the incoming image to a specific range of scan lines.
TangoErrorType TangoSupport_updateImageBuffer (TangoSupport_ImageBufferManager *manager, const TangoImageBuffer *image_buffer)
 Updates the back buffer of the manager with new data from the callback. This should be called from the image callback thread.

Detailed Description

Functions for managing data received from callbacks.


Function Documentation

TangoErrorType TangoSupport_createImageBufferManager ( TangoImageFormatType  format,
int  width,
int  height,
TangoSupport_ImageBufferManager **  manager 
)

Create an object for maintaining a set of image buffers for a specified image format and size.

Parameters:
formatThe format of the color camera image.
widthThe width in pixels of the color images.
heightThe height in pixels of the color images.
managerA handle to the manager object.
Returns:
TANGO_SUCCESS if allocation was successful; TANGO_INVALID if manager is NULL.
TangoErrorType TangoSupport_freeImageBufferManager ( TangoSupport_ImageBufferManager *  manager)

Delete the image buffer manager object.

Parameters:
managerA handle to the manager to delete.
Returns:
TANGO_SUCCESS if memory was freed successfully; TANGO_INVALID otherwise.
TangoErrorType TangoSupport_getLatestImageBuffer ( TangoSupport_ImageBufferManager *  manager,
TangoImageBuffer **  image_buffer 
)

Check if updated color image data is available. If so, swap new data to the front buffer and set image_buffer to point to the front buffer. Multiple calls to this function must be made from the same thread.

Parameters:
managerA handle to the image buffer manager.
image_bufferAfter the call contains a pointer to the most recent camera image buffer.
Returns:
Returns TANGO_SUCCESS if params are valid. Returns TANGO_INVALID otherwise.
TangoErrorType TangoSupport_getLatestImageBufferAndNewDataFlag ( TangoSupport_ImageBufferManager *  manager,
TangoImageBuffer **  image_buffer,
bool *  new_data 
)

Check if updated color image data is available. If so, swap new data to the front buffer and set image_buffer to point to the front buffer. Multiple calls to this function must be made from the same thread. Set new_data to true when image_buffer points to new data.

Parameters:
managerA handle to the image buffer manager.
image_bufferAfter the call contains a pointer to the most recent camera image buffer.
new_dataTrue if latest_point_cloud points to new data. False otherwise.
Returns:
Returns TANGO_SUCCESS if params are valid. Returns TANGO_INVALID otherwise.
TangoErrorType TangoSupport_setImageBufferCopyRegion ( TangoSupport_ImageBufferManager *  manager,
int  y_only,
uint32_t  begin_line,
uint32_t  end_line 
)

Limit copying of the incoming image to a specific range of scan lines.

This is an optimization when only a portion of the image is required. For the begin_line and end_line parameters, the following must be true:

0 <= begin_line <= end_line <= (image_height - 1)

Parameters:
managerA handle to the image buffer manager.
y_onlyIf non-zero and the image is YUV, copy only the Y-portion (grayscale intensities) of the image. If zero, copy Y and UV portions.
begin_lineThe first scan line row to copy. Must be less than end_line.
end_lineThe last scan line row to copy. Must be greater than begin_line and smaller than the image height.
Returns:
TANGO_SUCCESS if copy region was updated successfully, or TANGO_INVALID if the preconditions are not satisfied.
TangoErrorType TangoSupport_updateImageBuffer ( TangoSupport_ImageBufferManager *  manager,
const TangoImageBuffer image_buffer 
)

Updates the back buffer of the manager with new data from the callback. This should be called from the image callback thread.

Parameters:
managerA handle to the image buffer manager.
image_bufferNew image buffer data from the camera callback thread.
Returns:
Returns TANGO_SUCCESS on update of the back image buffer. Returns TANGO_INVALID otherwise.


tango_support
Author(s):
autogenerated on Thu Jun 6 2019 19:49:51