Commit graph

57 commits

Author SHA1 Message Date
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
Philippe Normand d6c425fc58 ges: Expose FrameCompositionMeta in public API
Knowing the positioning and size of each frame in the composition can help
applications optimize their rendering pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5652>
2023-11-16 11:45:40 +00:00
Thibault Saunier 23c5025619 ges: Include ges-discoverer-manager.h in ges.h
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5665>
2023-11-14 22:01:04 +00:00
Thibault Saunier d159cc624a ges: discoverer-manager: Fix race when freeing unused discoverer
When a new discoverer was created for a thread so discovery could
recurse we could end up removing the wrong discoverer info from the
cache leading to freeing it while it was still discovering URIS, which
lead to the following assertion:

``` bt
Thread 1 (Thread 0x7fcc2e1a5840 (LWP 1855496)):
 #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
 #1  0x00007fcc2e9d98a3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
 #2  0x00007fcc2e9878ee in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
 #3  0x00007fcc2e96f8ff in __GI_abort () at abort.c:79
 #4  0x00007fcc2ed80056 in g_assertion_message (domain=domain@entry=0x7fcc2f2c19f9 "GES", file=file@entry=0x7fcc2f2dfd68 "../subprojects/gst-editing-services/ges/ges-discoverer-manager.c", line=line@entry=20, func=func@entry=0x7fcc2f2e0030 <__func__.7> "ges_discoverer_data_free", message=message@entry=0x12dab70 "assertion failed: (data->n_uri == 0)") at ../glib/gtestutils.c:3497
 #5  0x00007fcc2ede1d87 in g_assertion_message_expr (domain=domain@entry=0x7fcc2f2c19f9 "GES", file=file@entry=0x7fcc2f2dfd68 "../subprojects/gst-editing-services/ges/ges-discoverer-manager.c", line=line@entry=20, func=func@entry=0x7fcc2f2e0030 <__func__.7> "ges_discoverer_data_free", expr=expr@entry=0x7fcc2f2dfcf1 "data->n_uri == 0") at ../glib/gtestutils.c:3523
 #6  0x00007fcc2f2bd5c5 in ges_discoverer_data_free (data=0x160e430) at ../subprojects/gst-editing-services/ges/ges-discoverer-manager.c:20
 #7  0x00007fcc2ed8509d in g_atomic_rc_box_release_full (clear_func=0x7fcc2f2bd4f0 <ges_discoverer_data_free>, mem_block=0x160e430) at ../glib/garcbox.c:355
 #8  g_atomic_rc_box_release_full (mem_block=0x160e430, clear_func=0x7fcc2f2bd4f0 <ges_discoverer_data_free>) at ../glib/garcbox.c:338
 #9  0x00007fcc2eda6809 in g_hash_table_remove_internal (notify=1, key=0x10448a0, hash_table=0x12e0be0) at ../glib/ghash.c:1776
 #10 g_hash_table_remove (hash_table=0x12e0be0, key=0x10448a0) at ../glib/ghash.c:1804
 #11 0x00007fcc2f2bd95f in cleanup_discoverer_cb (discoverer_data=discoverer_data@entry=0x13e7000) at ../subprojects/gst-editing-services/ges/ges-discoverer-manager.c:379
 #12 0x00007fcc2edbc759 in g_timeout_dispatch (source=0x15a6060, callback=0x7fcc2f2bd910 <cleanup_discoverer_cb>, user_data=0x13e7000) at ../glib/gmain.c:5121
 #13 0x00007fcc2edbbe1c in g_main_dispatch (context=0x1044700) at ../glib/gmain.c:3476
 #14 g_main_context_dispatch_unlocked (context=0x1044700) at ../glib/gmain.c:4284
 #15 0x00007fcc2ee16d78 in g_main_context_iterate_unlocked.isra.0 (context=0x1044700, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4349
 #16 0x00007fcc2edbd407 in g_main_loop_run (loop=0x12ccbd0) at ../glib/gmain.c:4551
 #17 0x00007fcc2f285791 in ges_uri_clip_asset_request_sync (uri=uri@entry=0x12d7980 "file:///var/home/phil/gstreamer/build/subprojects/gst-integration-testsuites/logs/ges/scenarios/check_seek_on_very_deeply_nested_timeline/nested_timeline_depth6.xges", error=error@entry=0x7fff499015a8) at ../subprojects/gst-editing-services/ges/ges-uri-asset.c:688
 #18 0x00007fcc2f28949b in ges_project_create_asset_sync (project=0x12c1c70, id=id@entry=0x12d7980 "file:///var/home/phil/gstreamer/build/subprojects/gst-integration-testsuites/logs/ges/scenarios/check_seek_on_very_deeply_nested_timeline/nested_timeline_depth6.xges", extractable_type=extractable_type@entry=Python Exception <class 'gdb.error'>: value has been optimized out , error=error@entry=0x7fff499015a8) at ../subprojects/gst-editing-services/ges/ges-project.c:959
 #19 0x00007fcc2f2ba484 in _ges_get_asset_from_timeline (timeline=timeline@entry=0x12bdc80, type=type@entry=Python Exception <class 'gdb.error'>: value has been optimized out , id=id@entry=0x12d7980 "file:///var/home/phil/gstreamer/build/subprojects/gst-integration-testsuites/logs/ges/scenarios/check_seek_on_very_deeply_nested_timeline/nested_timeline_depth6.xges", error=error@entry=0x7fff49901728) at ../subprojects/gst-editing-services/ges/ges-structured-interface.c:540
 #20 0x00007fcc2f2ba9b2 in _ges_add_clip_from_struct (timeline=0x12bdc80, structure=0x157f690, error=0x7fff49901728) at ../subprojects/gst-editing-services/ges/ges-structured-interface.c:697
 #21 0x00007fcc2f2b6a9d in _validate_action_execute (scenario=0x15f7620, action=0x157f500) at ../subprojects/gst-editing-services/ges/ges-validate.c:922
 #22 0x00007fcc2eef5c9c in gst_validate_execute_action (action=0x157f500, action_type=0x13e0500) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2541
 #23 gst_validate_execute_action (action_type=0x13e0500, action=0x157f500) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2507
 #24 0x00007fcc2eef8ce3 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2782
 #25 0x00007fcc2eef9dee in _action_set_done (action=0x157efb0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #26 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x157efb0, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #27 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x157efb0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #28 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #29 0x00007fcc2eef9dee in _action_set_done (action=0x157ea60) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #30 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x157ea60, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #31 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x157ea60) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #32 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #33 0x00007fcc2eef9dee in _action_set_done (action=0x157e510) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #34 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x157e510, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #35 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x157e510) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #36 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #37 0x00007fcc2eef9dee in _action_set_done (action=0x157df10) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #38 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x157df10, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #39 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x157df10) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #40 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #41 0x00007fcc2eef9dee in _action_set_done (action=0x157d9e0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #42 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x157d9e0, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #43 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x157d9e0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #44 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #45 0x00007fcc2eef9dee in _action_set_done (action=0x157d3e0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #46 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x157d3e0, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #47 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x157d3e0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #48 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #49 0x00007fcc2eef9dee in _action_set_done (action=0x157cf70) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #50 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x157cf70, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #51 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x157cf70) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #52 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #53 0x00007fcc2eef9dee in _action_set_done (action=0x157cb00) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #54 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x157cb00, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #55 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x157cb00) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #56 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #57 0x00007fcc2eef9dee in _action_set_done (action=0x157c690) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #58 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x157c690, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #59 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x157c690) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #60 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #61 0x00007fcc2eef9dee in _action_set_done (action=0x157c220) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #62 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x157c220, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #63 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x157c220) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #64 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #65 0x00007fcc2eef9dee in _action_set_done (action=0x15233c0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #66 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x15233c0, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #67 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x15233c0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #68 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #69 0x00007fcc2eef9dee in _action_set_done (action=0x1522f80) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #70 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x1522f80, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #71 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x1522f80) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #72 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #73 0x00007fcc2eef9dee in _action_set_done (action=0x1522ae0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #74 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x1522ae0, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #75 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x1522ae0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #76 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #77 0x00007fcc2eef9dee in _action_set_done (action=0x1522190) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #78 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x1522190, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #79 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x1522190) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #80 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #81 0x00007fcc2eef9dee in _action_set_done (action=0x1520ea0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6368
 #82 0x00007fcc2edbd26d in g_main_context_invoke_full (context=0x1044700, priority=200, function=0x7fcc2eef9ab0 <_action_set_done>, data=0x1520ea0, notify=0x7fcc2eeea5d0 <gst_validate_action_unref>) at ../glib/gmain.c:6533
 #83 0x00007fcc2eef6cf2 in gst_validate_action_set_done (action=0x1520ea0) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:6411
 #84 0x00007fcc2eef9018 in execute_next_action_full (scenario=<optimized out>, message=<optimized out>) at ../subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c:2803
 #85 0x00007fcc2edbc759 in g_timeout_dispatch (source=0x14b6340, callback=0x7fcc2eef99c0 <execute_next_action>, user_data=0x15f7620) at ../glib/gmain.c:5121
 #86 0x00007fcc2edbbe1c in g_main_dispatch (context=0x1044700) at ../glib/gmain.c:3476
 #87 g_main_context_dispatch_unlocked (context=0x1044700) at ../glib/gmain.c:4284
 #88 0x00007fcc2ee16d78 in g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x1044700, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4349
 #89 0x00007fcc2edb9a93 in g_main_context_iteration (context=context@entry=0x1044700, may_block=may_block@entry=1) at ../glib/gmain.c:4414
 #90 0x00007fcc2ec14c3d in g_application_run (application=application@entry=0x1042ab0, argc=argc@entry=4, argv=argv@entry=0x7fff499031e8) at ../gio/gapplication.c:2577
 #91 0x0000000000405dfd in real_main (argv=0x7fff499031e8, argc=4) at ../subprojects/gst-editing-services/tools/ges-launch.c:38
 #92 main (argc=4, argv=0x7fff499031e8) at ../subprojects/gst-editing-services/tools/ges-launch.c:56

```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5619>
2023-11-08 08:24:15 +00:00
Philippe Normand 05ce97c5c1 ges: discoverer-manager: Use appropriate key hash function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5608>
2023-11-06 14:23:45 +00:00
Thibault Saunier b8a7b2c9e2 ges: discoverer-manager: Support for delayed clean-up of discoverers
The manager keeps track of one discoverer per thread and in large applications
with hundreds of threads this can significantly increase memory pressure. So we
need to periodically clean-up the unused discoverers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5608>
2023-11-06 14:23:45 +00:00
Philippe Normand 101205d429 ges: timeline: Fix message leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5608>
2023-11-06 14:23:45 +00:00
Thibault Saunier 114ef64465 ges: Expose GESDiscovererManager::source-setup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5608>
2023-11-06 14:23:45 +00:00
Thibault Saunier 71aa451870 ges: discoverer-manager: Allow recursing discovery
When using deeply nested timelines with the `ges:` protocol the
formatters ends up trying to do discovery from the same thread current
discovery happens, leading to infinite freeze as GstDiscoverer can't run
several discoveries at the same time.

By ensuring that when calling `gst_discoverer_discover_uri_async` no
`GstDiscoverer` is set as "thread discoverer" we know that another
discoverer will be created if discovery recurses, effectively removing
the freeze.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5608>
2023-11-06 14:23:45 +00:00
Philippe Normand 8f18fde21a ges-uri-asset: Fix GESDiscovererManager leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5552>
2023-11-02 18:29:27 +00:00
Thibault Saunier 974e908c61 ges: project: Start making MT safe where needed
Formatters might call "loaded" from the `gessrc` streaming thread
meaning that the `->formatters` field need to be protected.

Several other APIs are called from gesbasedemux, in some radom
thread, so we should ensure that this is all MT. safe, and the API
makes it simple.

Co-authored-by: Philippe Normand <philn@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5431>
2023-10-04 09:29:04 +01:00
Michiel Westerbeek 0705de9f12 ges: decreased log level for missing ->init method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5339>
2023-09-17 19:19:19 +00:00
Thibault Saunier 6dd0019090 ges: Fix setting keyframes from ges-launch
There is no registered GValue conversion function from string to double (on purpose) so
we need to handle that case appropriately.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5294>
2023-09-06 11:07:35 -03:00
Doug Nazar 462aaa3a6a ges: validate: Use correct types when getting structure values
From https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/247

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4995>
2023-07-10 09:40:27 +01:00
Thibault Saunier 96f86da61a ges: pipeline: Avoid setting state before being constructed
It means setting state which triggers traces for not constructed objects
which fails in rust tracers as object should have names in all traces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4975>
2023-07-06 05:48:31 +00:00
Thibault Saunier 2b3757402b ges: Add support for gessrc as subtimeline element
Until now we have always had `gesdemux` as subtimeline elements,
the behavior when subtimelines are sources is different so we need
to support that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4882>
2023-06-29 19:24:37 +00:00
Alicia Boya García 64b4257509 ges-timeline-element: Fix refcount bug in "timeline" and "parent" properties
ges-timeline-element property getter handler was using
g_value_take_object() with internal pointers of the element as
arguments, instead of g_value_set_object().

g_value_take_object() moves the ownership of the reference; hence,
when reading "timeline" the reference ownership of timeline is moved
away from the ges-timeline-element and into the GValue.

Since GValues are temporaries that are often discarded quickly after,
this can easily lead to a double free. This was causing
gst-editing-services / pythontests to crash when running
TestTrackElements.test_ungroup_regroup() because of an innocent read of
`clip2.props.timeline` around the end of the test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4924>
2023-06-23 23:00:45 +00:00
Sebastian Dröge 4e8af5c41d ges: discoverer-manager: Don't mark signals as action signals
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4579>
2023-05-09 18:19:11 +00:00
Sebastian Dröge b34cbe9bf1 ges: discoverer-manager: Mark discovered signal error parameter as nullable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4579>
2023-05-09 18:19:11 +00:00
Thibault Saunier 98e5c5e862 ges: Implement a new GESDiscovererManager object
Allowing better control over the way discovery happens and allowing
us to expose a proper API.

This also adds the potential of implementing more multi-threaded
discovery in a clean way in the future.

This allows us to cleanly expose the new
GstDiscoverer::load-serialize-info signal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3911>
2023-04-29 06:54:10 -04:00
Thibault Saunier b14e675a27 gir: Checkout all .gir files and check that they are updated on the CI
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3010>
2023-04-22 09:32:32 -04:00
Sebastian Dröge 63a4d8bb54 ges: base-xml-formatter: Don't pass non-GObject pointers to GST_DEBUG_OBJECT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4443>
2023-04-18 10:03:46 +00:00
Tim-Philipp Müller f9eb4c5862 ges: re-indent with GNU indent 2.2.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4182>
2023-03-17 03:18:54 +00:00
Thibault Saunier 47a07a4f5a uri-asset: Don't create AudioSource asset for unknown track types
And just skip them as we can't do anything else with them right now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3976>
2023-02-16 01:47:28 +00:00
Luke McGartland 396c758544 Update subprojects/gst-editing-services/ges/ges-uri-asset.c
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3976>
2023-02-16 01:47:28 +00:00
Mathieu Duponchelle e728c0e71a ges-source: make sure internal decodebin doesn't get seeked too early
When uridecodebin exposes pads for its streams, we immediately ghost
the relevant (selected) one and let composition send a seek as soon as a
buffer is probed.

This means that sometimes uridecodebin is still linking elements
internally (for non-selected streams) and sees flush events travel down
the elements it is still busy trying to link / forward sticky events to.

This causes all sorts of nasty issues, which can be avoided by simply
blocking all data flow from the source until no-more-pads has been
emitted by uridecodebin (or whatever sub_element is wrapped).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3971>
2023-02-15 22:24:51 +00:00
Mathieu Duponchelle 2fd2af9420 ges-source: do not emit no-more-pads on child element
This most likely never caused any issues as we don't connect to
no-more-pads in the first place, and the element isn't directly exposed
to the user, but emitting it makes no sense, and we are actually going
to connect to no-more-pads in a subsequent commit.

The call was added in 86b893e54c, a patch
by me in 2013, I have no idea why but I probably didn't have a firm
grasp on what I was doing then.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3971>
2023-02-15 22:24:51 +00:00
Tim-Philipp Müller 18a3c32323 ges: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:09 +00:00
Thibault Saunier 18f313d317 ges: smart-mixer: Avoid video freeze on NLE stack changes
Since we support "nested compositors"[0] we were not finalizing the pads_infos
and thus not releasing the mixer pad on stack change, meaning that
the following stacks were never prerolling.

[0] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2094

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3738>
2023-01-17 20:10:19 +00:00
Thibault Saunier 3065608730 ges: Fix issues avoiding to use operator when unavailable on mixer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3738>
2023-01-17 20:10:19 +00:00
Sebastian Dröge bd534af999 ges: gst_bin_add() is transfer floating so wrappers around it are too
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3678>
2023-01-04 10:22:45 +00:00
Thibault Saunier 712bda84db ges: Add API to disable timeline coherence checks
There are cases where user might want to be in full control of the
timeline and not be limited by the checks that are being done by GES
to go from one timeline layout to another, this should be doable as
it is a valid use case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3501>
2022-12-02 18:37:29 +00:00
Edward Hervey 4aaaf29761 ges-xml-formatter: Plug some leaks
* Don't leak the mainloop
* Don't leak temporary strings
* Don't leak id when searching in hash table

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3428>
2022-11-18 07:22:23 +00:00
Edward Hervey ba5beb55ab ges-project: Don't leak string
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3428>
2022-11-18 07:22:23 +00:00
Edward Hervey 40d9858371 ges-structure-parser: Don't leak failed strings
We pass the ownership of current_string to the list of wrong strings, it will be
cleared then.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3428>
2022-11-18 07:22:23 +00:00
Sebastian Dröge 366893e9ac Fix various warnings from gobject-introspection
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3261>
2022-10-25 09:45:25 +03:00
Fabian Orccon db5b4e6a06 ges: transition: Notify vtype change on ges_extractable_set_asset call
Fixes #1454

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3215>
2022-10-24 14:14:30 +00:00
Sebastian Dröge f705da7131 ges: Add/fix various annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3194>
2022-10-18 13:51:16 +03:00
Thibault Saunier 7167721cac ges-video-source: Remove limit on frame duplication on EOS in videorate
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1352

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3000>
2022-09-20 13:23:02 +00:00
Thibault Saunier 65b2172fe8 ges: Enhance element names in video uri sources
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3000>
2022-09-20 13:23:02 +00:00
Thibault Saunier bc9c1e3956 meson: Namespace the plugins_doc_dep/libraries variables
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2970>
2022-09-01 21:17:35 +00:00
Seungha Yang f5c5f881e4 ges: Update outdated comment
d3d11compositor is a videoaggregator subclass and no more wrapper bin
since the MR
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2631

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2825>
2022-08-02 21:45:21 +00:00
Mathieu Duponchelle 52f7150de4 ges: preserve discovery order
The previous code was storing container children in reverse
addition order, this was mitigated by the fact that track elements
were also stored in reverse order, thus restoring the original
order, but it seems more consistent to preserve order throughout,
the extra cost of append operations is negligible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1549>
2022-08-02 15:48:12 +00:00
Mathieu Duponchelle 4b50e674c3 ges/gstframepositioner: don't create one compositor per frame meta
Instead, cache the looked up operator property

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2623>
2022-06-17 23:17:31 +00:00
Matthew Waters 2b94359765 ges/videourisource: handle non-1/1 PAR source videos
The automatic scaling done by framepositioner does not account for the
par of the video source.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2423>
2022-05-17 20:49:30 +00:00
George Kiagiadakis 5294a720f8 ges-video-transition: add a new "fade-in" transition type
This transition is meant to be very similar to crossfade, but
instead of fading out the background video at the same time as the
foreground fades in, the background video stays at 100% opacity
during the whole transition.

This essentially "restores" the old crossfade behaviour that was changed in:
eb48faf342
but using a new type enum, so that both behaviours are available,
letting applications choose.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2385>
2022-05-13 17:17:06 +03:00
Xabier Rodriguez Calvar d522b17d9c ges-smart-video-mixer: use the proper pad to get the positioner meta
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2094>
2022-04-01 13:07:46 +02:00
Thibault Saunier 1440ca2157 Fix license as GES is released under the LGPL2+ license
This was a mistake that some of the licensing notice in a few files was
referring to GPL3+ and it needs fixing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1956>
2022-03-24 01:18:24 +00:00
Sebastian Dröge 34964b6a98 ges: Include ges-image-source.h in the installed headers
It's referenced by `ges.h` and was previously available, so removing it
is an API change.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/963

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1563>
2022-01-24 19:54:57 +00:00
Tim-Philipp Müller 972615cf22 docs: fix unnecessary ampersand, < and > escaping in code blocks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1340>
2021-11-12 11:39:19 +00:00