rtsp: Allow pipelines to be shared between media
Submitted by Nick Kallen
In order to build videocompositor/mosaic RTSP server, I subclassed RTSPMediaFactory to create my own elements directly. Each RTSPMedia created by the factory is in the same pipeline (so they can mux together). But RTSPMedia does not allow you to share pipelines between Media elements, because as part of the preparation process it prerolls the pipeline: it sets the pipeline state to pause and then it listens for confirmation that it transitioned from ready -> pause before activating everything. But if you are sharing a pipeline between RTSPMedia it will already be in state playing most of the time, and new medias that share the pipeline will not get prepared correctly.
My solution is to make the preroll method overridable.
I wanted some feedback on this before I continue...