Multimedia API Reference

November 16, 2016 | 24.2.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NV HW Buffer Utility API

Detailed Description

NVIDIA buffering utility library for use by applications.

Data Structures

struct  _NvBufferParams
 

Macros

#define MAX_NUM_PLANES   3
 

Typedefs

typedef struct _NvBufferParams NvBufferParams
 

Enumerations

enum  NvBufferLayout {
  NvBufferLayout_Pitch,
  NvBufferLayout_BlockLinear
}
 
enum  NvBufferColorFormat {
  NvBufferColorFormat_YUV420,
  NvBufferColorFormat_YVU420,
  NvBufferColorFormat_NV12,
  NvBufferColorFormat_NV21,
  NvBufferColorFormat_UYVY,
  NvBufferColorFormat_ABGR32,
  NvBufferColorFormat_XRGB32,
  NvBufferColorFormat_Invalid
}
 

Functions

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...
 

Macro Definition Documentation

#define MAX_NUM_PLANES   3

Definition at line 36 of file nvbuf_utils.h.

Typedef Documentation

Enumeration Type Documentation

Enumerator
NvBufferColorFormat_YUV420 
NvBufferColorFormat_YVU420 
NvBufferColorFormat_NV12 
NvBufferColorFormat_NV21 
NvBufferColorFormat_UYVY 
NvBufferColorFormat_ABGR32 
NvBufferColorFormat_XRGB32 
NvBufferColorFormat_Invalid 

Definition at line 44 of file nvbuf_utils.h.

Enumerator
NvBufferLayout_Pitch 
NvBufferLayout_BlockLinear 

Definition at line 38 of file nvbuf_utils.h.

Function Documentation

int NvBufferCreate ( int *  dmabuf_fd,
int  width,
int  height,
NvBufferLayout  layout,
NvBufferColorFormat  colorFormat 
)

Use this method to allocate HW buffer.

Parameters
[out]dmabuf_fdReturns dmabuf_fd of hardware buffer.
[in]widthSpecifies the hardware buffer width, in bytes.
[in]heightSpecifies the hardware buffer height, in bytes.
[in]layoutSpecifies the layout of buffer.
[in]colorFormatSpecifies 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_fdSpecifies the dmabuf_fd hw_buffer to destroy.
Returns
0 for success, -1 for failure
int NvBufferGetParams ( int  dmabuf_fd,
NvBufferParams params 
)

Use this method to get buffer parameters.

Parameters
[in]dmabuf_fdDMABUF FD of buffer.
[out]paramsA pointer to the structure to fill with parameters.
Returns
0 for success, -1 for failure.
int NvDestroyEGLImage ( EGLDisplay  display,
EGLImageKHR  eglImage 
)

This method must be used for destroying EGLImage object.

Parameters
[in]displayEGLDisplay object used for destroying EGLImage.
[in]eglImageEGLImageKHR 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]displayEGLDisplay object used during the creation of EGLImage.
[in]dmabuf_fdDMABUF FD of buffer from which EGLImage to be created.
Returns
EGLImageKHR for success, NULL for failure