mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
project: Disable update in the project rather than the formatter
We need to make sure the update are disabled until the project is fully loaded, let the responsability to the project instead of the formatter
This commit is contained in:
parent
284648e536
commit
d702b16e25
2 changed files with 3 additions and 2 deletions
|
@ -319,10 +319,8 @@ ges_formatter_load_from_uri (GESFormatter * formatter,
|
|||
g_return_val_if_fail (GES_IS_TIMELINE (timeline), FALSE);
|
||||
|
||||
if (klass->load_from_uri) {
|
||||
ges_timeline_enable_update (timeline, FALSE);
|
||||
formatter->timeline = timeline;
|
||||
ret = klass->load_from_uri (formatter, timeline, uri, error);
|
||||
ges_timeline_enable_update (timeline, TRUE);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -100,6 +100,7 @@ _emit_loaded_in_idle (EmitLoadedInIdle * data)
|
|||
{
|
||||
g_signal_emit (data->project, _signals[LOADED_SIGNAL], 0, data->timeline);
|
||||
|
||||
ges_timeline_enable_update (data->timeline, TRUE);
|
||||
gst_object_unref (data->project);
|
||||
gst_object_unref (data->timeline);
|
||||
g_slice_free (EmitLoadedInIdle, data);
|
||||
|
@ -200,6 +201,7 @@ _load_project (GESProject * project, GESTimeline * timeline, GError ** error)
|
|||
}
|
||||
|
||||
ges_project_add_formatter (GES_PROJECT (project), formatter);
|
||||
ges_timeline_enable_update (timeline, FALSE);
|
||||
ges_formatter_load_from_uri (formatter, timeline, priv->uri, &lerr);
|
||||
if (lerr) {
|
||||
GST_WARNING_OBJECT (project, "Could not load the timeline,"
|
||||
|
@ -515,6 +517,7 @@ ges_project_set_loaded (GESProject * project, GESFormatter * formatter)
|
|||
|
||||
/* We are now done with that formatter */
|
||||
ges_project_remove_formatter (project, formatter);
|
||||
ges_timeline_enable_update (formatter->timeline, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue