How to use appsink and appsrc in AGX

hello everyone!
My device is Jetson AGX Xavier 16G, I want to use gstreamer decoding, but I do n’t know how to configure appsink and appsrc parameters.Here are two functions, can anyone help me modify the parameters, thanks!

static std::string CreateAppSinkPipeline()
{
    std::stringstream pipelineString;

    pipelineString
        << "rtsp://192.168.31.163:554/"
        << LINK
        << "h264parse"
        << LINK
        << "mppvideodec"
        << LINK
        << "video/x-raw,format=(string)NV12"
        << LINK
        << "rgaconvert output-io-mode=dmabuf-import capture-io-mode=dmabuf vpu-stride=true"
        << LINK
        << "video/x-raw,format=BGR,width=(int)1920,height=(int)1080"
        << LINK
        << "appsink caps=video/x-raw,format=BGR name="
        << APPSINK_NAME;
    return pipelineString.str();
}
static std::string CreateAppSrcPipeline()
{
    std::stringstream pipelineString;

    pipelineString
        << "appsrc caps=video/x-raw,format=(string)BGR,width=(int)1920,height=(int)1080,framerate=(fraction)30/1 "
           "block=true name="
        << APPSRC_NAME
        << LINK
        << "rkximagesink sync=false";
    return pipelineString.str();
}

Hi,
There are several samples:
https://devtalk.nvidia.com/default/topic/1011376/jetson-tx1/gstreamer-decode-live-video-stream-with-the-delay-difference-between-gst-launch-1-0-command-and-appsink-callback/post/5160929/#5160929
https://devtalk.nvidia.com/default/topic/1010111/jetson-tx1/nvmm-memory/post/5158652/#5158652
https://devtalk.nvidia.com/default/topic/1031734/jetson-tx2/appsrc-link-to-nvvidconv-error-with-reason-not-negotiated-4-/post/5250184/#5250184

Please refer to these posts and adapt to your usecase.