How to Initialize and mantain alive a library before an user connects to rtsp-server feed
I have a working pipeline that is a combination of custom AVFilters and standard Gstreamer filters.
One of those custom AVFilters needs an initialization and also mantain alive in order to communicate with other programs.
I also test with test-launch.c example from the gstreamer rtsp lib and have a working rtsp feed.
So now my problems and what I have tried
I want that when a script launch the rtsp program (for example test-launch.c) the library will be initialized and mantain alive even when no user have connected to the rtsp. Also the custom Filter needs to consume the frames by his own and make process.
I tried to initialize on the init method of the Filter but init method is called every time a user connect to the feed.
I also try with class_init, The library initialize even a user does not connect to the rtsp feed but then the threads that launch it closes, so the library communications is also closed.