mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
formatter: Disable updates when loading a project
This commit is contained in:
parent
a8f32d2e48
commit
410a3e4c3f
1 changed files with 8 additions and 3 deletions
|
@ -401,6 +401,7 @@ gboolean
|
|||
ges_formatter_load_from_uri (GESFormatter * formatter, GESTimeline * timeline,
|
||||
const gchar * uri)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
||||
|
||||
g_return_val_if_fail (GES_IS_FORMATTER (formatter), FALSE);
|
||||
|
@ -408,10 +409,13 @@ ges_formatter_load_from_uri (GESFormatter * formatter, GESTimeline * timeline,
|
|||
|
||||
g_signal_connect (timeline, "discovery-error",
|
||||
G_CALLBACK (discovery_error_cb), formatter);
|
||||
if (klass->load_from_uri)
|
||||
return klass->load_from_uri (formatter, timeline, uri);
|
||||
if (klass->load_from_uri) {
|
||||
ges_timeline_enable_update (timeline, FALSE);
|
||||
ret = klass->load_from_uri (formatter, timeline, uri);
|
||||
ges_timeline_enable_update (timeline, TRUE);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -600,6 +604,7 @@ discovery_error_cb (GESTimeline * timeline,
|
|||
static gboolean
|
||||
project_loaded (GESFormatter * formatter, GESTimeline * timeline)
|
||||
{
|
||||
GST_INFO_OBJECT (formatter, "Emit project loaded");
|
||||
g_signal_emit (formatter, ges_formatter_signals[LOADED_SIGNAL], 0, timeline);
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue