How to use the NvBuffer2Raw api

hi all ,when i use the NvBuffer2Raw to get ABGR32 data from a fd ,the raw data is corrected,but when i get the NV12 data from a fd with this api ,the raw data is discorrected,so how to use this api?
NvBuffer2Raw(dest_dma_fd,0,1920,1080,rawdata);

Hi,
There is single plane in ABGR32 data. There are two planes in NV12 data and you woul d need to call NvBuffer2Raw twice. Or you may try to call dump_dmabuf() in

/usr/src/jetson_multimedia_api/samples/common/classes/NvUtils.cpp

the last way i know ,i just want know how to use the api interface ,because i test use the domp_dmabuf is slower than the NvBuffer2Raw ,i want to know how to call NvBuffer2Raw twice,because if i call like that
NvBuffer2Raw(dest_dma_fd,1,1920,1080,rawdata+1920*1080);

it will have follwing error:
NVMAP_IOC_READ: Offset 2228224 SrcStride 1024 pDst 0x7fae579410 DstStride 1920 Count 1080
NVMAP_IOC_READ failed: Invalid argument
NVMAP_IOC_READ: Offset 2228224 SrcStride 1024 pDst 0x7fae579410 DstStride 1920 Count 1080
NVMAP_IOC_READ failed: Invalid argument
NVMAP_IOC_READ: Offset 2228224 SrcStride 1024 pDst 0x7fae579410 DstStride 1920 Count 1080
NVMAP_IOC_READ failed: Invalid argument
NVMAP_IOC_READ: Offset 2228224 SrcStride 1024 pDst 0x7fae579410 DstStride 1920 Count 1080
NVMAP_IOC_READ failed: Invalid argument
NVMAP_IOC_READ: Offset 2228224 SrcStride 1024 pDst 0x7fae579410 DstStride 1920 Count 1080
NVMAP_IOC_READ failed: Invalid argument
NVMAP_IOC_READ: Offset 2228224 SrcStride 1024 pDst 0x7fae579410 DstStride 1920 Count 1080
NVMAP_IOC_READ failed: Invalid argument
NVMAP_IOC_READ: Offset 2228224 SrcStride 1024 pDst 0x7fae579410 DstStride 1920 Count 1080

Hi,
For second plane of NV12, please try

NvBuffer2Raw(dest_dma_fd,1,960,540,rawdata+1920*1080);

The nvvidconv plugin is open source and there is code of calling NvBuffer2Raw(). You can download the source code and take a look.

hi DaneLLL,thanks for your help?so where can download the nvvidconv plugin source ?

Hi,
Source codes are in
L4T | NVIDIA Developer
[L4T Driver Package (BSP) Sources]