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:

  1. The application creates a NvSciBufAttrList.
  2. The application queries NvMedia to fill in the NvSciBufAttrList by passing a set of NvMediaImage allocation attributes and NvMediaSurfaceType as input to NvMediaImageFillNvSciBufAttrs API.
  3. The application may choose to set any of the public NvSciBufAttributes, which are not set by NvMedia.
  4. If the same NvSciBuf object is shared with other UMDs, then the application can get the corresponding NvSciBufAttrList from the respective UMD.
  5. The application asks NvSciBuf to reconcile all the filled NvSciBufAttrLists and then allocates an NvSciBuf object.
  6. The application then queries NvMedia to create an NvMediaImage from the allocated NvSciBuf object by calling NvMediaImageCreateFromNvSciBuf API.
  7. An NvMediaImage can be passed as input/output to any of the NvMedia APIs that accept NvMediaImage as an argument.