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 #define GST_CAT_DEFAULT GST_CAT_PLUGIN_LOADING
41 static GModule *main_module = NULL;
42 static GList *_gst_plugin_static = NULL;
44 /* static variables for segfault handling of plugin loading */
45 static char *_gst_plugin_fault_handler_filename = NULL;
46 extern gboolean *_gst_disable_segtrap; /* see gst.c */
47 static gboolean *_gst_plugin_fault_handler_is_setup = FALSE;
49 /* list of valid licenses.
50 * One of these must be specified or the plugin won't be loaded
51 * Contact gstreamer-devel@lists.sourceforge.net if your license should be
52 * added.
53 *
54 * GPL: http://www.gnu.org/copyleft/gpl.html
55 * LGPL: http://www.gnu.org/copyleft/lesser.html
56 * QPL: http://www.trolltech.com/licenses/qpl.html
57 */
58 static gchar *valid_licenses[] = {
59 "LGPL", /* GNU Lesser General Public License */
60 "GPL", /* GNU General Public License */
61 "QPL", /* Trolltech Qt Public License */
62 "GPL/QPL", /* Combi-license of GPL + QPL */
63 GST_LICENSE_UNKNOWN, /* some other license */
64 NULL
65 };
67 static void gst_plugin_desc_copy (GstPluginDesc * dest,
68 const GstPluginDesc * src);
70 static GstPlugin *gst_plugin_register_func (GstPlugin * plugin,
71 GModule * module, GstPluginDesc * desc);
73 static GstPlugin *
74 gst_plugin_copy (GstPlugin * plugin)
75 {
76 return g_memdup (plugin, sizeof (*plugin));
77 }
79 GType
80 gst_plugin_get_type (void)
81 {
82 static GType plugin_type;
84 if (plugin_type == 0) {
85 plugin_type = g_boxed_type_register_static ("GstPlugin",
86 (GBoxedCopyFunc) gst_plugin_copy, g_free);
87 }
89 return plugin_type;
90 }
92 GQuark
93 gst_plugin_error_quark (void)
94 {
95 static GQuark quark = 0;
97 if (!quark)
98 quark = g_quark_from_static_string ("gst_plugin_error");
99 return quark;
100 }
102 /* this function can be called in the GCC constructor extension, before
103 * the _gst_plugin_initialize() was called. In that case, we store the
104 * plugin description in a list to initialize it when we open the main
105 * module later on.
106 * When the main module is known, we can register the plugin right away.
107 * */
108 void
109 _gst_plugin_register_static (GstPluginDesc * desc)
110 {
111 if (main_module == NULL) {
112 if (GST_CAT_DEFAULT)
113 GST_LOG ("queueing static plugin \"%s\" for loading later on",
114 desc->name);
115 _gst_plugin_static = g_list_prepend (_gst_plugin_static, desc);
116 } else {
117 GstPlugin *plugin;
119 if (GST_CAT_DEFAULT)
120 GST_LOG ("attempting to load static plugin \"%s\" now...", desc->name);
121 plugin = g_new0 (GstPlugin, 1);
122 if (gst_plugin_register_func (plugin, main_module, desc)) {
123 if (GST_CAT_DEFAULT)
124 GST_INFO ("loaded static plugin \"%s\"", desc->name);
125 gst_registry_pool_add_plugin (plugin);
126 }
127 }
128 }
130 void
131 _gst_plugin_initialize (void)
132 {
133 main_module = g_module_open (NULL, G_MODULE_BIND_LAZY);
135 /* now register all static plugins */
136 g_list_foreach (_gst_plugin_static, (GFunc) _gst_plugin_register_static,
137 NULL);
138 }
140 /* this function could be extended to check if the plugin license matches the
141 * applications license (would require the app to register its license somehow).
142 * We'll wait for someone who's interested in it to code it :)
143 */
144 static gboolean
145 gst_plugin_check_license (const gchar * license)
146 {
147 gchar **check_license = valid_licenses;
149 g_assert (check_license);
151 while (*check_license) {
152 if (strcmp (license, *check_license) == 0)
153 return TRUE;
154 check_license++;
155 }
156 return FALSE;
157 }
159 static gboolean
160 gst_plugin_check_version (gint major, gint minor)
161 {
162 /* return NULL if the major and minor version numbers are not compatible */
163 /* with ours. */
164 if (major != GST_VERSION_MAJOR || minor != GST_VERSION_MINOR)
165 return FALSE;
167 return TRUE;
168 }
170 static GstPlugin *
171 gst_plugin_register_func (GstPlugin * plugin, GModule * module,
172 GstPluginDesc * desc)
173 {
174 g_assert (plugin->module == NULL);
176 if (!gst_plugin_check_version (desc->major_version, desc->minor_version)) {
177 if (GST_CAT_DEFAULT)
178 GST_INFO ("plugin \"%s\" has incompatible version, not loading",
179 plugin->filename);
180 return FALSE;
181 }
183 if (!desc->license || !desc->description || !desc->package || !desc->origin) {
184 if (GST_CAT_DEFAULT)
185 GST_INFO ("plugin \"%s\" has incorrect GstPluginDesc, not loading",
186 plugin->filename);
187 return FALSE;
188 }
190 if (!gst_plugin_check_license (desc->license)) {
191 if (GST_CAT_DEFAULT)
192 GST_INFO ("plugin \"%s\" has invalid license \"%s\", not loading",
193 plugin->filename, desc->license);
194 return FALSE;
195 }
197 gst_plugin_desc_copy (&plugin->desc, desc);
198 plugin->module = module;
200 if (!((desc->plugin_init) (plugin))) {
201 if (GST_CAT_DEFAULT)
202 GST_INFO ("plugin \"%s\" failed to initialise", plugin->filename);
203 plugin->module = NULL;
204 return FALSE;
205 }
207 if (GST_CAT_DEFAULT)
208 GST_LOG ("plugin \"%s\" initialised", GST_STR_NULL (plugin->filename));
210 return plugin;
211 }
213 /*
214 * _gst_plugin_fault_handler_restore:
215 * segfault handler restorer
216 */
217 static void
218 _gst_plugin_fault_handler_restore (void)
219 {
220 struct sigaction action;
222 memset (&action, 0, sizeof (action));
223 action.sa_handler = SIG_DFL;
225 sigaction (SIGSEGV, &action, NULL);
226 }
228 /*
229 * _gst_plugin_fault_handler_sighandler:
230 * segfault handler implementation
231 */
232 static void
233 _gst_plugin_fault_handler_sighandler (int signum)
234 {
235 /* We need to restore the fault handler or we'll keep getting it */
236 _gst_plugin_fault_handler_restore ();
238 switch (signum) {
239 case SIGSEGV:
240 g_print ("\nERROR: ");
241 g_print ("Caught a segmentation fault while loading plugin file:\n");
242 g_print ("%s\n\n", _gst_plugin_fault_handler_filename);
243 g_print ("Please either:\n");
244 g_print ("- remove it and restart.\n");
245 g_print ("- run with --gst-disable-segtrap and debug.\n");
246 exit (-1);
247 break;
248 default:
249 g_print ("Caught unhandled signal on plugin loading\n");
250 break;
251 }
252 }
254 /*
255 * _gst_plugin_fault_handler_setup:
256 * sets up the segfault handler
257 */
258 static void
259 _gst_plugin_fault_handler_setup (void)
260 {
261 struct sigaction action;
263 /* if asked to leave segfaults alone, just return */
264 if (_gst_disable_segtrap)
265 return;
267 if (_gst_plugin_fault_handler_is_setup)
268 return;
270 memset (&action, 0, sizeof (action));
271 action.sa_handler = _gst_plugin_fault_handler_sighandler;
273 sigaction (SIGSEGV, &action, NULL);
274 }
276 static void _gst_plugin_fault_handler_setup ();
278 /**
279 * gst_plugin_load_file:
280 * @plugin: The plugin to load
281 * @error: Pointer to a NULL-valued GError.
282 *
283 * Load the given plugin.
284 *
285 * Returns: a new GstPlugin or NULL, if an error occurred.
286 */
287 GstPlugin *
288 gst_plugin_load_file (const gchar * filename, GError ** error)
289 {
290 GstPlugin *plugin;
291 GModule *module;
292 GstPluginDesc *desc;
293 struct stat file_status;
294 gboolean free_plugin;
296 g_return_val_if_fail (filename != NULL, NULL);
298 GST_CAT_DEBUG (GST_CAT_PLUGIN_LOADING, "attempt to load plugin \"%s\"",
299 filename);
301 if (g_module_supported () == FALSE) {
302 g_set_error (error,
303 GST_PLUGIN_ERROR,
304 GST_PLUGIN_ERROR_MODULE, "Dynamic loading not supported");
305 return NULL;
306 }
308 if (stat (filename, &file_status)) {
309 g_set_error (error,
310 GST_PLUGIN_ERROR,
311 GST_PLUGIN_ERROR_MODULE, "Problem opening file %s\n", filename);
312 return NULL;
313 }
315 module = g_module_open (filename, G_MODULE_BIND_LAZY);
317 if (module != NULL) {
318 gpointer ptr;
320 if (g_module_symbol (module, "gst_plugin_desc", &ptr)) {
321 desc = (GstPluginDesc *) ptr;
323 plugin = gst_registry_pool_find_plugin (desc->name);
324 if (!plugin) {
325 free_plugin = TRUE;
326 plugin = g_new0 (GstPlugin, 1);
327 plugin->filename = g_strdup (filename);
328 GST_DEBUG ("created new GstPlugin %p for file \"%s\"", plugin,
329 filename);
330 } else {
331 free_plugin = FALSE;
332 if (gst_plugin_is_loaded (plugin)) {
333 if (strcmp (plugin->filename, filename) != 0) {
334 GST_WARNING
335 ("plugin %p from file \"%s\" with same name %s is already "
336 "loaded, aborting loading of \"%s\"", plugin, plugin->filename,
337 plugin->desc.name, filename);
338 g_set_error (error, GST_PLUGIN_ERROR,
339 GST_PLUGIN_ERROR_NAME_MISMATCH,
340 "already a plugin with name \"%s\" loaded", desc->name);
341 if (free_plugin)
342 g_free (plugin);
343 return NULL;
344 }
345 GST_LOG ("Plugin %p for file \"%s\" already loaded, returning it now",
346 plugin, filename);
347 return plugin;
348 }
349 }
350 GST_LOG ("Plugin %p for file \"%s\" prepared, calling entry function...",
351 plugin, filename);
353 if (g_module_symbol (module, "plugin_init", &ptr)) {
354 g_print
355 ("plugin %p from file \"%s\" exports a symbol named plugin_init\n",
356 plugin, plugin->filename);
357 g_set_error (error, GST_PLUGIN_ERROR, GST_PLUGIN_ERROR_NAME_MISMATCH,
358 "plugin \"%s\" exports a symbol named plugin_init", desc->name);
359 }
361 /* this is where we load the actual .so, so let's trap SIGSEGV */
362 _gst_plugin_fault_handler_setup ();
363 _gst_plugin_fault_handler_filename = plugin->filename;
365 if (gst_plugin_register_func (plugin, module, desc)) {
366 /* remove signal handler */
367 _gst_plugin_fault_handler_restore ();
368 _gst_plugin_fault_handler_filename = NULL;
369 GST_INFO ("plugin \"%s\" loaded", plugin->filename);
370 return plugin;
371 } else {
372 /* remove signal handler */
373 _gst_plugin_fault_handler_restore ();
374 GST_DEBUG ("gst_plugin_register_func failed for plugin \"%s\"",
375 filename);
376 /* plugin == NULL */
377 g_set_error (error,
378 GST_PLUGIN_ERROR,
379 GST_PLUGIN_ERROR_MODULE,
380 "gst_plugin_register_func failed for plugin \"%s\"", filename);
381 if (free_plugin)
382 g_free (plugin);
383 return NULL;
384 }
385 } else {
386 GST_DEBUG ("Could not find plugin entry point in \"%s\"", filename);
387 g_set_error (error,
388 GST_PLUGIN_ERROR,
389 GST_PLUGIN_ERROR_MODULE,
390 "Could not find plugin entry point in \"%s\"", filename);
391 }
392 return NULL;
393 } else {
394 GST_DEBUG ("Error loading plugin %s, reason: %s\n", filename,
395 g_module_error ());
396 g_set_error (error, GST_PLUGIN_ERROR, GST_PLUGIN_ERROR_MODULE,
397 "Error loading plugin %s, reason: %s\n", filename, g_module_error ());
398 return NULL;
399 }
400 }
402 static void
403 gst_plugin_desc_copy (GstPluginDesc * dest, const GstPluginDesc * src)
404 {
405 dest->major_version = src->major_version;
406 dest->minor_version = src->minor_version;
407 g_free (dest->name);
408 dest->name = g_strdup (src->name);
409 g_free (dest->description);
410 dest->description = g_strdup (src->description);
411 dest->plugin_init = src->plugin_init;
412 dest->plugin_exit = src->plugin_exit;
413 g_free (dest->version);
414 dest->version = g_strdup (src->version);
415 g_free (dest->license);
416 dest->license = g_strdup (src->license);
417 g_free (dest->package);
418 dest->package = g_strdup (src->package);
419 g_free (dest->origin);
420 dest->origin = g_strdup (src->origin);
421 }
423 #if 0
424 /* unused */
425 static void
426 gst_plugin_desc_free (GstPluginDesc * desc)
427 {
428 g_free (desc->name);
429 g_free (desc->description);
430 g_free (desc->version);
431 g_free (desc->license);
432 g_free (desc->package);
433 g_free (desc->origin);
435 memset (desc, 0, sizeof (GstPluginDesc));
436 }
437 #endif
438 /**
439 * gst_plugin_unload_plugin:
440 * @plugin: The plugin to unload
441 *
442 * Unload the given plugin.
443 *
444 * Returns: whether or not the plugin unloaded
445 */
446 gboolean
447 gst_plugin_unload_plugin (GstPlugin * plugin)
448 {
449 g_return_val_if_fail (plugin != NULL, FALSE);
451 if (!plugin->module)
452 return TRUE;
454 if (g_module_close (plugin->module)) {
455 plugin->module = NULL;
456 GST_CAT_INFO (GST_CAT_PLUGIN_LOADING, "plugin \"%s\" unloaded",
457 plugin->filename);
458 return TRUE;
459 } else {
460 GST_CAT_INFO (GST_CAT_PLUGIN_LOADING, "failed to unload plugin \"%s\"",
461 plugin->filename);
462 return FALSE;
463 }
464 }
466 /**
467 * gst_plugin_get_name:
468 * @plugin: plugin to get the name of
469 *
470 * Get the short name of the plugin
471 *
472 * Returns: the name of the plugin
473 */
474 const gchar *
475 gst_plugin_get_name (GstPlugin * plugin)
476 {
477 g_return_val_if_fail (plugin != NULL, NULL);
479 return plugin->desc.name;
480 }
482 /**
483 * gst_plugin_get_description:
484 * @plugin: plugin to get long name of
485 *
486 * Get the long descriptive name of the plugin
487 *
488 * Returns: the long name of the plugin
489 */
490 G_CONST_RETURN gchar *
491 gst_plugin_get_description (GstPlugin * plugin)
492 {
493 g_return_val_if_fail (plugin != NULL, NULL);
495 return plugin->desc.description;
496 }
498 /**
499 * gst_plugin_get_filename:
500 * @plugin: plugin to get the filename of
501 *
502 * get the filename of the plugin
503 *
504 * Returns: the filename of the plugin
505 */
506 G_CONST_RETURN gchar *
507 gst_plugin_get_filename (GstPlugin * plugin)
508 {
509 g_return_val_if_fail (plugin != NULL, NULL);
511 return plugin->filename;
512 }
514 /**
515 * gst_plugin_get_license:
516 * @plugin: plugin to get the license of
517 *
518 * get the license of the plugin
519 *
520 * Returns: the license of the plugin
521 */
522 G_CONST_RETURN gchar *
523 gst_plugin_get_license (GstPlugin * plugin)
524 {
525 g_return_val_if_fail (plugin != NULL, NULL);
527 return plugin->desc.license;
528 }
530 /**
531 * gst_plugin_get_package:
532 * @plugin: plugin to get the package of
533 *
534 * get the package the plugin belongs to.
535 *
536 * Returns: the package of the plugin
537 */
538 G_CONST_RETURN gchar *
539 gst_plugin_get_package (GstPlugin * plugin)
540 {
541 g_return_val_if_fail (plugin != NULL, NULL);
543 return plugin->desc.package;
544 }
546 /**
547 * gst_plugin_get_origin:
548 * @plugin: plugin to get the origin of
549 *
550 * get the URL where the plugin comes from
551 *
552 * Returns: the origin of the plugin
553 */
554 G_CONST_RETURN gchar *
555 gst_plugin_get_origin (GstPlugin * plugin)
556 {
557 g_return_val_if_fail (plugin != NULL, NULL);
559 return plugin->desc.origin;
560 }
562 /**
563 * gst_plugin_get_module:
564 * @plugin: plugin to query
565 *
566 * Gets the #GModule of the plugin. If the plugin isn't loaded yet, NULL is
567 * returned.
568 *
569 * Returns: module belonging to the plugin or NULL if the plugin isn't
570 * loaded yet.
571 */
572 GModule *
573 gst_plugin_get_module (GstPlugin * plugin)
574 {
575 g_return_val_if_fail (plugin != NULL, FALSE);
577 return plugin->module;
578 }
580 /**
581 * gst_plugin_is_loaded:
582 * @plugin: plugin to query
583 *
584 * queries if the plugin is loaded into memory
585 *
586 * Returns: TRUE is loaded, FALSE otherwise
587 */
588 gboolean
589 gst_plugin_is_loaded (GstPlugin * plugin)
590 {
591 g_return_val_if_fail (plugin != NULL, FALSE);
593 return (plugin->module != NULL);
594 }
596 /**
597 * gst_plugin_feature_list:
598 * @plugin: plugin to query
599 * @filter: the filter to use
600 * @first: only return first match
601 * @user_data: user data passed to the filter function
602 *
603 * Runs a filter against all plugin features and returns a GList with
604 * the results. If the first flag is set, only the first match is
605 * returned (as a list with a single object).
606 *
607 * Returns: a GList of features, g_list_free after use.
608 */
609 GList *
610 gst_plugin_feature_filter (GstPlugin * plugin,
611 GstPluginFeatureFilter filter, gboolean first, gpointer user_data)
612 {
613 return gst_filter_run (plugin->features, (GstFilterFunc) filter, first,
614 user_data);
615 }
617 typedef struct
618 {
619 GstPluginFeatureFilter filter;
620 gboolean first;
621 gpointer user_data;
622 GList *result;
623 }
624 FeatureFilterData;
626 static gboolean
627 _feature_filter (GstPlugin * plugin, gpointer user_data)
628 {
629 GList *result;
630 FeatureFilterData *data = (FeatureFilterData *) user_data;
632 result =
633 gst_plugin_feature_filter (plugin, data->filter, data->first,
634 data->user_data);
635 if (result) {
636 data->result = g_list_concat (data->result, result);
637 return TRUE;
638 }
639 return FALSE;
640 }
642 /**
643 * gst_plugin_list_feature_list:
644 * @list: a list of plugins to query
645 * @filter: the filter to use
646 * @first: only return first match
647 * @user_data: user data passed to the filter function
648 *
649 * Runs a filter against all plugin features of the plugins in the given
650 * list and returns a GList with the results.
651 * If the first flag is set, only the first match is
652 * returned (as a list with a single object).
653 *
654 * Returns: a GList of features, g_list_free after use.
655 */
656 GList *
657 gst_plugin_list_feature_filter (GList * list,
658 GstPluginFeatureFilter filter, gboolean first, gpointer user_data)
659 {
660 FeatureFilterData data;
661 GList *result;
663 data.filter = filter;
664 data.first = first;
665 data.user_data = user_data;
666 data.result = NULL;
668 result = gst_filter_run (list, (GstFilterFunc) _feature_filter, first, &data);
669 g_list_free (result);
671 return data.result;
672 }
674 /**
675 * gst_plugin_name_filter:
676 * @plugin: the plugin to check
677 * @name: the name of the plugin
678 *
679 * A standard filter that returns TRUE when the plugin is of the
680 * given name.
681 *
682 * Returns: TRUE if the plugin is of the given name.
683 */
684 gboolean
685 gst_plugin_name_filter (GstPlugin * plugin, const gchar * name)
686 {
687 return (plugin->desc.name && !strcmp (plugin->desc.name, name));
688 }
690 /**
691 * gst_plugin_find_feature:
692 * @plugin: plugin to get the feature from
693 * @name: The name of the feature to find
694 * @type: The type of the feature to find
695 *
696 * Find a feature of the given name and type in the given plugin.
697 *
698 * Returns: a GstPluginFeature or NULL if the feature was not found.
699 */
700 GstPluginFeature *
701 gst_plugin_find_feature (GstPlugin * plugin, const gchar * name, GType type)
702 {
703 GList *walk;
704 GstPluginFeature *result = NULL;
705 GstTypeNameData data;
707 g_return_val_if_fail (name != NULL, NULL);
709 data.type = type;
710 data.name = name;
712 walk = gst_filter_run (plugin->features,
713 (GstFilterFunc) gst_plugin_feature_type_name_filter, TRUE, &data);
715 if (walk)
716 result = GST_PLUGIN_FEATURE (walk->data);
718 return result;
719 }
721 /**
722 * gst_plugin_add_feature:
723 * @plugin: plugin to add feature to
724 * @feature: feature to add
725 *
726 * Add feature to the list of those provided by the plugin.
727 * There is a separate namespace for each plugin feature type.
728 * See #gst_plugin_get_feature_list
729 */
730 void
731 gst_plugin_add_feature (GstPlugin * plugin, GstPluginFeature * feature)
732 {
733 GstPluginFeature *oldfeature;
735 g_return_if_fail (plugin != NULL);
736 g_return_if_fail (GST_IS_PLUGIN_FEATURE (feature));
737 g_return_if_fail (feature != NULL);
739 oldfeature = gst_plugin_find_feature (plugin,
740 GST_PLUGIN_FEATURE_NAME (feature), G_OBJECT_TYPE (feature));
742 if (!oldfeature) {
743 feature->manager = plugin;
744 plugin->features = g_list_prepend (plugin->features, feature);
745 plugin->numfeatures++;
746 }
747 }
749 /**
750 * gst_plugin_get_feature_list:
751 * @plugin: the plugin to get the features from
752 *
753 * get a list of all the features that this plugin provides
754 *
755 * Returns: a GList of features, use g_list_free to free the list.
756 */
757 GList *
758 gst_plugin_get_feature_list (GstPlugin * plugin)
759 {
760 g_return_val_if_fail (plugin != NULL, NULL);
762 return g_list_copy (plugin->features);
763 }
765 /**
766 * gst_plugin_load:
767 * @name: name of plugin to load
768 *
769 * Load the named plugin.
770 *
771 * Returns: whether the plugin was loaded or not
772 */
773 gboolean
774 gst_plugin_load (const gchar * name)
775 {
776 GstPlugin *plugin;
777 GError *error = NULL;
779 plugin = gst_registry_pool_find_plugin (name);
780 if (plugin) {
781 gst_plugin_load_file (plugin->filename, &error);
782 if (error) {
783 GST_WARNING ("load_plugin error: %s\n", error->message);
784 g_error_free (error);
785 return FALSE;
786 }
787 return TRUE;;
788 }
790 GST_DEBUG ("Could not find %s in registry pool", name);
791 return FALSE;
792 }
794 /**
795 * gst_library_load:
796 * @name: name of library to load
797 *
798 * Load the named library. Name should be given as
799 * "liblibrary.so".
800 *
801 * Returns: whether the library was loaded or not
802 */
803 gboolean
804 gst_library_load (const gchar * name)
805 {
806 gboolean res;
808 /* for now this is the same */
809 res = gst_plugin_load (name);
811 return res;
812 }