1 /* GStreamer
2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * 2000 Wim Taymans <wtay@chello.be>
4 *
5 * gstplugin.c: Plugin subsystem for loading elements, types, and libs
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
23 #include <sys/types.h>
24 #include <sys/stat.h>
25 #include <dirent.h>
26 #include <unistd.h>
27 #include <signal.h>
29 #include "gst_private.h"
31 #include "gstplugin.h"
32 #include "gstversion.h"
33 #include "gstregistrypool.h"
34 #include "gstinfo.h"
35 #include "config.h"
36 #include "gstfilter.h"
39 #ifndef GST_DISABLE_GST_DEBUG
40 #define GST_CAT_DEFAULT GST_CAT_PLUGIN_LOADING
41 #else
42 #define GST_CAT_DEFAULT 0
43 #endif
45 static GModule *main_module = NULL;
46 static GList *_gst_plugin_static = NULL;
48 /* static variables for segfault handling of plugin loading */
49 static char *_gst_plugin_fault_handler_filename = NULL;
50 extern gboolean *_gst_disable_segtrap; /* see gst.c */
51 static gboolean *_gst_plugin_fault_handler_is_setup = FALSE;
53 /* list of valid licenses.
54 * One of these must be specified or the plugin won't be loaded
55 * Contact gstreamer-devel@lists.sourceforge.net if your license should be
56 * added.
57 *
58 * GPL: http://www.gnu.org/copyleft/gpl.html
59 * LGPL: http://www.gnu.org/copyleft/lesser.html
60 * QPL: http://www.trolltech.com/licenses/qpl.html
61 */
62 static gchar *valid_licenses[] = {
63 "LGPL", /* GNU Lesser General Public License */
64 "GPL", /* GNU General Public License */
65 "QPL", /* Trolltech Qt Public License */
66 "GPL/QPL", /* Combi-license of GPL + QPL */
67 GST_LICENSE_UNKNOWN, /* some other license */
68 NULL
69 };
71 static void gst_plugin_desc_copy (GstPluginDesc * dest,
72 const GstPluginDesc * src);
74 static GstPlugin *gst_plugin_register_func (GstPlugin * plugin,
75 GModule * module, GstPluginDesc * desc);
77 static GstPlugin *
78 gst_plugin_copy (GstPlugin * plugin)
79 {
80 return g_memdup (plugin, sizeof (*plugin));
81 }
83 GType
84 gst_plugin_get_type (void)
85 {
86 static GType plugin_type;
88 if (plugin_type == 0) {
89 plugin_type = g_boxed_type_register_static ("GstPlugin",
90 (GBoxedCopyFunc) gst_plugin_copy, g_free);
91 }
93 return plugin_type;
94 }
96 GQuark
97 gst_plugin_error_quark (void)
98 {
99 static GQuark quark = 0;
101 if (!quark)
102 quark = g_quark_from_static_string ("gst_plugin_error");
103 return quark;
104 }
106 /* this function can be called in the GCC constructor extension, before
107 * the _gst_plugin_initialize() was called. In that case, we store the
108 * plugin description in a list to initialize it when we open the main
109 * module later on.
110 * When the main module is known, we can register the plugin right away.
111 * */
112 void
113 _gst_plugin_register_static (GstPluginDesc * desc)
114 {
115 if (main_module == NULL) {
116 if (GST_CAT_DEFAULT)
117 GST_LOG ("queueing static plugin \"%s\" for loading later on",
118 desc->name);
119 _gst_plugin_static = g_list_prepend (_gst_plugin_static, desc);
120 } else {
121 GstPlugin *plugin;
123 if (GST_CAT_DEFAULT)
124 GST_LOG ("attempting to load static plugin \"%s\" now...", desc->name);
125 plugin = g_new0 (GstPlugin, 1);
126 if (gst_plugin_register_func (plugin, main_module, desc)) {
127 if (GST_CAT_DEFAULT)
128 GST_INFO ("loaded static plugin \"%s\"", desc->name);
129 gst_registry_pool_add_plugin (plugin);
130 }
131 }
132 }
134 void
135 _gst_plugin_initialize (void)
136 {
137 main_module = g_module_open (NULL, G_MODULE_BIND_LAZY);
139 /* now register all static plugins */
140 g_list_foreach (_gst_plugin_static, (GFunc) _gst_plugin_register_static,
141 NULL);
142 }
144 /* this function could be extended to check if the plugin license matches the
145 * applications license (would require the app to register its license somehow).
146 * We'll wait for someone who's interested in it to code it :)
147 */
148 static gboolean
149 gst_plugin_check_license (const gchar * license)
150 {
151 gchar **check_license = valid_licenses;
153 g_assert (check_license);
155 while (*check_license) {
156 if (strcmp (license, *check_license) == 0)
157 return TRUE;
158 check_license++;
159 }
160 return FALSE;
161 }
163 static gboolean
164 gst_plugin_check_version (gint major, gint minor)
165 {
166 /* return NULL if the major and minor version numbers are not compatible */
167 /* with ours. */
168 if (major != GST_VERSION_MAJOR || minor != GST_VERSION_MINOR)
169 return FALSE;
171 return TRUE;
172 }
174 static GstPlugin *
175 gst_plugin_register_func (GstPlugin * plugin, GModule * module,
176 GstPluginDesc * desc)
177 {
178 g_assert (plugin->module == NULL);
180 if (!gst_plugin_check_version (desc->major_version, desc->minor_version)) {
181 if (GST_CAT_DEFAULT)
182 GST_INFO ("plugin \"%s\" has incompatible version, not loading",
183 plugin->filename);
184 return FALSE;
185 }
187 if (!desc->license || !desc->description || !desc->package || !desc->origin) {
188 if (GST_CAT_DEFAULT)
189 GST_INFO ("plugin \"%s\" has incorrect GstPluginDesc, not loading",
190 plugin->filename);
191 return FALSE;
192 }
194 if (!gst_plugin_check_license (desc->license)) {
195 if (GST_CAT_DEFAULT)
196 GST_INFO ("plugin \"%s\" has invalid license \"%s\", not loading",
197 plugin->filename, desc->license);
198 return FALSE;
199 }
201 gst_plugin_desc_copy (&plugin->desc, desc);
202 plugin->module = module;
204 if (!((desc->plugin_init) (plugin))) {
205 if (GST_CAT_DEFAULT)
206 GST_INFO ("plugin \"%s\" failed to initialise", plugin->filename);
207 plugin->module = NULL;
208 return FALSE;
209 }
211 if (GST_CAT_DEFAULT)
212 GST_LOG ("plugin \"%s\" initialised", GST_STR_NULL (plugin->filename));
214 return plugin;
215 }
217 /*
218 * _gst_plugin_fault_handler_restore:
219 * segfault handler restorer
220 */
221 static void
222 _gst_plugin_fault_handler_restore (void)
223 {
224 struct sigaction action;
226 memset (&action, 0, sizeof (action));
227 action.sa_handler = SIG_DFL;
229 sigaction (SIGSEGV, &action, NULL);
230 }
232 /*
233 * _gst_plugin_fault_handler_sighandler:
234 * segfault handler implementation
235 */
236 static void
237 _gst_plugin_fault_handler_sighandler (int signum)
238 {
239 /* We need to restore the fault handler or we'll keep getting it */
240 _gst_plugin_fault_handler_restore ();
242 switch (signum) {
243 case SIGSEGV:
244 g_print ("\nERROR: ");
245 g_print ("Caught a segmentation fault while loading plugin file:\n");
246 g_print ("%s\n\n", _gst_plugin_fault_handler_filename);
247 g_print ("Please either:\n");
248 g_print ("- remove it and restart.\n");
249 g_print ("- run with --gst-disable-segtrap and debug.\n");
250 exit (-1);
251 break;
252 default:
253 g_print ("Caught unhandled signal on plugin loading\n");
254 break;
255 }
256 }
258 /*
259 * _gst_plugin_fault_handler_setup:
260 * sets up the segfault handler
261 */
262 static void
263 _gst_plugin_fault_handler_setup (void)
264 {
265 struct sigaction action;
267 /* if asked to leave segfaults alone, just return */
268 if (_gst_disable_segtrap)
269 return;
271 if (_gst_plugin_fault_handler_is_setup)
272 return;
274 memset (&action, 0, sizeof (action));
275 action.sa_handler = _gst_plugin_fault_handler_sighandler;
277 sigaction (SIGSEGV, &action, NULL);
278 }
280 static void _gst_plugin_fault_handler_setup ();
282 /**
283 * gst_plugin_load_file:
284 * @plugin: The plugin to load
285 * @error: Pointer to a NULL-valued GError.
286 *
287 * Load the given plugin.
288 *
289 * Returns: a new GstPlugin or NULL, if an error occurred.
290 */
291 GstPlugin *
292 gst_plugin_load_file (const gchar * filename, GError ** error)
293 {
294 GstPlugin *plugin;
295 GModule *module;
296 GstPluginDesc *desc;
297 struct stat file_status;
298 gboolean free_plugin;
300 g_return_val_if_fail (filename != NULL, NULL);
302 GST_CAT_DEBUG (GST_CAT_PLUGIN_LOADING, "attempt to load plugin \"%s\"",
303 filename);
305 if (g_module_supported () == FALSE) {
306 g_set_error (error,
307 GST_PLUGIN_ERROR,
308 GST_PLUGIN_ERROR_MODULE, "Dynamic loading not supported");
309 return NULL;
310 }
312 if (stat (filename, &file_status)) {
313 g_set_error (error,
314 GST_PLUGIN_ERROR,
315 GST_PLUGIN_ERROR_MODULE, "Problem opening file %s\n", filename);
316 return NULL;
317 }
319 module = g_module_open (filename, G_MODULE_BIND_LAZY);
321 if (module != NULL) {
322 gpointer ptr;
324 if (g_module_symbol (module, "gst_plugin_desc", &ptr)) {
325 desc = (GstPluginDesc *) ptr;
327 plugin = gst_registry_pool_find_plugin (desc->name);
328 if (!plugin) {
329 free_plugin = TRUE;
330 plugin = g_new0 (GstPlugin, 1);
331 plugin->filename = g_strdup (filename);
332 GST_DEBUG ("created new GstPlugin %p for file \"%s\"", plugin,
333 filename);
334 } else {
335 free_plugin = FALSE;
336 if (gst_plugin_is_loaded (plugin)) {
337 if (strcmp (plugin->filename, filename) != 0) {
338 GST_WARNING
339 ("plugin %p from file \"%s\" with same name %s is already "
340 "loaded, aborting loading of \"%s\"", plugin, plugin->filename,
341 plugin->desc.name, filename);
342 g_set_error (error, GST_PLUGIN_ERROR,
343 GST_PLUGIN_ERROR_NAME_MISMATCH,
344 "already a plugin with name \"%s\" loaded", desc->name);
345 if (free_plugin)
346 g_free (plugin);
347 return NULL;
348 }
349 GST_LOG ("Plugin %p for file \"%s\" already loaded, returning it now",
350 plugin, filename);
351 return plugin;
352 }
353 }
354 GST_LOG ("Plugin %p for file \"%s\" prepared, calling entry function...",
355 plugin, filename);
357 if (g_module_symbol (module, "plugin_init", &ptr)) {
358 g_print
359 ("plugin %p from file \"%s\" exports a symbol named plugin_init\n",
360 plugin, plugin->filename);
361 g_set_error (error, GST_PLUGIN_ERROR, GST_PLUGIN_ERROR_NAME_MISMATCH,
362 "plugin \"%s\" exports a symbol named plugin_init", desc->name);
363 }
365 /* this is where we load the actual .so, so let's trap SIGSEGV */
366 _gst_plugin_fault_handler_setup ();
367 _gst_plugin_fault_handler_filename = plugin->filename;
369 if (gst_plugin_register_func (plugin, module, desc)) {
370 /* remove signal handler */
371 _gst_plugin_fault_handler_restore ();
372 _gst_plugin_fault_handler_filename = NULL;
373 GST_INFO ("plugin \"%s\" loaded", plugin->filename);
374 return plugin;
375 } else {
376 /* remove signal handler */
377 _gst_plugin_fault_handler_restore ();
378 GST_DEBUG ("gst_plugin_register_func failed for plugin \"%s\"",
379 filename);
380 /* plugin == NULL */
381 g_set_error (error,
382 GST_PLUGIN_ERROR,
383 GST_PLUGIN_ERROR_MODULE,
384 "gst_plugin_register_func failed for plugin \"%s\"", filename);
385 if (free_plugin)
386 g_free (plugin);
387 return NULL;
388 }
389 } else {
390 GST_DEBUG ("Could not find plugin entry point in \"%s\"", filename);
391 g_set_error (error,
392 GST_PLUGIN_ERROR,
393 GST_PLUGIN_ERROR_MODULE,
394 "Could not find plugin entry point in \"%s\"", filename);
395 }
396 return NULL;
397 } else {
398 GST_DEBUG ("Error loading plugin %s, reason: %s\n", filename,
399 g_module_error ());
400 g_set_error (error, GST_PLUGIN_ERROR, GST_PLUGIN_ERROR_MODULE,
401 "Error loading plugin %s, reason: %s\n", filename, g_module_error ());
402 return NULL;
403 }
404 }
406 static void
407 gst_plugin_desc_copy (GstPluginDesc * dest, const GstPluginDesc * src)
408 {
409 dest->major_version = src->major_version;
410 dest->minor_version = src->minor_version;
411 g_free (dest->name);
412 dest->name = g_strdup (src->name);
413 g_free (dest->description);
414 dest->description = g_strdup (src->description);
415 dest->plugin_init = src->plugin_init;
416 dest->plugin_exit = src->plugin_exit;
417 g_free (dest->version);
418 dest->version = g_strdup (src->version);
419 g_free (dest->license);
420 dest->license = g_strdup (src->license);
421 g_free (dest->package);
422 dest->package = g_strdup (src->package);
423 g_free (dest->origin);
424 dest->origin = g_strdup (src->origin);
425 }
427 #if 0
428 /* unused */
429 static void
430 gst_plugin_desc_free (GstPluginDesc * desc)
431 {
432 g_free (desc->name);
433 g_free (desc->description);
434 g_free (desc->version);
435 g_free (desc->license);
436 g_free (desc->package);
437 g_free (desc->origin);
439 memset (desc, 0, sizeof (GstPluginDesc));
440 }
441 #endif
442 /**
443 * gst_plugin_unload_plugin:
444 * @plugin: The plugin to unload
445 *
446 * Unload the given plugin.
447 *
448 * Returns: whether or not the plugin unloaded
449 */
450 gboolean
451 gst_plugin_unload_plugin (GstPlugin * plugin)
452 {
453 g_return_val_if_fail (plugin != NULL, FALSE);
455 if (!plugin->module)
456 return TRUE;
458 if (g_module_close (plugin->module)) {
459 plugin->module = NULL;
460 GST_CAT_INFO (GST_CAT_PLUGIN_LOADING, "plugin \"%s\" unloaded",
461 plugin->filename);
462 return TRUE;
463 } else {
464 GST_CAT_INFO (GST_CAT_PLUGIN_LOADING, "failed to unload plugin \"%s\"",
465 plugin->filename);
466 return FALSE;
467 }
468 }
470 /**
471 * gst_plugin_get_name:
472 * @plugin: plugin to get the name of
473 *
474 * Get the short name of the plugin
475 *
476 * Returns: the name of the plugin
477 */
478 const gchar *
479 gst_plugin_get_name (GstPlugin * plugin)
480 {
481 g_return_val_if_fail (plugin != NULL, NULL);
483 return plugin->desc.name;
484 }
486 /**
487 * gst_plugin_get_description:
488 * @plugin: plugin to get long name of
489 *
490 * Get the long descriptive name of the plugin
491 *
492 * Returns: the long name of the plugin
493 */
494 G_CONST_RETURN gchar *
495 gst_plugin_get_description (GstPlugin * plugin)
496 {
497 g_return_val_if_fail (plugin != NULL, NULL);
499 return plugin->desc.description;
500 }
502 /**
503 * gst_plugin_get_filename:
504 * @plugin: plugin to get the filename of
505 *
506 * get the filename of the plugin
507 *
508 * Returns: the filename of the plugin
509 */
510 G_CONST_RETURN gchar *
511 gst_plugin_get_filename (GstPlugin * plugin)
512 {
513 g_return_val_if_fail (plugin != NULL, NULL);
515 return plugin->filename;
516 }
518 /**
519 * gst_plugin_get_license:
520 * @plugin: plugin to get the license of
521 *
522 * get the license of the plugin
523 *
524 * Returns: the license of the plugin
525 */
526 G_CONST_RETURN gchar *
527 gst_plugin_get_license (GstPlugin * plugin)
528 {
529 g_return_val_if_fail (plugin != NULL, NULL);
531 return plugin->desc.license;
532 }
534 /**
535 * gst_plugin_get_package:
536 * @plugin: plugin to get the package of
537 *
538 * get the package the plugin belongs to.
539 *
540 * Returns: the package of the plugin
541 */
542 G_CONST_RETURN gchar *
543 gst_plugin_get_package (GstPlugin * plugin)
544 {
545 g_return_val_if_fail (plugin != NULL, NULL);
547 return plugin->desc.package;
548 }
550 /**
551 * gst_plugin_get_origin:
552 * @plugin: plugin to get the origin of
553 *
554 * get the URL where the plugin comes from
555 *
556 * Returns: the origin of the plugin
557 */
558 G_CONST_RETURN gchar *
559 gst_plugin_get_origin (GstPlugin * plugin)
560 {
561 g_return_val_if_fail (plugin != NULL, NULL);
563 return plugin->desc.origin;
564 }
566 /**
567 * gst_plugin_get_module:
568 * @plugin: plugin to query
569 *
570 * Gets the #GModule of the plugin. If the plugin isn't loaded yet, NULL is
571 * returned.
572 *
573 * Returns: module belonging to the plugin or NULL if the plugin isn't
574 * loaded yet.
575 */
576 GModule *
577 gst_plugin_get_module (GstPlugin * plugin)
578 {
579 g_return_val_if_fail (plugin != NULL, FALSE);
581 return plugin->module;
582 }
584 /**
585 * gst_plugin_is_loaded:
586 * @plugin: plugin to query
587 *
588 * queries if the plugin is loaded into memory
589 *
590 * Returns: TRUE is loaded, FALSE otherwise
591 */
592 gboolean
593 gst_plugin_is_loaded (GstPlugin * plugin)
594 {
595 g_return_val_if_fail (plugin != NULL, FALSE);
597 return (plugin->module != NULL);
598 }
600 /**
601 * gst_plugin_feature_list:
602 * @plugin: plugin to query
603 * @filter: the filter to use
604 * @first: only return first match
605 * @user_data: user data passed to the filter function
606 *
607 * Runs a filter against all plugin features and returns a GList with
608 * the results. If the first flag is set, only the first match is
609 * returned (as a list with a single object).
610 *
611 * Returns: a GList of features, g_list_free after use.
612 */
613 GList *
614 gst_plugin_feature_filter (GstPlugin * plugin,
615 GstPluginFeatureFilter filter, gboolean first, gpointer user_data)
616 {
617 return gst_filter_run (plugin->features, (GstFilterFunc) filter, first,
618 user_data);
619 }
621 typedef struct
622 {
623 GstPluginFeatureFilter filter;
624 gboolean first;
625 gpointer user_data;
626 GList *result;
627 } FeatureFilterData;
629 static gboolean
630 _feature_filter (GstPlugin * plugin, gpointer user_data)
631 {
632 GList *result;
633 FeatureFilterData *data = (FeatureFilterData *) user_data;
635 result =
636 gst_plugin_feature_filter (plugin, data->filter, data->first,
637 data->user_data);
638 if (result) {
639 data->result = g_list_concat (data->result, result);
640 return TRUE;
641 }
642 return FALSE;
643 }
645 /**
646 * gst_plugin_list_feature_list:
647 * @list: a list of plugins to query
648 * @filter: the filter to use
649 * @first: only return first match
650 * @user_data: user data passed to the filter function
651 *
652 * Runs a filter against all plugin features of the plugins in the given
653 * list and returns a GList with the results.
654 * If the first flag is set, only the first match is
655 * returned (as a list with a single object).
656 *
657 * Returns: a GList of features, g_list_free after use.
658 */
659 GList *
660 gst_plugin_list_feature_filter (GList * list,
661 GstPluginFeatureFilter filter, gboolean first, gpointer user_data)
662 {
663 FeatureFilterData data;
664 GList *result;
666 data.filter = filter;
667 data.first = first;
668 data.user_data = user_data;
669 data.result = NULL;
671 result = gst_filter_run (list, (GstFilterFunc) _feature_filter, first, &data);
672 g_list_free (result);
674 return data.result;
675 }
677 /**
678 * gst_plugin_name_filter:
679 * @plugin: the plugin to check
680 * @name: the name of the plugin
681 *
682 * A standard filter that returns TRUE when the plugin is of the
683 * given name.
684 *
685 * Returns: TRUE if the plugin is of the given name.
686 */
687 gboolean
688 gst_plugin_name_filter (GstPlugin * plugin, const gchar * name)
689 {
690 return (plugin->desc.name && !strcmp (plugin->desc.name, name));
691 }
693 /**
694 * gst_plugin_find_feature:
695 * @plugin: plugin to get the feature from
696 * @name: The name of the feature to find
697 * @type: The type of the feature to find
698 *
699 * Find a feature of the given name and type in the given plugin.
700 *
701 * Returns: a GstPluginFeature or NULL if the feature was not found.
702 */
703 GstPluginFeature *
704 gst_plugin_find_feature (GstPlugin * plugin, const gchar * name, GType type)
705 {
706 GList *walk;
707 GstPluginFeature *result = NULL;
708 GstTypeNameData data;
710 g_return_val_if_fail (name != NULL, NULL);
712 data.type = type;
713 data.name = name;
715 walk = gst_filter_run (plugin->features,
716 (GstFilterFunc) gst_plugin_feature_type_name_filter, TRUE, &data);
718 if (walk)
719 result = GST_PLUGIN_FEATURE (walk->data);
721 return result;
722 }
724 /**
725 * gst_plugin_add_feature:
726 * @plugin: plugin to add feature to
727 * @feature: feature to add
728 *
729 * Add feature to the list of those provided by the plugin.
730 * There is a separate namespace for each plugin feature type.
731 * See #gst_plugin_get_feature_list
732 */
733 void
734 gst_plugin_add_feature (GstPlugin * plugin, GstPluginFeature * feature)
735 {
736 GstPluginFeature *oldfeature;
738 g_return_if_fail (plugin != NULL);
739 g_return_if_fail (GST_IS_PLUGIN_FEATURE (feature));
740 g_return_if_fail (feature != NULL);
742 oldfeature = gst_plugin_find_feature (plugin,
743 GST_PLUGIN_FEATURE_NAME (feature), G_OBJECT_TYPE (feature));
745 if (!oldfeature) {
746 feature->manager = plugin;
747 plugin->features = g_list_prepend (plugin->features, feature);
748 plugin->numfeatures++;
749 }
750 }
752 /**
753 * gst_plugin_get_feature_list:
754 * @plugin: the plugin to get the features from
755 *
756 * get a list of all the features that this plugin provides
757 *
758 * Returns: a GList of features, use g_list_free to free the list.
759 */
760 GList *
761 gst_plugin_get_feature_list (GstPlugin * plugin)
762 {
763 g_return_val_if_fail (plugin != NULL, NULL);
765 return g_list_copy (plugin->features);
766 }
768 /**
769 * gst_plugin_load:
770 * @name: name of plugin to load
771 *
772 * Load the named plugin.
773 *
774 * Returns: whether the plugin was loaded or not
775 */
776 gboolean
777 gst_plugin_load (const gchar * name)
778 {
779 GstPlugin *plugin;
780 GError *error = NULL;
782 plugin = gst_registry_pool_find_plugin (name);
783 if (plugin) {
784 gst_plugin_load_file (plugin->filename, &error);
785 if (error) {
786 GST_WARNING ("load_plugin error: %s\n", error->message);
787 g_error_free (error);
788 return FALSE;
789 }
790 return TRUE;;
791 }
793 GST_DEBUG ("Could not find %s in registry pool", name);
794 return FALSE;
795 }
797 /**
798 * gst_library_load:
799 * @name: name of library to load
800 *
801 * Load the named library. Name should be given as
802 * "liblibrary.so".
803 *
804 * Returns: whether the library was loaded or not
805 */
806 gboolean
807 gst_library_load (const gchar * name)
808 {
809 gboolean res;
811 /* for now this is the same */
812 res = gst_plugin_load (name);
814 return res;
815 }