NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Image Read and Write by Client

Detailed Description

Provides image surface read and write by the client application for diagnostic purposes.

Warning
These functions are for diagnostics purposes only and should not be used in production code.

Functions

NvMediaStatus NvMediaImagePutBits (NvMediaImage *image, NvMediaRect *dstRect, void **srcPntrs, uint32_t *srcPitches)
 Reads a client memory buffer and writes the content into an NvMedia image surface. More...
 
NvMediaStatus NvMediaImageGetBits (NvMediaImage *image, NvMediaRect *srcRect, void **dstPntrs, uint32_t *dstPitches)
 NvMediaImageGetBits reads an NvMedia image and writes the content into a client memory buffer. More...
 

Function Documentation

NvMediaStatus NvMediaImageGetBits ( NvMediaImage image,
NvMediaRect srcRect,
void **  dstPntrs,
uint32_t *  dstPitches 
)

NvMediaImageGetBits reads an NvMedia image and writes the content into a client memory buffer.

Parameters
[in]imageSource NvMediaImage type surface. The surface must be locked using NvMediaImageLock prior to calling this function.
[in]srcRectStructure containing co-ordinates of the rectangle in the source surface from which the client surface is to be copied. Setting srcRect to NULL implies rectangle of full surface size. srcRect is supported only for NvMediaImages whose NvMediaSurfaceType was derived with NVM_SURF_ATTR_SURF_TYPE attribute set to NVM_SURF_ATTR_SURF_TYPE_RGBA or NVM_SURF_ATTR_SURF_TYPE_RAW. For all other surface types, it is ignored.
[out]dstPntrsArray of pointers to the destination surface planes
[in]dstPitchesArray of pitch values for the destination surface planes
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_BAD_PARAMETER if any of the input parameters is invalid.
NVMEDIA_STATUS_ERROR if the image is not locked.
NvMediaStatus NvMediaImagePutBits ( NvMediaImage image,
NvMediaRect dstRect,
void **  srcPntrs,
uint32_t *  srcPitches 
)

Reads a client memory buffer and writes the content into an NvMedia image surface.

Parameters
[in]imageThe destination NvMediaImage type surface. The image must be locked using NvMediaImageLock prior to calling this function.
[in]dstRectStructure containing co-ordinates of the rectangle in the destination surface to which the client surface is to be copied. Setting dstRect to NULL implies rectangle of full surface size. dstRect is supported only for NvMediaImages whose NvMediaSurfaceType was derived with NVM_SURF_ATTR_SURF_TYPE attribute set to NVM_SURF_ATTR_SURF_TYPE_RGBA or NVM_SURF_ATTR_SURF_TYPE_RAW. For all other surface types, it is ignored.
[in]srcPntrsArray of pointers to the client surface planes
[in]srcPitchesArray of pitch values for the client surface planes
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_BAD_PARAMETER if any of the input parameters is invalid.
NVMEDIA_STATUS_ERROR if the image is not locked.