NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.0 Release
For Test and Development only

Detailed Description

Defines and manages image objects.

NvMediaImage objects are video RAM surfaces storing YUV, RGBA or RAW data. They can store one or more images depending on the class. NvMediaImage objects are created with NvMediaImageCreateNew() or NvMediaImageCreateFromNvSciBuf() and destroyed with NvMediaImageDestroy().

Data Structures

struct  NvMediaImageRec
 Holds a handle representing image objects. More...
 
struct  NvMediaImageGroup
 Holds a handle representing an image group. More...
 

Macros

#define NVMEDIA_MAX_IMAGE_GROUP_SIZE
 Maximum number of images in an image group. More...
 
#define NVMEDIA_IMAGE_TIMEOUT_INFINITE
 Infinite timeout for NvMediaImageGetStatus(). More...
 

Typedefs

typedef struct NvMediaImageRec NvMediaImage
 

Functions

NvMediaStatus NvMediaImageGetVersion (NvMediaVersion *version)
 Gets the version of the NvMedia Image library. More...
 
NvMediaImageNvMediaImageCreateNew (NvMediaDevice *device, NvMediaSurfaceType type, const NvMediaSurfAllocAttr *attrs, uint32_t numAttrs, uint32_t flags)
 Allocates an image object. More...
 
void NvMediaImageDestroy (const NvMediaImage *image)
 Destroys an image object created by NvMediaImageCreateNew() or NvMediaImageCreateFromNvSciBuf(). More...
 

Macro Definition Documentation

◆ NVMEDIA_IMAGE_TIMEOUT_INFINITE

#define NVMEDIA_IMAGE_TIMEOUT_INFINITE

Infinite timeout for NvMediaImageGetStatus().

Definition at line 66 of file nvmedia_image.h.

◆ NVMEDIA_MAX_IMAGE_GROUP_SIZE

#define NVMEDIA_MAX_IMAGE_GROUP_SIZE

Maximum number of images in an image group.

Definition at line 60 of file nvmedia_image.h.

Typedef Documentation

◆ NvMediaImage

typedef struct NvMediaImageRec NvMediaImage

Definition at line 110 of file nvmedia_image.h.

Function Documentation

◆ NvMediaImageCreateNew()

NvMediaImage* NvMediaImageCreateNew ( NvMediaDevice device,
NvMediaSurfaceType  type,
const NvMediaSurfAllocAttr attrs,
uint32_t  numAttrs,
uint32_t  flags 
)

Allocates an image object.

Upon creation, the contents are undefined.

Parameters
[in]deviceThe NvMediaDevice.
[in]typeSurface format type obtained by NvMediaSurfaceFormatGetType().
[in]attrsAn array of surface alloc attributes for surface creation.
[in]numAttrsNumber of attributes in attrs.
[in]flagsFlags for module hints (reserved for future use).
Returns
The new image's handle if the call is successful, or NULL otherwise.

◆ NvMediaImageDestroy()

void NvMediaImageDestroy ( const NvMediaImage image)

Destroys an image object created by NvMediaImageCreateNew() or NvMediaImageCreateFromNvSciBuf().

Parameters
[in]imageThe image to destroy.

◆ NvMediaImageGetVersion()

NvMediaStatus NvMediaImageGetVersion ( NvMediaVersion version)

Gets the version of the NvMedia Image library.

Parameters
[in]versionA pointer to an NvMediaVersion structure belonging to the client. It should be a valid non-null pointer.
Returns
A status code; NVMEDIA_STATUS_OK if the call was successful, or NVMEDIA_STATUS_BAD_PARAMETER if version is an invalid pointer.