NVIDIA DRIVE OS Linux API Reference5.1.0.2 Release |
Locking and unlocking provides acces to the image surfaces.
Data Structures | |
struct | NvMediaImageSurface |
Image surface descriptor used by NvMediaImageLock. More... | |
struct | NvMediaImageSurfaceMap |
Image surface map descriptor used by NvMediaImageLock. More... | |
Enumerations | |
enum | NvMediaImageLockAccess { NVMEDIA_IMAGE_ACCESS_READ = (1 << 0), NVMEDIA_IMAGE_ACCESS_WRITE = (1 << 1), NVMEDIA_IMAGE_ACCESS_READ_WRITE = (NVMEDIA_IMAGE_ACCESS_READ | NVMEDIA_IMAGE_ACCESS_WRITE) } |
Image lock access types. More... | |
enum | NvMediaArrayLockAccess { NVMEDIA_ARRAY_ACCESS_READ = (1 << 0), NVMEDIA_ARRAY_ACCESS_WRITE = (1 << 1), NVMEDIA_ARRAY_ACCESS_READ_WRITE = (NVMEDIA_ARRAY_ACCESS_READ | NVMEDIA_ARRAY_ACCESS_WRITE) } |
Defines array-lock access types. More... | |
Functions | |
NvMediaStatus | NvMediaImageLock (NvMediaImage *image, uint32_t lockAccessType, NvMediaImageSurfaceMap *surfaceMap) |
Locks an image and returns the associated mapped pointers pointing to the image surface data. More... | |
void | NvMediaImageUnlock (NvMediaImage *image) |
Unlocks an image. More... | |
NvMediaStatus | NvMediaArrayLock (NvMediaArray *handle, NvMediaArrayLockAccess lockAccessType, void **ptr) |
Locks an Array to which data can be written/read without interference from another thread/process. More... | |
void | NvMediaArrayUnlock (NvMediaArray *handle) |
Unlocks an Array. More... | |
NvMediaStatus | NvMediaImagePyramidLock (NvMediaImagePyramid *pyramid, uint32_t lockAccessType, NvMediaImageSurfaceMap *surfaceMap) |
Locks an image pyramid and returns the associated mapped pointers pointing to the image pyramid surface data. More... | |
void | NvMediaImagePyramidUnlock (NvMediaImagePyramid *pyramid) |
Unlocks an image pyramid. More... | |
Defines array-lock access types.
Enumerator | |
---|---|
NVMEDIA_ARRAY_ACCESS_READ |
Read access. |
NVMEDIA_ARRAY_ACCESS_WRITE |
Write access. |
NVMEDIA_ARRAY_ACCESS_READ_WRITE |
Read/Write access. |
Definition at line 109 of file nvmedia_array.h.
Image lock access types.
Enumerator | |
---|---|
NVMEDIA_IMAGE_ACCESS_READ |
Read access. |
NVMEDIA_IMAGE_ACCESS_WRITE |
Write access. |
NVMEDIA_IMAGE_ACCESS_READ_WRITE |
Read/Write access. |
Definition at line 201 of file nvmedia_image.h.
NvMediaStatus NvMediaArrayLock | ( | NvMediaArray * | handle, |
NvMediaArrayLockAccess | lockAccessType, | ||
void ** | ptr | ||
) |
Locks an Array to which data can be written/read without interference from another thread/process.
If the array is being used by an internal engine, this function waits until the completion of this operation.
[in] | handle | Handle to the array to be locked. |
[in] | lockAccessType | Determines the access type. |
[out] | ptr | CPU mapped pointer to which data can be read/written. The following access types are supported and may be OR'd together:
|
void NvMediaArrayUnlock | ( | NvMediaArray * | handle | ) |
Unlocks an Array.
To be called after data has been written to it/read from it by client.
[in] | handle | Handle to the array to be unlocked. |
NvMediaStatus NvMediaImageLock | ( | NvMediaImage * | image, |
uint32_t | lockAccessType, | ||
NvMediaImageSurfaceMap * | surfaceMap | ||
) |
Locks an image and returns the associated mapped pointers pointing to the image surface data.
Only images created without the NVM_SURF_ATTR_CPU_ACCESS_UNMAPPED attribute can be accessed by CPU. If an image is being used by an internal engine this function waits until the completion of this operation.
[in] | image | Image object |
[in] | lockAccessType | Determines the access type. The following access types are supported and may be OR'd together: NVMEDIA_IMAGE_ACCESS_READ Read access NVMEDIA_IMAGE_ACCESS_WRITE Write access NVMEDIA_IMAGE_ACCESS_READ_WRITE Read/Write access |
[out] | surfaceMap | Surface descriptors |
NvMediaStatus NvMediaImagePyramidLock | ( | NvMediaImagePyramid * | pyramid, |
uint32_t | lockAccessType, | ||
NvMediaImageSurfaceMap * | surfaceMap | ||
) |
Locks an image pyramid and returns the associated mapped pointers pointing to the image pyramid surface data.
Only images created without the NVM_SURF_ATTR_CPU_ACCESS_UNMAPPED attribute can be accessed by CPU. If an image is being used by an internal engine this function waits until the completion of this operation.
[in] | pyramid | Image pyramid object |
[in] | lockAccessType | Determines the access type. The following access types are supported and may be OR'd together: NVMEDIA_IMAGE_ACCESS_READ Read access NVMEDIA_IMAGE_ACCESS_WRITE Write access NVMEDIA_IMAGE_ACCESS_READ_WRITE Read/Write access |
[out] | surfaceMap | Array of Surface descriptors per level. |
void NvMediaImagePyramidUnlock | ( | NvMediaImagePyramid * | pyramid | ) |
Unlocks an image pyramid.
Internal engines cannot use a surface until it is locked.
[in] | pyramid | Pyramid object to unlock |
void NvMediaImageUnlock | ( | NvMediaImage * | image | ) |
Unlocks an image.
Internal engines cannot use a surface until it is locked.
[in] | image | Image object to unlock |