gstreamer/subprojects/gst-editing-services/ges
Thibault Saunier 96cf1f8c8e ges: asset: Avoid trying to load twice the same asset
When requesting an asset from different threads we had no
guarantee that during the time we lookup an asset (which didn't exist)
and the time we create the asset with the same type/ID another thread
could not end up doing the same thing. In turns we could end up with
2 different threads loading the exact same asset and the cache
basically forgetting about one of the entries meaning that the user
would never get notified about one of those being ready to be used.

There was also the case when requesting "sync" where the user was
requesting an asset while another thread is creating it so it was
still in "ASSET_INITIALIZING" state, meaning that the returned asset
would be NULL which would be considered as an error in apps.

Since the cache lock is recursive we can just take it during the whole
ges_asset_request_async call and have other method still hold it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5732>
2023-12-01 21:51:57 +00:00
..
python
ges-asset.c ges: asset: Avoid trying to load twice the same asset 2023-12-01 21:51:57 +00:00
ges-asset.h
ges-audio-source.c
ges-audio-source.h
ges-audio-test-source.c
ges-audio-test-source.h
ges-audio-track.c
ges-audio-track.h
ges-audio-transition.c
ges-audio-transition.h
ges-audio-uri-source.c
ges-audio-uri-source.h
ges-auto-transition.c
ges-auto-transition.h
ges-base-effect-clip.c
ges-base-effect-clip.h
ges-base-effect.c
ges-base-effect.h
ges-base-transition-clip.c
ges-base-transition-clip.h
ges-base-xml-formatter.c ges: base-xml-formatter: Don't pass non-GObject pointers to GST_DEBUG_OBJECT 2023-04-18 10:03:46 +00:00
ges-base-xml-formatter.h
ges-clip-asset.c
ges-clip-asset.h
ges-clip.c
ges-clip.h
ges-command-line-formatter.c
ges-command-line-formatter.h
ges-container.c ges: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
ges-container.h
ges-discoverer-manager.c ges: discoverer-manager: Fix race when freeing unused discoverer 2023-11-08 08:24:15 +00:00
ges-discoverer-manager.h ges: Implement a new GESDiscovererManager object 2023-04-29 06:54:10 -04:00
ges-effect-asset.c
ges-effect-asset.h
ges-effect-clip.c
ges-effect-clip.h
ges-effect.c
ges-effect.h
ges-enums.c
ges-enums.h
ges-extractable.c
ges-extractable.h
ges-formatter.c
ges-formatter.h
ges-frame-composition-meta.c ges: Expose FrameCompositionMeta in public API 2023-11-16 11:45:40 +00:00
ges-frame-composition-meta.h ges: Expose FrameCompositionMeta in public API 2023-11-16 11:45:40 +00:00
ges-gerror.h
ges-group.c
ges-group.h
ges-image-source.c
ges-image-source.h
ges-internal.h ges: discoverer-manager: Support for delayed clean-up of discoverers 2023-11-06 14:23:45 +00:00
ges-layer.c ges: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
ges-layer.h
ges-marker-list.c
ges-marker-list.h
ges-meta-container.c ges: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
ges-meta-container.h
ges-multi-file-source.c
ges-multi-file-source.h
ges-operation-clip.c
ges-operation-clip.h
ges-operation.c
ges-operation.h
ges-overlay-clip.c
ges-overlay-clip.h
ges-pipeline.c ges: pipeline: Avoid setting state before being constructed 2023-07-06 05:48:31 +00:00
ges-pipeline.h
ges-pitivi-formatter.c
ges-pitivi-formatter.h
ges-prelude.h
ges-project.c ges: project: Start making MT safe where needed 2023-10-04 09:29:04 +01:00
ges-project.h
ges-screenshot.c
ges-screenshot.h
ges-smart-adder.c ges: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
ges-smart-adder.h
ges-smart-video-mixer.c ges: Expose FrameCompositionMeta in public API 2023-11-16 11:45:40 +00:00
ges-smart-video-mixer.h ges: Fix issues avoiding to use operator when unavailable on mixer 2023-01-17 20:10:19 +00:00
ges-source-clip-asset.c
ges-source-clip-asset.h
ges-source-clip.c
ges-source-clip.h
ges-source.c ges: re-indent with GNU indent 2.2.12 2023-03-17 03:18:54 +00:00
ges-source.h
ges-structure-parser.c
ges-structure-parser.h
ges-structured-interface.c ges: Fix setting keyframes from ges-launch 2023-09-06 11:07:35 -03:00
ges-structured-interface.h
ges-test-clip.c
ges-test-clip.h
ges-text-overlay-clip.c
ges-text-overlay-clip.h
ges-text-overlay.c
ges-text-overlay.h
ges-time-overlay-clip.c
ges-time-overlay-clip.h
ges-timeline-element.c ges-timeline-element: Fix refcount bug in "timeline" and "parent" properties 2023-06-23 23:00:45 +00:00
ges-timeline-element.h
ges-timeline-tree.c
ges-timeline-tree.h
ges-timeline.c ges: timeline: Fix message leaks 2023-11-06 14:23:45 +00:00
ges-timeline.h
ges-title-clip.c
ges-title-clip.h
ges-title-source.c
ges-title-source.h
ges-track-element-asset.c
ges-track-element-asset.h
ges-track-element-deprecated.h
ges-track-element.c
ges-track-element.h
ges-track.c ges: Add support for gessrc as subtimeline element 2023-06-29 19:24:37 +00:00
ges-track.h
ges-transition-clip.c
ges-transition-clip.h
ges-transition.c
ges-transition.h
ges-types.h ges: Implement a new GESDiscovererManager object 2023-04-29 06:54:10 -04:00
ges-uri-asset.c ges-uri-asset: Fix GESDiscovererManager leaks 2023-11-02 18:29:27 +00:00
ges-uri-asset.h ges: Implement a new GESDiscovererManager object 2023-04-29 06:54:10 -04:00
ges-uri-clip.c ges: Implement a new GESDiscovererManager object 2023-04-29 06:54:10 -04:00
ges-uri-clip.h
ges-uri-source.c ges: Add support for gessrc as subtimeline element 2023-06-29 19:24:37 +00:00
ges-uri-source.h
ges-utils.c ges: discoverer-manager: Support for delayed clean-up of discoverers 2023-11-06 14:23:45 +00:00
ges-utils.h
ges-validate.c ges: validate: Use correct types when getting structure values 2023-07-10 09:40:27 +01:00
ges-version.h.in
ges-video-source.c
ges-video-source.h
ges-video-test-source.c
ges-video-test-source.h
ges-video-track.c
ges-video-track.h
ges-video-transition.c
ges-video-transition.h
ges-video-uri-source.c
ges-video-uri-source.h
ges-xml-formatter.c ges: drop use of GSlice allocator 2023-02-03 17:48:09 +00:00
ges-xml-formatter.h
ges.c
ges.h ges: Expose FrameCompositionMeta in public API 2023-11-16 11:45:40 +00:00
ges.resource
gesmarshal.list
gstframepositioner.c ges: Expose FrameCompositionMeta in public API 2023-11-16 11:45:40 +00:00
gstframepositioner.h ges: Expose FrameCompositionMeta in public API 2023-11-16 11:45:40 +00:00
meson.build ges: Expose FrameCompositionMeta in public API 2023-11-16 11:45:40 +00:00
parse.l