summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorPhilippe Normand <pnormand@igalia.com>2011-04-29 13:43:07 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2011-05-03 09:43:22 +0200
commit4e36f93924cf984d7ff1ab28e290ab9893464ad2 (patch)
tree088a83e9263969e5bd28a9882acfc7b8c24d917e /gst
parent5fe9bcd989cdfb4d540baab90cad32c5b4873752 (diff)
core: store presets, registry and plugins in XDG directories.
Presets and plugins moved to $XDG_DATA_HOME/gstreamer-0.11/ root directory. Registry moved to $XDG_CACHE_HOME/gstreamer-0.11/. Fixes bug #518597.
Diffstat (limited to 'gst')
-rw-r--r--gst/gstpreset.c6
-rw-r--r--gst/gstregistry.c9
2 files changed, 8 insertions, 7 deletions
diff --git a/gst/gstpreset.c b/gst/gstpreset.c
index d56606573..99a5755f4 100644
--- a/gst/gstpreset.c
+++ b/gst/gstpreset.c
@@ -141,9 +141,9 @@ preset_get_paths (GstPreset * preset, const gchar ** preset_user_path,
if (!(preset_path = g_type_get_qdata (type, preset_user_path_quark))) {
gchar *preset_dir;
- /* user presets go in '$HOME/.gstreamer-0.10/presets/GstSimSyn.prs' */
- preset_dir = g_build_filename (g_get_home_dir (),
- ".gstreamer-" GST_MAJORMINOR, "presets", NULL);
+ /* user presets go in user's XDG data directory. */
+ preset_dir = g_build_filename (g_get_user_data_dir (),
+ "gstreamer-" GST_MAJORMINOR, "presets", NULL);
GST_INFO_OBJECT (preset, "user_preset_dir: '%s'", preset_dir);
preset_path =
g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s.prs", preset_dir,
diff --git a/gst/gstregistry.c b/gst/gstregistry.c
index 5b6df92f3..96cb41511 100644
--- a/gst/gstregistry.c
+++ b/gst/gstregistry.c
@@ -1509,8 +1509,9 @@ scan_and_update_registry (GstRegistry * default_registry,
/* plugins in the user's home directory take precedence over
* system-installed ones */
- home_plugins = g_build_filename (g_get_home_dir (),
- ".gstreamer-" GST_MAJORMINOR, "plugins", NULL);
+ home_plugins = g_build_filename (g_get_user_data_dir (),
+ "gstreamer-" GST_MAJORMINOR, "plugins", NULL);
+
GST_DEBUG ("scanning home plugins %s", home_plugins);
changed |= gst_registry_scan_path_internal (&context, home_plugins);
g_free (home_plugins);
@@ -1589,8 +1590,8 @@ ensure_current_registry (GError ** error)
default_registry = gst_registry_get_default ();
registry_file = g_strdup (g_getenv ("GST_REGISTRY"));
if (registry_file == NULL) {
- registry_file = g_build_filename (g_get_home_dir (),
- ".gstreamer-" GST_MAJORMINOR, "registry." HOST_CPU ".bin", NULL);
+ registry_file = g_build_filename (g_get_user_cache_dir (),
+ "gstreamer-" GST_MAJORMINOR, "registry." HOST_CPU ".bin", NULL);
}
if (!_gst_disable_registry_cache) {