gstreamer/subprojects/gst-rtsp-server/gst/rtsp-server
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
..
meson.build gir: Checkout all .gir files and check that they are updated on the CI 2023-04-22 09:32:32 -04:00
rtsp-address-pool.c rtsp-server: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
rtsp-address-pool.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-auth.c rtsp-server: Add/fix various annotations 2022-10-18 13:51:16 +03:00
rtsp-auth.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-client.c rtsp-server: media-factory: Make sure a shared media is actually still usable 2023-05-19 11:09:48 +00:00
rtsp-client.h rtsp-client: Remove duplicate documentation 2022-10-14 08:54:17 +02:00
rtsp-context.c rtsp-server: context: Add method to set the RTSPToken on some RTSPContext 2022-09-13 10:42:52 +03:00
rtsp-context.h rtsp-server: context: Add method to set the RTSPToken on some RTSPContext 2022-09-13 10:42:52 +03:00
rtsp-latency-bin.c rtsp-server: Add/fix various annotations 2022-10-18 13:51:16 +03:00
rtsp-latency-bin.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-media-factory-uri.c Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-media-factory-uri.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-media-factory.c rtsp-server: media-factory: Make sure a shared media is actually still usable 2023-05-19 11:09:48 +00:00
rtsp-media-factory.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-media.c rtsp-server: media-factory: Make sure a shared media is actually still usable 2023-05-19 11:09:48 +00:00
rtsp-media.h rtsp-server: media-factory: Make sure a shared media is actually still usable 2023-05-19 11:09:48 +00:00
rtsp-mount-points.c rtsp-server: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
rtsp-mount-points.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-onvif-client.c Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-onvif-client.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-onvif-media-factory.c rtsp-server: Add/fix various annotations 2022-10-18 13:51:16 +03:00
rtsp-onvif-media-factory.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-onvif-media.c Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-onvif-media.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-onvif-server.c Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-onvif-server.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-params.c Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-params.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-permissions.c rtsp-server: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
rtsp-permissions.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-sdp.c gst-rtsp-server: re-indent with GNU indent 2.2.12 2023-03-17 03:18:54 +00:00
rtsp-sdp.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-server-internal.h gst-rtsp-server: Fix pushing backlog to client 2022-09-02 16:04:06 +00:00
rtsp-server-object.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-server-prelude.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-server.c rtsp-server: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
rtsp-server.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-session-media.c Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-session-media.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-session-pool.c Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-session-pool.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-session.c rtsp-client: make sure sessmedia will not get freed while used 2021-10-06 19:42:43 +00:00
rtsp-session.h rtsp-client: make sure sessmedia will not get freed while used 2021-10-06 19:42:43 +00:00
rtsp-stream-transport.c gst-rtsp-server: Fix pushing backlog to client 2022-09-02 16:04:06 +00:00
rtsp-stream-transport.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-stream.c rtsp-server: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
rtsp-stream.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-thread-pool.c rtsp-server: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
rtsp-thread-pool.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00
rtsp-token.c rtsp-server: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
rtsp-token.h Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00