*
* Returns: new buffer or %NULL, unref the buffer when done
*
- * Since: 0.10.29
+ * Since: 0.10.33
*/
GstBuffer *
- gst_tag_list_to_xmp_buffer (const GstTagList * list, gboolean read_only)
+ gst_tag_list_to_xmp_buffer_full (const GstTagList * list, gboolean read_only,
+ const gchar ** schemas)
{
GstBuffer *buffer = NULL;
- GString *str = g_string_sized_new (4096);
+ XmpSerializationData serialization_data;
+ GString *data;
guint i;
+ gsize size;
+ gpointer data;
+ serialization_data.data = g_string_sized_new (4096);
+ serialization_data.schemas = schemas;
+ data = serialization_data.data;
+
xmp_tags_initialize ();
g_return_val_if_fail (GST_IS_TAG_LIST (list), NULL);
"<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"");
i = 0;
while (ns_match[i].ns_prefix) {
- g_string_append_printf (str, " xmlns:%s=\"%s\"", ns_match[i].ns_prefix,
- ns_match[i].ns_uri);
+ if (xmp_serialization_data_use_schema (&serialization_data,
+ ns_match[i].ns_prefix))
+ g_string_append_printf (data, " xmlns:%s=\"%s\"",
+ ns_match[i].ns_prefix, ns_match[i].ns_uri);
i++;
}
- g_string_append (data, ">\n");
- g_string_append (data, "<rdf:Description rdf:about=\"\">\n");
+ g_string_append (str, ">\n");
+ g_string_append (str, "<rdf:Description rdf:about=\"\">\n");
/* iterate the taglist */
- gst_tag_list_foreach (list, write_one_tag, str);
+ gst_tag_list_foreach (list, write_one_tag, &serialization_data);
/* xmp footer */
- g_string_append (data, "</rdf:Description>\n");
- g_string_append (data, "</rdf:RDF>\n");
- g_string_append (data, "</x:xmpmeta>\n");
+ g_string_append (str, "</rdf:Description>\n");
+ g_string_append (str, "</rdf:RDF>\n");
+ g_string_append (str, "</x:xmpmeta>\n");
if (!read_only) {
/* the xmp spec recommand to add 2-4KB padding for in-place editable xmp */
guint id3_picture_type);
/* functions to convert GstBuffers with xmp packets contents to GstTagLists and back */
-GstTagList * gst_tag_list_from_xmp_buffer (const GstBuffer * buffer);
+GstTagList * gst_tag_list_from_xmp_buffer (GstBuffer * buffer);
GstBuffer * gst_tag_list_to_xmp_buffer (const GstTagList * list,
gboolean read_only);
+ GstBuffer * gst_tag_list_to_xmp_buffer_full (const GstTagList * list,
+ gboolean read_only, const gchar ** schemas);
+ const gchar** gst_tag_xmp_list_schemas (void);
/* functions related to exif */
GstBuffer * gst_tag_list_to_exif_buffer (const GstTagList * taglist,