NvMediaImage-NvSciBuf Interaction
This section describes NvMediaImage and NvSciBuf interaction. The following steps show the typical flow to allocate an NvSciBuf object, which can be mapped into an NvMediaImage:
- The application creates a NvSciBufAttrList.
- The application queries NvMedia to fill in the NvSciBufAttrList by passing a set of NvMediaImage allocation attributes and NvMediaSurfaceType as input to
NvMediaImageFillNvSciBufAttrs
API. - The application may choose to set any of the public NvSciBufAttributes, which are not set by NvMedia.
- If the same NvSciBuf object is shared with other UMDs, then the application can get the corresponding NvSciBufAttrList from the respective UMD.
- The application asks NvSciBuf to reconcile all the filled NvSciBufAttrLists and then allocates an NvSciBuf object.
- The application then queries NvMedia to create an NvMediaImage from the allocated NvSciBuf object by calling
NvMediaImageCreateFromNvSciBuf
API. - An NvMediaImage can be passed as input/output to any of the NvMedia APIs that accept NvMediaImage as an argument.