Provides image surface read and write by the client application for diagnostic purposes.
Functions | |
NvMediaStatus | NvMediaImagePutBits (NvMediaImage *image, const NvMediaRect *dstRect, void **srcPntrs, const uint32_t *srcPitches) |
Reads a client memory buffer and writes the content into an NvMedia image surface. More... | |
NvMediaStatus | NvMediaImageGetBits (const NvMediaImage *image, const NvMediaRect *srcRect, void **dstPntrs, const uint32_t *dstPitches) |
Reads an NvMedia image and writes the content into a client memory buffer. More... | |
NvMediaStatus NvMediaImageGetBits | ( | const NvMediaImage * | image, |
const NvMediaRect * | srcRect, | ||
void ** | dstPntrs, | ||
const uint32_t * | dstPitches | ||
) |
Reads an NvMedia image and writes the content into a client memory buffer.
To use NvMediaImageGetBits() while creating an NvMedia image, NvMediaSurfAllocAttrType must be set to NVM_SURF_ATTR_CPU_ACCESS_UNCACHED or NVM_SURF_ATTR_CPU_ACCESS_CACHED in NvMediaSurfAllocAttr.
[in] | image | A pointer to the source NvMediaImage type surface. You must lock the surface with NvMediaImageLock() before calling this function. |
[in] | srcRect | A pointer to a structure containing coordinates of the rectangle in the source surface from which the client surface is to be copied. Set srcRect to NULL to specify a rectangle of full surface size. srcRect is supported only for an NvMediaImage whose NvMediaSurfaceType was derived with the 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] | dstPntrs | A pointer to an array of pointers to the destination surface planes. For an NvMediaImage whose NvMediaSurfaceType was derived with NVM_SURF_ATTR_SURF_TYPE set to NVM_SURF_ATTR_SURF_TYPE_RGBA or NVM_SURF_ATTR_SURF_TYPE_RAW, NvMediaImageGetBits() expects only one dstPntrs and one dstPitches. For an NvMediaImage whose NvMediaSurfaceType was derived with the NVM_SURF_ATTR_SURF_TYPE attribute set to NVM_SURF_ATTR_SURF_TYPE_YUV and:
|
[in] | dstPitches | A pointer to an array of pitch values for the destination surface planes. There number of pitch values must be the same as the number of surface planes. |
NVMEDIA_STATUS_OK | indicates that the call was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that one or more input parameters are invalid. |
NVMEDIA_STATUS_ERROR | indicates that the image is not locked. |
NvMediaStatus NvMediaImagePutBits | ( | NvMediaImage * | image, |
const NvMediaRect * | dstRect, | ||
void ** | srcPntrs, | ||
const uint32_t * | srcPitches | ||
) |
Reads a client memory buffer and writes the content into an NvMedia image surface.
To use NvMediaImagePutBits() while creating an NvMedia image, you must set NvMediaSurfAllocAttrType in NvMediaSurfAllocAttr to NVM_SURF_ATTR_CPU_ACCESS_UNCACHED or NVM_SURF_ATTR_CPU_ACCESS_CACHED.
[in] | image | A pointer to the destination NvMediaImage type surface. You must lock the image with NvMediaImageLock() before calling this function. |
[in] | dstRect | A pointer to a structure containing co-ordinates of the rectangle in the destination surface to which the client surface is to be copied. Set dstRect to NULL to specify a rectangle of full surface size. dstRect is supported only for an NvMediaImage whose NvMediaSurfaceType was derived with the 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] | srcPntrs | A pointer to an array of pointers to the client surface planes. For an NvMediaImage whose NvMediaSurfaceType was derived with the NVM_SURF_ATTR_SURF_TYPE attribute set to NVM_SURF_ATTR_SURF_TYPE_RGBA or NVM_SURF_ATTR_SURF_TYPE_RAW, NvMediaImagePutBits() expects only one srcPntrs and one srcPitches. For NvMediaImages whose NvMediaSurfaceType was derived with the NVM_SURF_ATTR_SURF_TYPE attribute set to NVM_SURF_ATTR_SURF_TYPE_YUV and:
|
[in] | srcPitches | A pointer to an array of pitch values for the client surface planes. The number of pitch values must be the same as the number of surface planes on srcPntrs. |
NVMEDIA_STATUS_OK | indicates that the call was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that one or more input parameters are invalid. |
NVMEDIA_STATUS_ERROR | indicates that the image is not locked. |