![]() |
NVIDIA DRIVE OS Linux SDK API Reference5.1.12.0 Release |
The NvMedia Array NvSciBuf API encompasses all NvMediaArray NvSciBuf handling functions.
Macros | |
#define | NVMEDIA_ARRAY_NVSCIBUF_VERSION_MAJOR (1u) |
Major version number. More... | |
#define | NVMEDIA_ARRAY_NVSCIBUF_VERSION_MINOR (0u) |
Minor version number. More... | |
Functions | |
NvMediaStatus | NvMediaArrayNvSciBufInit (void) |
Initializes the NvMediaArray NvSciBuf APIs. More... | |
void | NvMediaArrayNvSciBufDeinit (void) |
De-initializes the NvMediaArray NvSciBuf APIs. More... | |
NvMediaStatus | NvMediaArrayFillNvSciBufAttrs (NvMediaDevice *device, NvMediaArrayType type, uint32_t stride, uint32_t numElements, const NvMediaArrayAllocAttr *attrs, uint32_t numAttrs, NvSciBufAttrList attr_h) |
Fills the NvSciBuf attributes used to allocate an array. More... | |
NvMediaStatus | NvMediaArrayCreateFromNvSciBuf (NvMediaDevice *device, NvSciBufObj nvSciBufObj, NvMediaArray **nvmArray) |
Creates NvMediaArray from an NvSciBuf handle. More... | |
NvMediaStatus | NvMediaArrayNvSciBufGetVersion (NvMediaVersion *version) |
Returns version information for the NvMediaArray NvSciBuf API. More... | |
#define NVMEDIA_ARRAY_NVSCIBUF_VERSION_MAJOR (1u) |
Major version number.
Definition at line 37 of file nvmedia_array_nvscibuf.h.
#define NVMEDIA_ARRAY_NVSCIBUF_VERSION_MINOR (0u) |
Minor version number.
Definition at line 39 of file nvmedia_array_nvscibuf.h.
NvMediaStatus NvMediaArrayCreateFromNvSciBuf | ( | NvMediaDevice * | device, |
NvSciBufObj | nvSciBufObj, | ||
NvMediaArray ** | nvmArray | ||
) |
Creates NvMediaArray from an NvSciBuf handle.
This API assumes that nvscibufObj is a pointer to a valid NvSciBufObj.
You must allocate the nvscibufObj before you call this function, using the NvSciBufAttrList filled by NvMediaArrayGetNvSciBufAttrs().
When the application is done using nvmArray, it must call NvMediaArrayDestroy() with nvmArray.
[in] | device | A pointer to the NvMediaDevice. |
[in] | nvSciBufObj | An NvSciBufObj for which an NvMediaArray is to be imported. |
[in,out] | nvmArray | A pointer to a location in which a pointer to an imported NvMediaArray in stored. |
NvMediaStatus NvMediaArrayFillNvSciBufAttrs | ( | NvMediaDevice * | device, |
NvMediaArrayType | type, | ||
uint32_t | stride, | ||
uint32_t | numElements, | ||
const NvMediaArrayAllocAttr * | attrs, | ||
uint32_t | numAttrs, | ||
NvSciBufAttrList | attr_h | ||
) |
Fills the NvSciBuf attributes used to allocate an array.
This function assumes that attr_h is a valid NvSciBufAttrList created by the application.
This API maps the information in type and attrs to NvSciBuf attributes and fills them into NvSciBufAttrList referenced by attr_h.
The following list of NvSciBuf input attributes are set by NvMedia. The application must not set these values.
The following image attribute is not set by NvMedia and it must be set by the application:
After calling this function, the application can call NvSciBufAllocate() with attr_h as input and get an NvSciBufObj as output. Then it can call NvMediaArrayCreateFromNvSciBuf() to create an NvMediaArray from the NvSciBufObj.
[in] | device | A pointer to NvMediaDevice. |
[in] | type | The datatype for elements in the array. |
[in] | stride | Number of strides. |
[in] | numElements | Number of elements. |
[in] | attrs | A pointer to an array of array alloc attributes for array creation. |
[in] | numAttrs | The number of attributes in the array. |
[in,out] | attr_h | A handle to NvSciBufAttrlist to hold the NvSciBuf attributes for the requested NvMediaArray. |
void NvMediaArrayNvSciBufDeinit | ( | void | ) |
De-initializes the NvMediaArray NvSciBuf APIs.
NvMediaArrayFillNvSciBufAttrs() and NvMediaArrayCreateFromNvSciBuf() cannot be called after calling this function.
NvMediaStatus NvMediaArrayNvSciBufGetVersion | ( | NvMediaVersion * | version | ) |
Returns version information for the NvMediaArray NvSciBuf API.
[out] | version | A pointer to a NvMediaVersion in which the function may store version information. |
NvMediaStatus NvMediaArrayNvSciBufInit | ( | void | ) |
Initializes the NvMediaArray NvSciBuf APIs.
This function must be called before calling NvMediaArrayFillNvSciBufAttrs() and NvMediaArrayCreateFromNvSciBuf().