summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-09-12 14:09:46 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-09-14 11:28:36 +0200
commitcb9078627c792bbb10b32ae46cf9d132dcfab938 (patch)
tree37cfb370c6e9f3a8497b2a17c62ca61b20b33408
parent540f926706ca62909bf4d60a85c335ef0016159f (diff)
downloadgst-omx-cb9078627c792bbb10b32ae46cf9d132dcfab938.tar.gz
omx: Also search for gstomx.conf in the autoconf --sysconfdir
https://bugzilla.gnome.org/show_bug.cgi?id=770743
-rw-r--r--configure.ac3
-rw-r--r--omx/gstomx.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 6d4c803..124ad3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -371,6 +371,9 @@ dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_.*' $GST_ALL_LDFLAGS"
AC_SUBST(GST_PLUGIN_LDFLAGS)
+AS_AC_EXPAND(GST_OMX_CONFIG_DIR, ${sysconfdir}/xdg)
+AC_DEFINE_UNQUOTED(GST_OMX_CONFIG_DIR, "$GST_OMX_CONFIG_DIR", [gst-omx configuration directory])
+
dnl *** output files ***
AC_CONFIG_FILES(
diff --git a/omx/gstomx.c b/omx/gstomx.c
index 7b64aab..7044400 100644
--- a/omx/gstomx.c
+++ b/omx/gstomx.c
@@ -2643,6 +2643,7 @@ plugin_init (GstPlugin * plugin)
gsize n_elements;
static const gchar *config_name[] = { "gstomx.conf", NULL };
static const gchar *env_config_name[] = { "GST_OMX_CONFIG_DIR", NULL };
+ static const gchar *gst_omx_config_dir = GST_OMX_CONFIG_DIR;
GST_DEBUG_CATEGORY_INIT (gstomx_debug, "omx", 0, "gst-omx");
GST_DEBUG_CATEGORY_INIT (gst_omx_video_debug_category, "omxvideo", 0,
@@ -2654,7 +2655,7 @@ plugin_init (GstPlugin * plugin)
user_config_dir = g_get_user_config_dir ();
system_config_dirs = g_get_system_config_dirs ();
config_dirs =
- g_new (gchar *, g_strv_length ((gchar **) system_config_dirs) + 3);
+ g_new (gchar *, g_strv_length ((gchar **) system_config_dirs) + 4);
i = 0;
j = 0;
@@ -2663,6 +2664,7 @@ plugin_init (GstPlugin * plugin)
config_dirs[i++] = (gchar *) user_config_dir;
while (system_config_dirs[j])
config_dirs[i++] = (gchar *) system_config_dirs[j++];
+ config_dirs[i++] = (gchar *) gst_omx_config_dir;
config_dirs[i++] = NULL;
gst_plugin_add_dependency (plugin, env_config_name,