Deepstream: How can app send EOS (when i want to delete this source)to rtspsrc element,

How can app send EOS (before when i want to delete this source)to rtspsrc element

Pipeline
rtspsrc,rtph264depay,nvv4l2decoder \ ----------------------------------------------/rtmpsinkbin
rtspsrc,rtph264depay,nvv4l2decoder – > streammux,pgie, nvtracker, streamdemux, rtmpsinkbin
rtspsrc,rtph264depay,nvv4l2decoder /----------------------------------------------\rtmpsinkbin

• Hardware Platform (Jetson / GPU)
• DeepStream Version5.0DP
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)

App can not set “EOS”. App can change the pipeline state instead. Use “gst_element_set_state”
https://gstreamer.freedesktop.org/documentation/additional/design/states.html?gi-language=c