mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
more registry fixes
Original commit message from CVS: more registry fixes
This commit is contained in:
parent
4013bb45d6
commit
98611ba214
3 changed files with 21 additions and 8 deletions
2
DEVEL
2
DEVEL
|
@ -7,3 +7,5 @@ instead of
|
||||||
because the latter will, if the include flags are set that way, first look
|
because the latter will, if the include flags are set that way, first look
|
||||||
for the installed headers instead of the newest one, which is in your source
|
for the installed headers instead of the newest one, which is in your source
|
||||||
dir.
|
dir.
|
||||||
|
|
||||||
|
* When doing releases, please follow the guidelines in docs
|
||||||
|
|
|
@ -64,7 +64,6 @@ void
|
||||||
_gst_plugin_initialize (void)
|
_gst_plugin_initialize (void)
|
||||||
{
|
{
|
||||||
GList *gst_plugin_default_paths = NULL;
|
GList *gst_plugin_default_paths = NULL;
|
||||||
struct stat stat_buf;
|
|
||||||
#ifndef GST_DISABLE_REGISTRY
|
#ifndef GST_DISABLE_REGISTRY
|
||||||
GstRegistryRead *gst_reg;
|
GstRegistryRead *gst_reg;
|
||||||
gchar *gst_registry;
|
gchar *gst_registry;
|
||||||
|
@ -107,12 +106,19 @@ _gst_plugin_initialize (void)
|
||||||
if (_gst_init_registry_write)
|
if (_gst_init_registry_write)
|
||||||
{
|
{
|
||||||
/* delete it before writing */
|
/* delete it before writing */
|
||||||
|
GST_INFO (GST_CAT_PLUGIN_LOADING, " Removing registry %s if it exists", gst_registry);
|
||||||
unlink (gst_registry);
|
unlink (gst_registry);
|
||||||
}
|
}
|
||||||
if (stat (gst_registry, &stat_buf) == 0)
|
if (g_file_test (gst_registry, G_FILE_TEST_EXISTS))
|
||||||
|
{
|
||||||
doc = xmlParseFile (gst_registry);
|
doc = xmlParseFile (gst_registry);
|
||||||
|
GST_INFO (GST_CAT_PLUGIN_LOADING, " Reading registry from %s", gst_registry);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
GST_INFO (GST_CAT_PLUGIN_LOADING, " Not reading registry", gst_registry);
|
||||||
doc = NULL;
|
doc = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!doc ||
|
if (!doc ||
|
||||||
!doc->xmlRootNode ||
|
!doc->xmlRootNode ||
|
||||||
|
|
|
@ -124,6 +124,11 @@ gst_registry_read_get ()
|
||||||
{
|
{
|
||||||
gchar *homedir = (gchar *) g_get_home_dir ();
|
gchar *homedir = (gchar *) g_get_home_dir ();
|
||||||
gst_reg->local_reg = g_strjoin ("/", homedir, LOCAL_REGISTRY_FILE, NULL);
|
gst_reg->local_reg = g_strjoin ("/", homedir, LOCAL_REGISTRY_FILE, NULL);
|
||||||
|
if (g_file_test (gst_reg->local_reg, G_FILE_TEST_EXISTS) == FALSE)
|
||||||
|
{
|
||||||
|
/* it does not exist, so don't read from it */
|
||||||
|
g_free (gst_reg->local_reg);
|
||||||
|
}
|
||||||
gst_reg->global_reg = g_strdup (GLOBAL_REGISTRY_FILE);
|
gst_reg->global_reg = g_strdup (GLOBAL_REGISTRY_FILE);
|
||||||
}
|
}
|
||||||
return gst_reg;
|
return gst_reg;
|
||||||
|
|
Loading…
Reference in a new issue