summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>2020-02-25 10:45:47 +0530
committerGuillaume Desmottes <guillaume.desmottes@collabora.com>2020-02-25 10:51:39 +0530
commit27c1aa544e66c45ae34948638be47f9a7909e934 (patch)
tree6935e5f6f8e46dc3e40a793174eae244beda3d18
parent9e8a1de79d0e3c2273930ec9de904c545e5e7351 (diff)
downloadgst-omx-27c1aa544e66c45ae34948638be47f9a7909e934.tar.gz
omx: don't log error when failing to load conf file with generic target
The generic target is meant to only test building gst-omx. It doesn't provide any configuration file and so is not supposed to register any element. I'm not aware of any user building gst-omx with this target and providing their own conf file to actually register elements. But best to not break this use case anyway so let's just downgrade the log message. Fix GST_ERROR in the 'check fedora' CI job.
-rw-r--r--omx/gstomx.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/omx/gstomx.c b/omx/gstomx.c
index 53c8ffd..b9231b2 100644
--- a/omx/gstomx.c
+++ b/omx/gstomx.c
@@ -4024,14 +4024,23 @@ plugin_init (GstPlugin * plugin)
config = g_key_file_new ();
if (!g_key_file_load_from_dirs (config, *config_name,
(const gchar **) config_dirs, NULL, G_KEY_FILE_NONE, &err)) {
- gchar *paths;
-
- paths = g_strjoinv (":", config_dirs);
- GST_ERROR ("Failed to load configuration file: %s (searched in: %s as per "
- "GST_OMX_CONFIG_DIR environment variable, the xdg user config "
- "directory (or XDG_CONFIG_HOME) and the system config directory "
- "(or XDG_CONFIG_DIRS)", err->message, paths);
- g_free (paths);
+#ifdef USE_OMX_TARGET_GENERIC
+ GST_INFO ("No configuration file found; "
+ "ignore as gst-omx has been built with the generic target used only for testing");
+#else
+ {
+ gchar *paths;
+
+ paths = g_strjoinv (":", config_dirs);
+ GST_ERROR
+ ("Failed to load configuration file: %s (searched in: %s as per "
+ "GST_OMX_CONFIG_DIR environment variable, the xdg user config "
+ "directory (or XDG_CONFIG_HOME) and the system config directory "
+ "(or XDG_CONFIG_DIRS)", err->message, paths);
+ g_free (paths);
+ }
+#endif /* USE_OMX_TARGET_GENERIC */
+
g_error_free (err);
goto done;
}