gstreamer/subprojects/gst-rtsp-server/tests/check/gst
Sebastian Dröge 55c961a4dc rtsp-server: media-factory: Make sure a shared media is actually still usable
Previously it was possible that a shared media was just in the process
of being unprepared because the last client disappeared, while another
client retrieved it from the cache and then tried to use it. Unless the
media was reusable this would've then failed unnecessarily.

To avoid this it is necessary to lock the media directly in
gst_rtsp_media_factory_construct() and return a locked media. After
locking the cached media it is necessary to check if the media was ever
unprepared or is actually reusable and based on that either reuse it or
create a new media.

This minimally changes the gst_rtsp_media_factory_construct() API to
always return a locked media, and adds a new
gst_rtsp_media_can_be_shared() function to check if a media can actually
be shared in practice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4606>
2023-05-19 11:09:48 +00:00
..
addresspool.c
client.c rtsp-server: Add support for adjusting request response on pipeline errors 2022-10-11 07:42:28 +02:00
media.c rtsp-server: media-factory: Make sure a shared media is actually still usable 2023-05-19 11:09:48 +00:00
mediafactory.c rtsp-server: media-factory: Make sure a shared media is actually still usable 2023-05-19 11:09:48 +00:00
mountpoints.c
onvif.c tests/onvif: improve robustness 2022-04-27 06:39:24 +00:00
permissions.c
rtspclientsink.c
rtspserver.c gst-rtsp-server: Plug a few memory leaks in tests 2022-03-07 13:57:27 +00:00
sessionmedia.c rtsp-server: media-factory: Make sure a shared media is actually still usable 2023-05-19 11:09:48 +00:00
sessionpool.c
stream.c gst-rtsp-server: Plug a few memory leaks in tests 2022-03-07 13:57:27 +00:00
threadpool.c
token.c