binaryregistry: save and load release date time in GstPluginDesc

https://bugzilla.gnome.org/show_bug.cgi?id=623040
This commit is contained in:
Tim-Philipp Müller 2010-06-20 01:55:00 +01:00
parent 8c72758ec2
commit 042e056776
2 changed files with 9 additions and 1 deletions

View 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:

View 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);