NvBufSurface Interface
This file specifies the NvBufSurface management API.
The NvBufSurface API provides methods to allocate / deallocate, map / unmap and copy batched buffers.
Definition in file nvbufsurface.h.
Go to the source code of this file.
Data Structures | |
struct | NvBufSurfacePlaneParamsEx |
Holds plane wise parameters(extended) of a buffer. More... | |
struct | NvBufSurfacePlaneParams |
Holds plane wise parameters of a buffer. More... | |
struct | NvBufSurfaceChromaSubsamplingParams |
Holds Chroma Subsampling parameters for NvBufSurface allocation. More... | |
struct | NvBufSurfaceCreateParams |
Holds parameters required to allocate an NvBufSurface. More... | |
struct | NvBufSurfaceAllocateParams |
Hold extended parameters required to allocate NvBufSurface. More... | |
struct | NvBufSurfaceMappedAddr |
Hold the pointers of mapped buffer. More... | |
struct | NvBufSurfaceParamsEx |
Hold the information(extended) of single buffer in the batch. More... | |
struct | NvBufSurfaceParams |
Hold the information of single buffer in the batch. More... | |
struct | NvBufSurface |
Holds information about batched buffers. More... | |
struct | NvBufSurfaceMapPlaneParams |
Holds plane parameters to map the buffer received from another process. More... | |
struct | NvBufSurfaceMapParams |
Holds buffer parameters to map the buffer received from another process. More... | |
Macros | |
#define | STRUCTURE_PADDING 4 |
Defines the default padding length for reserved fields of structures. More... | |
#define | NVBUF_MAX_PLANES 4 |
Defines the maximum number of planes. More... | |
#define | NVBUFSURFACE_CHROMA_SUBSAMPLING_HORIZ_DEFAULT 0 |
Defines the default values for chroma subsampling. More... | |
#define | NVBUFSURFACE_CHROMA_SUBSAMPLING_VERT_DEFAULT 1 |
#define | NVBUFSURFACE_CHROMA_SUBSAMPLING_PARAMS_DEFAULT |
Typedefs | |
typedef struct NvBufSurfacePlaneParamsEx | NvBufSurfacePlaneParamsEx |
Holds plane wise parameters(extended) of a buffer. More... | |
typedef struct NvBufSurfacePlaneParams | NvBufSurfacePlaneParams |
Holds plane wise parameters of a buffer. More... | |
typedef struct NvBufSurfaceChromaSubsamplingParams | NvBufSurfaceChromaSubsamplingParams |
Holds Chroma Subsampling parameters for NvBufSurface allocation. More... | |
typedef struct NvBufSurfaceCreateParams | NvBufSurfaceCreateParams |
Holds parameters required to allocate an NvBufSurface. More... | |
typedef struct NvBufSurfaceAllocateParams | NvBufSurfaceAllocateParams |
Hold extended parameters required to allocate NvBufSurface. More... | |
typedef struct NvBufSurfaceMappedAddr | NvBufSurfaceMappedAddr |
Hold the pointers of mapped buffer. More... | |
typedef struct NvBufSurfaceParamsEx | NvBufSurfaceParamsEx |
Hold the information(extended) of single buffer in the batch. More... | |
typedef struct NvBufSurfaceParams | NvBufSurfaceParams |
Hold the information of single buffer in the batch. More... | |
typedef struct NvBufSurface | NvBufSurface |
Holds information about batched buffers. More... | |
typedef struct NvBufSurfaceMapPlaneParams | NvBufSurfaceMapPlaneParams |
Holds plane parameters to map the buffer received from another process. More... | |
typedef struct NvBufSurfaceMapParams | NvBufSurfaceMapParams |
Holds buffer parameters to map the buffer received from another process. More... | |
Functions | |
int | NvBufSurfaceCreate (NvBufSurface **surf, uint32_t batchSize, NvBufSurfaceCreateParams *params) |
Allocates a batch of buffers. More... | |
int | NvBufSurfaceAllocate (NvBufSurface **surf, uint32_t batchSize, NvBufSurfaceAllocateParams *paramsext) |
Allocate batch of buffers. More... | |
int | NvBufSurfaceDestroy (NvBufSurface *surf) |
Free the batched buffers previously allocated through NvBufSurfaceCreate. More... | |
int | NvBufSurfaceMap (NvBufSurface *surf, int index, int plane, NvBufSurfaceMemMapFlags type) |
Maps hardware batched buffers to the HOST or CPU address space. More... | |
int | NvBufSurfaceUnMap (NvBufSurface *surf, int index, int plane) |
Unmaps previously mapped buffer(s). More... | |
int | NvBufSurfaceCopy (NvBufSurface *srcSurf, NvBufSurface *dstSurf) |
Copies the content of source batched buffer(s) to destination batched buffer(s). More... | |
int | NvBufSurface2Raw (NvBufSurface *Surf, unsigned int index, unsigned int plane, unsigned int out_width, unsigned int out_height, unsigned char *ptr) |
Copies the NvBufSurface plane memory content to a raw buffer plane for a specific batched buffer. More... | |
int | Raw2NvBufSurface (unsigned char *ptr, unsigned int index, unsigned int plane, unsigned int in_width, unsigned int in_height, NvBufSurface *Surf) |
Copies the raw buffer plane memory content to the NvBufSurface plane memory of a specific batched buffer. More... | |
int | NvBufSurfaceSyncForCpu (NvBufSurface *surf, int index, int plane) |
Syncs the HW memory cache for the CPU. More... | |
int | NvBufSurfaceSyncForDevice (NvBufSurface *surf, int index, int plane) |
Syncs the hardware memory cache for the device. More... | |
int | NvBufSurfaceFromFd (int dmabuf_fd, void **buffer) |
Gets the NvBufSurface from the DMABUF FD. More... | |
int | NvBufSurfaceMemSet (NvBufSurface *surf, int index, int plane, uint8_t value) |
Fills each byte of the buffer(s) in an NvBufSurface with a provided value. More... | |
int | NvBufSurfaceMapEglImage (NvBufSurface *surf, int index) |
Creates an EGLImage from the memory of one or more NvBufSurface buffers. More... | |
int | NvBufSurfaceUnMapEglImage (NvBufSurface *surf, int index) |
Destroys the previously created EGLImage object(s). More... | |
int | NvBufSurfaceImport (NvBufSurface **out_nvbuf_surf, const NvBufSurfaceMapParams *in_params) |
Import parameters received from another process and create hardware buffer. More... | |
int | NvBufSurfaceGetMapParams (const NvBufSurface *surf, int index, NvBufSurfaceMapParams *params) |
Get buffer information to map the buffer in another process. More... | |