Accessing GPU buffers in deepstream filter on Jetson nano

Small update for people with a similar issue:
after using the information and code in this post I managed to map the UV12 data to a CUsurfObject that I can read in a CUDA kernel.
Next question would be if there is a way to directly modify the UV12 data in a gstreamer buffer as well?