How to get picture from nv12 (memory:NVMM) in nvbuf?

Hi,
Please refer to the code:
How to run RTP Camera in deepstream on Nano - #29 by DaneLLL
For accessing NvBuffer in appsink or prob function.