NVIDIA buffering utility library for use by applications.
|
enum | NvBufferLayout {
NvBufferLayout_Pitch,
NvBufferLayout_BlockLinear
} |
|
enum | NvBufferMemFlags {
NvBufferMem_Read,
NvBufferMem_Write,
NvBufferMem_Read_Write
} |
|
enum | NvBufferColorFormat {
NvBufferColorFormat_YUV420,
NvBufferColorFormat_YVU420,
NvBufferColorFormat_NV12,
NvBufferColorFormat_NV21,
NvBufferColorFormat_UYVY,
NvBufferColorFormat_VYUY,
NvBufferColorFormat_YUYV,
NvBufferColorFormat_YVYU,
NvBufferColorFormat_ABGR32,
NvBufferColorFormat_XRGB32,
NvBufferColorFormat_ARGB32,
NvBufferColorFormat_Invalid
} |
|
|
EGLImageKHR | NvEGLImageFromFd (EGLDisplay display, int dmabuf_fd) |
| This method must be used for getting EGLImage from dmabuf-fd . More...
|
|
int | NvDestroyEGLImage (EGLDisplay display, EGLImageKHR eglImage) |
| This method must be used for destroying EGLImage object. More...
|
|
int | NvBufferCreate (int *dmabuf_fd, int width, int height, NvBufferLayout layout, NvBufferColorFormat colorFormat) |
| Use this method to allocate HW buffer. More...
|
|
int | NvBufferGetParams (int dmabuf_fd, NvBufferParams *params) |
| Use this method to get buffer parameters. More...
|
|
int | NvBufferDestroy (int dmabuf_fd) |
| This method must be used for destroying hw_buffer . More...
|
|
int | NvBufferMemSyncForCpu (int dmabuf_fd, unsigned int plane, void **pVirtAddr) |
| This method must be used for hw memory cache sync for the CPU. More...
|
|
int | NvBufferMemSyncForDevice (int dmabuf_fd, unsigned int plane, void **pVirtAddr) |
| This method must be used for hw memory cache sync for device. More...
|
|
int | NvBufferMemMap (int dmabuf_fd, unsigned int plane, NvBufferMemFlags memflag, void **pVirtAddr) |
| This method must be used for getting mem mapped virtual Address of the plane. More...
|
|
int | NvBufferMemUnMap (int dmabuf_fd, unsigned int plane, void **pVirtAddr) |
| This method must be used to Unmap the mapped virtual Address of the plane. More...
|
|
Enumerator |
---|
NvBufferColorFormat_YUV420 |
|
NvBufferColorFormat_YVU420 |
|
NvBufferColorFormat_NV12 |
|
NvBufferColorFormat_NV21 |
|
NvBufferColorFormat_UYVY |
|
NvBufferColorFormat_VYUY |
|
NvBufferColorFormat_YUYV |
|
NvBufferColorFormat_YVYU |
|
NvBufferColorFormat_ABGR32 |
|
NvBufferColorFormat_XRGB32 |
|
NvBufferColorFormat_ARGB32 |
|
NvBufferColorFormat_Invalid |
|
Definition at line 51 of file nvbuf_utils.h.
Enumerator |
---|
NvBufferLayout_Pitch |
|
NvBufferLayout_BlockLinear |
|
Definition at line 38 of file nvbuf_utils.h.
Enumerator |
---|
NvBufferMem_Read |
|
NvBufferMem_Write |
|
NvBufferMem_Read_Write |
|
Definition at line 44 of file nvbuf_utils.h.
Use this method to allocate HW buffer.
- Parameters
-
[out] | dmabuf_fd | Returns dmabuf_fd of hardware buffer. |
[in] | width | Hardware buffer width, in bytes. |
[in] | height | Hardware buffer height, in bytes. |
[in] | layout | Layout of buffer. |
[in] | colorFormat | The colorFormat of buffer. |
- Returns
- 0 for success, -1 for failure
int NvBufferDestroy |
( |
int |
dmabuf_fd | ) |
|
This method must be used for destroying hw_buffer
.
- Parameters
-
[in] | dmabuf_fd | Specifies the dmabuf_fd hw_buffer to destroy. |
- Returns
- 0 for success, -1 for failure.
Use this method to get buffer parameters.
- Parameters
-
[in] | dmabuf_fd | DMABUF FD of buffer. |
[out] | params | A pointer to the structure to fill with parameters. |
- Returns
- 0 for success, -1 for failure.
int NvBufferMemMap |
( |
int |
dmabuf_fd, |
|
|
unsigned int |
plane, |
|
|
NvBufferMemFlags |
memflag, |
|
|
void ** |
pVirtAddr |
|
) |
| |
This method must be used for getting mem mapped virtual Address of the plane.
- Parameters
-
[in] | dmabuf_fd | DMABUF FD of buffer. |
[in] | plane | video frame plane. |
[in] | memflag | NvBuffer memory flag. |
[in] | pVirtAddr | Virtual Addres pointer of the mem mapped plane. |
- Returns
- 0 for success, -1 for failure.
int NvBufferMemSyncForCpu |
( |
int |
dmabuf_fd, |
|
|
unsigned int |
plane, |
|
|
void ** |
pVirtAddr |
|
) |
| |
This method must be used for hw memory cache sync for the CPU.
- Parameters
-
[in] | dmabuf_fd | DMABUF FD of buffer. |
[in] | plane | video frame plane. |
[in] | pVirtAddr | Virtual Addres pointer of the mem mapped plane. |
- Returns
- 0 for success, -1 for failure.
int NvBufferMemSyncForDevice |
( |
int |
dmabuf_fd, |
|
|
unsigned int |
plane, |
|
|
void ** |
pVirtAddr |
|
) |
| |
This method must be used for hw memory cache sync for device.
- Parameters
-
[in] | dmabuf_fd | DMABUF FD of buffer. |
[in] | plane | video frame plane. |
[in] | pVirtAddr | Virtual Addres pointer of the mem mapped plane. |
- Returns
- 0 for success, -1 for failure.
int NvBufferMemUnMap |
( |
int |
dmabuf_fd, |
|
|
unsigned int |
plane, |
|
|
void ** |
pVirtAddr |
|
) |
| |
This method must be used to Unmap the mapped virtual Address of the plane.
- Parameters
-
[in] | dmabuf_fd | DMABUF FD of buffer. |
[in] | plane | video frame plane. |
[in] | pVirtAddr | mem mapped Virtual Addres pointer of the plane. |
- Returns
- 0 for success, -1 for failure.
int NvDestroyEGLImage |
( |
EGLDisplay |
display, |
|
|
EGLImageKHR |
eglImage |
|
) |
| |
This method must be used for destroying EGLImage
object.
- Parameters
-
[in] | display | EGLDisplay object used for destroying EGLImage . |
[in] | eglImage | EGLImageKHR object to be destroyed. |
- Returns
- 0 for success, -1 for failure
EGLImageKHR NvEGLImageFromFd |
( |
EGLDisplay |
display, |
|
|
int |
dmabuf_fd |
|
) |
| |
This method must be used for getting EGLImage
from dmabuf-fd
.
- Parameters
-
[in] | display | EGLDisplay object used during the creation of EGLImage . |
[in] | dmabuf_fd | DMABUF FD of buffer from which EGLImage to be created. |
- Returns
EGLImageKHR
for success, NULL
for failure