How can I use gstreamer to encode video in cuda memory without copying frames to cpu (host) memory

environment: x86 PC and RTX 3060Ti,OS: Debian12, gstreamer: 1.20

There are frames in cuda GPU memory, I want to encode them without copy from GPU memory to CPU memory. I just don`t know how to push a gstBuffer wrapped GPU pointer to gstappsrc.
However, When I copy frames to CPU memory first, then push it into gstreamer pipeline, it works for me.
Is there any example that encode frames in GPU memory directly?