make the user registry location major-minor versioned so it doesn't clash with older incompatible registries make gst...

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
This commit is contained in:
Thomas Vander Stichele 2003-04-23 19:59:38 +00:00
parent 313c399808
commit 582913dc84
3 changed files with 7 additions and 3 deletions

View file

@ -139,7 +139,8 @@ BUILT_SOURCES = gstmarshal.h gstmarshal.c gstenumtypes.h $(GST_ENUMTYPES_SRC)
libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = -D_GNU_SOURCE \ libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = -D_GNU_SOURCE \
$(GST_CFLAGS) \ $(GST_CFLAGS) \
-DG_LOG_DOMAIN=g_log_domain_gstreamer \ -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_LIBADD = $(LIBGST_LIBS) $(GST_PARSE_LIBADD) $(GST_REGISTRY_LIBADD)
libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = @GST_LT_LDFLAGS@ -version-info @GST_LIBVERSION@ libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = @GST_LT_LDFLAGS@ -version-info @GST_LIBVERSION@

View file

@ -30,7 +30,7 @@
#define GLOBAL_REGISTRY_FILE GLOBAL_REGISTRY_DIR"/registry.xml" #define GLOBAL_REGISTRY_FILE GLOBAL_REGISTRY_DIR"/registry.xml"
#define GLOBAL_REGISTRY_FILE_TMP GLOBAL_REGISTRY_DIR"/.registry.xml.tmp" #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 LOCAL_REGISTRY_DIR"/registry.xml"
#define LOCAL_REGISTRY_FILE_TMP LOCAL_REGISTRY_DIR"/.registry.xml.tmp" #define LOCAL_REGISTRY_FILE_TMP LOCAL_REGISTRY_DIR"/.registry.xml.tmp"

View file

@ -81,7 +81,10 @@ int main (int argc,char *argv[])
G_CALLBACK (plugin_added_func), NULL); G_CALLBACK (plugin_added_func), NULL);
if (registry->flags & GST_REGISTRY_WRITABLE) { 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_rebuild (registry);
gst_registry_save (registry); gst_registry_save (registry);
} }