core->user_count = 0;
g_hash_table_insert (core_handles, g_strdup (filename), core);
+ /* Hack for the Broadcom OpenMAX IL implementation */
+ if (g_str_has_prefix (filename, "vc/lib/libopenmaxil.so")) {
+ gchar *bcm_host_filename;
+ gchar *bcm_host_path;
+ GModule *bcm_host_module;
+ void (*bcm_host_init) (void);
+
+ bcm_host_path = g_path_get_dirname (filename);
+ bcm_host_filename =
+ g_build_filename (bcm_host_path, "libbcm_host.so", NULL);
+
+ bcm_host_module = g_module_open (bcm_host_filename, G_MODULE_BIND_LAZY);
+
+ g_free (bcm_host_filename);
+ g_free (bcm_host_path);
+
+ if (!bcm_host_module) {
+ GST_ERROR ("Failed to load libbcm_host.so");
+ goto error;
+ }
+
+ if (!g_module_symbol (bcm_host_module, "bcm_host_init",
+ (gpointer *) & bcm_host_init)) {
+ GST_ERROR ("Failed to load symbol 'bcm_host_init' from libbcm_host.so");
+ goto error;
+ }
+
+ bcm_host_init ();
+ }
+
core->module = g_module_open (filename, G_MODULE_BIND_LAZY);
if (!core->module)
goto load_failed;