summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4b84117)
raw | patch | inline | side by side (parent: 4b84117)
author | Nikhil Devshatwar <a0132237@ti.com> | |
Wed, 15 May 2013 12:23:51 +0000 (17:53 +0530) | ||
committer | Nikhil Devshatwar <a0132237@ti.com> | |
Wed, 15 May 2013 12:23:51 +0000 (17:53 +0530) |
gst/gstregistry.c | patch | blob | history |
diff --git a/gst/gstregistry.c b/gst/gstregistry.c
index 79745353b7ec4ae907e6245e6285fb994ff0eec0..14af23fa5ff69a3c7f13831cf602da81502c8963 100644 (file)
--- a/gst/gstregistry.c
+++ b/gst/gstregistry.c
#include <stdio.h>
#include <string.h>
+#ifdef HAVE_SYS_UTSNAME_H
+#include <sys/utsname.h>
+#endif
+
/* For g_stat () */
#include <glib/gstdio.h>
* path, and the plugins installed in the user's home directory */
plugin_path = g_getenv ("GST_PLUGIN_SYSTEM_PATH");
if (plugin_path == NULL) {
+#if defined(__linux__) && defined (__i386__)
+ struct utsname uts;
+#endif
char *home_plugins, *backwards_compat_plugins;
GST_DEBUG ("GST_PLUGIN_SYSTEM_PATH not set");
/* finally, look in the /usr/lib backwards-compatibility path. */
backwards_compat_plugins = g_build_filename ("/usr/lib",
"gstreamer-" GST_MAJORMINOR, NULL);
+#if defined(__linux__) && defined (__i386__)
+ uname(&uts);
+ if (!strcmp("x86_64", uts.machine)
+ && !access("/usr/lib32/gstreamer-0.10", R_OK|X_OK))
+ {
+ g_free (backwards_compat_plugins);
+ backwards_compat_plugins = g_build_filename ("/usr/lib32",
+ "gstreamer-" GST_MAJORMINOR, NULL);
+ }
+#endif
GST_DEBUG ("scanning plugins %s", backwards_compat_plugins);
changed |= gst_registry_scan_path_internal (&context, backwards_compat_plugins);
g_free (backwards_compat_plugins);