Copy image data to custom array from IFrame of EGLStream

Hi,
For getting GPU pointer of an NvBufSurface, please refer to the two posts:
Error generated while running the code after connecting the camera - #15 by DaveYYY
How to create opencv gpumat from nvstream? - #18 by DaneLLL