make the user registry location major-minor versioned so it doesn't clash with older...
authorThomas Vander Stichele <thomas@apestaart.org>
Wed, 23 Apr 2003 19:59:38 +0000 (19:59 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Wed, 23 Apr 2003 19:59:38 +0000 (19:59 +0000)
Original commit message from CVS:
* make the user registry location major-minor versioned so it doesn't
clash with older incompatible registries
* make gst-register output the location of the registry it's writing

gst/Makefile.am
gst/gstregistry.h
tools/gst-register.c

index 24da79a..77a38ab 100644 (file)
@@ -139,7 +139,8 @@ BUILT_SOURCES = gstmarshal.h gstmarshal.c gstenumtypes.h $(GST_ENUMTYPES_SRC)
 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = -D_GNU_SOURCE \
        $(GST_CFLAGS) \
        -DG_LOG_DOMAIN=g_log_domain_gstreamer \
-       -DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" 
+       -DGST_CACHE_DIR=\""$(GST_CACHE_DIR)"\" \
+       -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" 
 libgstreamer_@GST_MAJORMINOR@_la_LIBADD = $(LIBGST_LIBS) $(GST_PARSE_LIBADD) $(GST_REGISTRY_LIBADD)
 libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = @GST_LT_LDFLAGS@ -version-info @GST_LIBVERSION@ 
 
index 75493f3..f639ef3 100644 (file)
@@ -30,7 +30,7 @@
 #define GLOBAL_REGISTRY_FILE     GLOBAL_REGISTRY_DIR"/registry.xml"
 #define GLOBAL_REGISTRY_FILE_TMP GLOBAL_REGISTRY_DIR"/.registry.xml.tmp"
 
-#define LOCAL_REGISTRY_DIR       ".gstreamer"
+#define LOCAL_REGISTRY_DIR       ".gstreamer-"GST_MAJORMINOR
 #define LOCAL_REGISTRY_FILE      LOCAL_REGISTRY_DIR"/registry.xml"
 #define LOCAL_REGISTRY_FILE_TMP  LOCAL_REGISTRY_DIR"/.registry.xml.tmp"
 
index 726126e..8a445e4 100644 (file)
@@ -81,7 +81,10 @@ int main (int argc,char *argv[])
                      G_CALLBACK (plugin_added_func), NULL);
 
     if (registry->flags & GST_REGISTRY_WRITABLE) {
-      g_print ("rebuilding %s\n", registry->name);
+      char *location;
+      g_object_get (registry, "location", &location, NULL);
+      g_print ("rebuilding %s (%s)\n", registry->name, location);
+      g_free (location);
       gst_registry_rebuild (registry);
       gst_registry_save (registry);
     }