diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2015-11-04 20:20:10 +0100 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2015-11-04 21:13:29 +0100 |
commit | 4adca15a0372fed8f19baaa3ef590c9dabe5f271 (patch) | |
tree | ae49ca38cee450f58a223376fb45a9b8d8c68116 | |
parent | d1dc4bb64a3886677694fa8faf653e01e6fe8298 (diff) |
formatter: Do not serialize top effect priorities
We just need to make sure they are always serialized in the right
order (which is the case) and de serializing them will lead to the
right behaviour.
We should not serialize the priority as the priority of the source
itself depends on the action having been done on the parent clip,
and we do not serialize the source priorities (and should not, GES
should just do the right thing).
Differential Revision: https://phabricator.freedesktop.org/D491
-rw-r--r-- | ges/ges-base-xml-formatter.c | 5 | ||||
-rw-r--r-- | ges/ges-xml-formatter.c | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/ges/ges-base-xml-formatter.c b/ges/ges-base-xml-formatter.c index 5223ecb6..bf176d8e 100644 --- a/ges/ges-base-xml-formatter.c +++ b/ges/ges-base-xml-formatter.c @@ -567,9 +567,12 @@ _add_track_element (GESFormatter * self, GESClip * clip, gst_structure_foreach (children_properties, (GstStructureForeachFunc) _set_child_property, trackelement); - if (properties) + if (properties) { + /* We do not serialize the priority anymore, and we should never have. */ + gst_structure_remove_field (properties, "priority"); gst_structure_foreach (properties, (GstStructureForeachFunc) set_property_foreach, trackelement); + } } static void diff --git a/ges/ges-xml-formatter.c b/ges/ges-xml-formatter.c index c50d5ca6..f78dba57 100644 --- a/ges/ges-xml-formatter.c +++ b/ges/ges-xml-formatter.c @@ -1085,7 +1085,8 @@ _save_effect (GString * str, guint clip_id, GESTrackElement * trackelement, g_list_free_full (tracks, gst_object_unref); properties = _serialize_properties (G_OBJECT (trackelement), "start", - "in-point", "duration", "locked", "max-duration", "name", NULL); + "in-point", "duration", "locked", "max-duration", "name", "priority", + NULL); metas = ges_meta_container_metas_to_string (GES_META_CONTAINER (trackelement)); extractable_id = ges_extractable_get_id (GES_EXTRACTABLE (trackelement)); @@ -1146,8 +1147,6 @@ _save_layers (GESXmlFormatter * self, GString * str, GESTimeline * timeline) continue; } - effects = ges_clip_get_top_effects (clip); - /* We escape all mandatrorry properties that are handled sparetely * and vtype for StandarTransition as it is the asset ID */ properties = _serialize_properties (G_OBJECT (clip), @@ -1169,9 +1168,14 @@ _save_layers (GESXmlFormatter * self, GString * str, GESTimeline * timeline) g_hash_table_insert (self->priv->element_id, clip, GINT_TO_POINTER (priv->nbelements)); - for (tmpeffect = effects; tmpeffect; tmpeffect = tmpeffect->next) + /* Effects must always be serialized in the right priority order. + * List order is guaranteed by the fact that ges_clip_get_top_effects + * sorts the effects. */ + effects = ges_clip_get_top_effects (clip); + for (tmpeffect = effects; tmpeffect; tmpeffect = tmpeffect->next) { _save_effect (str, priv->nbelements, GES_TRACK_ELEMENT (tmpeffect->data), timeline); + } tracks = ges_timeline_get_tracks (timeline); |