gst_rtsp_server_attach () returns GLib source ID. So you have to use g_source_remove, and then you can safely unref the server object. Please take a look at notes if you use other main context than default.
Is it feasible to have multiple RTSP server instance in the same process?
I am working on an application which has got 2 independent pipeline running
under the same process. I have used test-appsrc2 in examples as reference
and created 2 server instance with different ports which works for the very
first time. However if I stop and delete the pipelines and start everything
from scratch, The server doesn't seem to be streaming. Once I restart the
process, It works for the first time again.
cleaning up the session pool ,source_remove of server id, removing the
factory, unref the server
I need some guidance in how to implement the server for streaming. Do I need
to have 2 different process for 2 server instance? I have gone through the
reference, still couldn't get answer for this. Any lead would be great help.