diff options
Diffstat (limited to 'ges')
-rw-r--r-- | ges/ges-base-xml-formatter.c | 6 | ||||
-rw-r--r-- | ges/ges-internal.h | 3 | ||||
-rw-r--r-- | ges/ges-xml-formatter.c | 17 |
3 files changed, 18 insertions, 8 deletions
diff --git a/ges/ges-base-xml-formatter.c b/ges/ges-base-xml-formatter.c index a6d1a680..1a1f4e3d 100644 --- a/ges/ges-base-xml-formatter.c +++ b/ges/ges-base-xml-formatter.c @@ -1109,7 +1109,7 @@ done: void ges_base_xml_formatter_add_source (GESBaseXmlFormatter * self, const gchar * track_id, GstStructure * children_properties, - GstStructure * properties) + GstStructure * properties, const gchar * metadatas) { GESBaseXmlFormatterPrivate *priv = _GET_PRIV (self); GESTrackElement *element = NULL; @@ -1138,6 +1138,10 @@ ges_base_xml_formatter_add_source (GESBaseXmlFormatter * self, if (children_properties) gst_structure_foreach (children_properties, (GstStructureForeachFunc) _set_child_property, element); + + if (metadatas) + ges_meta_container_add_metas_from_string (GES_META_CONTAINER + (element), metadatas); } void diff --git a/ges/ges-internal.h b/ges/ges-internal.h index dad6c9cd..66b2ba80 100644 --- a/ges/ges-internal.h +++ b/ges/ges-internal.h @@ -366,7 +366,8 @@ G_GNUC_INTERNAL void ges_base_xml_formatter_add_track_element (GESBaseXmlForma G_GNUC_INTERNAL void ges_base_xml_formatter_add_source (GESBaseXmlFormatter *self, const gchar * track_id, GstStructure *children_properties, - GstStructure *properties); + GstStructure *properties, + const gchar *metadatas); G_GNUC_INTERNAL void ges_base_xml_formatter_add_group (GESBaseXmlFormatter *self, const gchar *name, diff --git a/ges/ges-xml-formatter.c b/ges/ges-xml-formatter.c index 0747ccf5..63660f1f 100644 --- a/ges/ges-xml-formatter.c +++ b/ges/ges-xml-formatter.c @@ -35,8 +35,8 @@ #define parent_class ges_xml_formatter_parent_class #define API_VERSION 0 -#define MINOR_VERSION 7 -#define VERSION 0.7 +#define MINOR_VERSION 8 +#define VERSION 0.8 #define COLLECT_STR_OPT (G_MARKUP_COLLECT_STRING | G_MARKUP_COLLECT_OPTIONAL) @@ -722,14 +722,15 @@ _parse_source (GMarkupParseContext * context, const gchar * element_name, GESXmlFormatter * self, GError ** error) { GstStructure *children_props = NULL, *props = NULL; - const gchar *track_id = NULL, *children_properties = NULL, *properties = NULL; + const gchar *track_id = NULL, *children_properties = NULL, *properties = + NULL, *metadatas = NULL; if (!g_markup_collect_attributes (element_name, attribute_names, attribute_values, error, G_MARKUP_COLLECT_STRING, "track-id", &track_id, COLLECT_STR_OPT, "children-properties", &children_properties, COLLECT_STR_OPT, "properties", &properties, - G_MARKUP_COLLECT_INVALID)) { + COLLECT_STR_OPT, "metadatas", &metadatas, G_MARKUP_COLLECT_INVALID)) { return; } @@ -746,7 +747,7 @@ _parse_source (GMarkupParseContext * context, const gchar * element_name, } ges_base_xml_formatter_add_source (GES_BASE_XML_FORMATTER (self), track_id, - children_props, props); + children_props, props, metadatas); done: if (children_props) @@ -1619,7 +1620,7 @@ _save_source (GESXmlFormatter * self, GString * str, { gint index, n_props; gboolean serialize; - gchar *properties; + gchar *properties, *metas; if (!GES_IS_SOURCE (element)) return; @@ -1648,6 +1649,10 @@ _save_source (GESXmlFormatter * self, GString * str, } g_free (properties); + metas = ges_meta_container_metas_to_string (GES_META_CONTAINER (element)); + g_string_append_printf (str, "metadatas='%s' ", metas); + g_free (metas); + _save_children_properties (str, element, depth); append_escaped (str, g_markup_printf_escaped (">\n"), depth); _save_keyframes (str, GES_TRACK_ELEMENT (element), index, depth); |