binaryregistry: save and load release date time in GstPluginDesc
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 20 Jun 2010 00:55:00 +0000 (01:55 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 23 Jul 2010 16:03:42 +0000 (17:03 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=623040

gst/gstregistrybinary.h
gst/gstregistrychunks.c

index 65ed564..a367f41 100644 (file)
@@ -55,7 +55,7 @@ G_BEGIN_DECLS
  * This _must_ be updated whenever the registry format changes,
  * we currently use the core version where this change happened.
  */
-#define GST_MAGIC_BINARY_VERSION_STR ("0.10.29.1")
+#define GST_MAGIC_BINARY_VERSION_STR ("0.10.30.1")
 
 /*
  * GST_MAGIC_BINARY_VERSION_LEN:
index 7dd3ba2..1c0e649 100644 (file)
@@ -447,6 +447,8 @@ _priv_gst_registry_chunks_save_plugin (GList ** list, GstRegistry * registry,
   }
 
   /* pack plugin element strings */
+  gst_registry_chunks_save_const_string (list,
+      (plugin->desc.release_datetime) ? plugin->desc.release_datetime : "");
   gst_registry_chunks_save_const_string (list, plugin->desc.origin);
   gst_registry_chunks_save_const_string (list, plugin->desc.package);
   gst_registry_chunks_save_const_string (list, plugin->desc.source);
@@ -779,6 +781,8 @@ _priv_gst_registry_chunks_load_plugin (GstRegistry * registry, gchar ** in,
   unpack_const_string (*in, plugin->desc.source, end, fail);
   unpack_const_string (*in, plugin->desc.package, end, fail);
   unpack_const_string (*in, plugin->desc.origin, end, fail);
+  unpack_const_string (*in, plugin->desc.release_datetime, end, fail);
+
   GST_LOG ("read strings for name='%s'", plugin->desc.name);
   GST_LOG ("  desc.description='%s'", plugin->desc.description);
   GST_LOG ("  filename='%s'", plugin->filename);
@@ -787,6 +791,10 @@ _priv_gst_registry_chunks_load_plugin (GstRegistry * registry, gchar ** in,
   GST_LOG ("  desc.source='%s'", plugin->desc.source);
   GST_LOG ("  desc.package='%s'", plugin->desc.package);
   GST_LOG ("  desc.origin='%s'", plugin->desc.origin);
+  GST_LOG ("  desc.datetime=%s", plugin->desc.release_datetime);
+
+  if (plugin->desc.release_datetime[0] == '\0')
+    plugin->desc.release_datetime = NULL;
 
   /* unpack cache data */
   unpack_string_nocopy (*in, cache_str, end, fail);