summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2018-07-27 22:11:33 -0400
committerThibault Saunier <tsaunier@igalia.com>2018-07-27 22:56:23 -0400
commit5f5cbd111cd41e11d3e2f875ed4545eb7c0e3df2 (patch)
tree573bae90c7f665dcf9f1709e0c026a2165d28001
parent43e075d81f3c3f0351d7661b8c4efd97614cf5bd (diff)
project: Compute relocation URIs in missing-uri signal
Until know we were doing it outside of the signal and subclasses didn't have a chance to know that some assets was relocated. This is required so that Pitivi can handle proxy delation and relocated assets. Required for https://gitlab.gnome.org/GNOME/pitivi/issues/2203
-rw-r--r--ges/ges-project.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/ges/ges-project.c b/ges/ges-project.c
index 0befc1f0..599f8fb4 100644
--- a/ges/ges-project.c
+++ b/ges/ges-project.c
@@ -313,6 +313,13 @@ ges_missing_uri_default (GESProject * self, GError * error,
{
guint i;
const gchar *old_uri = ges_asset_get_id (wrong_asset);
+ gchar *new_id = NULL;
+
+ if (ges_asset_request_id_update (wrong_asset, &new_id, error) && new_id) {
+ GST_INFO_OBJECT (self, "Returned guessed new ID: %s", new_id);
+
+ return new_id;
+ }
if (new_paths == NULL)
return NULL;
@@ -588,11 +595,10 @@ ges_project_try_updating_id (GESProject * project, GESAsset * asset,
return NULL;
}
- if (new_id == NULL) {
- GST_DEBUG_OBJECT (project, "Sending 'missing-uri' signal for %s", id);
- g_signal_emit (project, _signals[MISSING_URI_SIGNAL], 0, error, asset,
- &new_id);
- }
+ /* Always send the MISSING_URI signal if requesting new ID is possible
+ * so that subclasses of GESProject are aware of the missing-uri */
+ g_signal_emit (project, _signals[MISSING_URI_SIGNAL], 0, error, asset,
+ &new_id);
if (new_id) {
GST_DEBUG_OBJECT (project, "new id found: %s", new_id);