<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>I am confused about GStreamer RTSP processing. In the rtsp-server.c module, the header for gst_rtsp_server_attach() states that the function should be called when the server properties and URLs are fully configured. My URLs don't change after the app is started, but users come and go. Here is the process I follow.<br>
<br></div><div>This is done only once to initialize the server.<br></div><div><br>1. I set the server address and service.<br>2. Loop to create the factories, usually several.<br>3. Attach the server to the main loop context.<br>
<br></div>When the main app signals that a user is ready, I:<br><br></div>4. Call gst_rtsp_media_factory_set_launch() to establish the pipeline. This could be done earlier.<br></div>5. Call gst_rtsp_media_mapping_add_factory().<br>
</div>6. Call gst_rtsp_media_factory_set_shared(factory, TRUE).<br><br></div>When a user disconnects, I:<br><br></div>7. Call gst_rtsp_media_mapping_remove_factory().<br><br></div>I never unref the server mapping since it is needed to add/remove factory instances.<br>
<br></div>Is this organization and sequence reasonable? Or should I be breaking the different pipelines into different executables?<br><br></div>Sometimes (without changing code) it fails to attach the server to the main context (#3), which really confuses me. What are some reasons that might happen?<br>
<br></div>Thank you for all guidance.<br><br>Chuck Crisler<br></div>