Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 52 additions & 4 deletions utils/include/tivx_utils_ipc_ref_xfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,20 @@ typedef struct
vx_size size;
} user_data_object;

} object; /* Union to hold different types of metadata */
/*!< \brief structure containing information about object array
used when type is set to VX_TYPE_OBJECT_ARRAY */
struct {
/*!< \brief The number of image objects */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also describe data objects generally

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modified

vx_uint32 num_items;
/*!< \brief VX type of the object, must be image */
vx_enum item_type;
} object_array;

/*!< \brief structure containing information about raw image
used when type is set to TIVX_TYPE_RAW_IMAGE */
tivx_raw_image_create_params_t raw_image;
/*!< \brief structure containing information about raw image
used when type is set to TIVX_TYPE_RAW_IMAGE */
tivx_raw_image_create_params_t raw_image;

} object; /* Union to hold different types of metadata */

} tivx_utils_meta_format_t;

Expand Down Expand Up @@ -248,6 +257,24 @@ typedef struct

} tivx_utils_ref_ipc_msg_t;

/**
* \brief Export the object array, so that the information
* could be transferred over Linux/QNX IPC mechanism to a remote process.
* This is just a wrapper for tivx_utils_export_ref_for_ipc_xfer.
*
* \param [in] ref A valid openVX reference for an object array of images
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not restricted to contain only images, right? I believe this could describe data objects in general

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, comment modified

* \param [out] numMessages Number of IPC messages after export
* \param [out] ipcMsgHandle Exported object array metadata
* \param [out] ipcMsgArray Array of pointers to exported item data
*
* \return VX_SUCCESS on success, else failure
*
*/
vx_status vx_utils_export_ref_for_ipc_xfer_objarray(const vx_reference ref,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these functions be changed from "vx" to "tivx"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

vx_uint32 *numMessages,
tivx_utils_ref_ipc_msg_t *ipcMsgHandle,
tivx_utils_ref_ipc_msg_t ipcMsgArray[]);

/**
* \brief Export the internal handle information of a valid reference as a
* buffer descriptor along with meta information so that the information
Expand All @@ -273,6 +300,27 @@ typedef struct
vx_status tivx_utils_export_ref_for_ipc_xfer(const vx_reference ref,
tivx_utils_ref_ipc_msg_t *ipcMsg);

/**
* \brief Import the external handle information of a valid reference as a
* buffer descriptor along with meta information exchanged via Linux/
* QNX IPC mechanism.
*
* \param [in] context A valid openVX context
* \param [in] ipcMsgHandle Exported object array information
* \param [in] ipcMsgArray Array of exported image information
* \param [in,out] ref A valid openVX reference to import. If *ref is NULL,
* then a new object will be allocated with the imported
* handles and returned. If *ref is not NULL then the object
* will be used to import the handles.
*
* \return VX_SUCCESS on success, else failure
*
*/
vx_status vx_utils_import_ref_from_ipc_xfer_objarray(vx_context context,
tivx_utils_ref_ipc_msg_t *ipcMsgHandle,
tivx_utils_ref_ipc_msg_t ipcMsgArray[],
vx_reference *ref);

/**
* \brief Import the external handle information of a valid reference as a
* buffer descriptor along with meta information exchanged via Linux/
Expand Down
Loading