GNOME Bugzilla – Bug 747818
gst-rtsp-server blocks while connect to rtsp
Last modified: 2015-06-19 12:29:08 UTC
Created attachment 301505 [details] log from simple test I have two cameras, one of them not work very well sometimes, but when gst-rtst-server try to connect to bad camera, it can't connect to good camera too. Only when gst-rtsp-server drop connection by timeout to bad camera, it connects to good one. It looks like gst-rtsp-server blocks somewhere. Simple test: from gi.repository import Gst, GObject, GstRtspServer Gst.init(None) rtsp_server = GstRtspServer.RTSPServer() rtsp_server.attach(None) factory = GstRtspServer.RTSPMediaFactoryURI() factory.set_uri('rtsp://good_camera_url') rtsp_server.get_mount_points().add_factory('/good', factory) factory = GstRtspServer.RTSPMediaFactoryURI() factory.set_uri('rtsp://bad_camera_url') rtsp_server.get_mount_points().add_factory('/bad', factory) GObject.MainLoop().run() From log clearly see that after client to bad camera attached to context and enter mainloop, client to good camera connected, but stack on attaching it to context. And only after bad client exit mainloop, client to good camera start to work.
Tried this with test-uri.c example from gst-rtsp-server, have the same result. Even if set wrong IP for second stream, rtspsrc wait for 3 sec timeout, and while it wait, no one can connect to an other cameras. Is it right behavior?
Created attachment 305656 [details] screenshot of gst-debug-viewer
just need to set gst_rtsp_thread_pool_set_max_threads to more then one.