Need some Guidance on MainLoop and Pipeline link

I am working a project where we will be receiving a RTP stream to gstreamer.
I want to understand what is the best approach to design the MainLoop handling.
Do we need to create a single MainLoop for application ? or Do we need to create a MainLoop per pipeline or Do we need to create Mainloop based on call back we need?

What is the best approach ? How the performance impact will happen ?
Our application is a performance sensitive as we handle realtime RTP.

Thanks in advance.

Data flow in GStreamer pipelines usually happens in dedicated threads that GStreamer starts in the background.

Main loops are not required for GStreamer pipelines to function, but they are useful for applications that already run a main loop for other things (e.g. user interface).

Even with multiple pipelines you would usually only use a single main loop for the entire application main thread.

You would then add a bus watch (convenience API in GStreamer to integrate a GstBus with a GLib/Gtk main loop, also the Qt mainloop on Linux) for each pipeline, and you’d get your bus message callback called whenever there’s a new message.

There should be very little performance impact, since the data processing happens in dedicated threads in the background, which is separate from your application thread, and there are also separate threads for separate pipelines.