2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * 2000 Wim Taymans <wtay@chello.be>
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.
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.
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.
30 #include "gstaggregator.h"
31 #include "gstfakesink.h"
32 #include "gstfakesrc.h"
33 #include "gstfdsink.h"
35 #include "gstfilesink.h"
36 #include "gstfilesrc.h"
37 #include "gstidentity.h"
38 #include "gstmd5sink.h"
39 #include "gstmultidisksrc.h"
40 #include "gstpipefilter.h"
41 #include "gstshaper.h"
42 #include "gststatistics.h"
44 #include "gsttypefindelement.h"
47 struct _elements_entry {
50 GstElementDetails *details;
51 gboolean (*factoryinit) (GstElementFactory *factory);
55 extern GType gst_filesrc_get_type(void);
56 extern GstElementDetails gst_filesrc_details;
58 static struct _elements_entry _elements[] = {
59 { "aggregator", gst_aggregator_get_type, &gst_aggregator_details, gst_aggregator_factory_init },
60 { "fakesrc", gst_fakesrc_get_type, &gst_fakesrc_details, gst_fakesrc_factory_init },
61 { "fakesink", gst_fakesink_get_type, &gst_fakesink_details, gst_fakesink_factory_init },
62 { "fdsink", gst_fdsink_get_type, &gst_fdsink_details, NULL },
63 { "fdsrc", gst_fdsrc_get_type, &gst_fdsrc_details, NULL },
64 { "filesrc", gst_filesrc_get_type, &gst_filesrc_details, NULL },
65 { "filesink", gst_filesink_get_type, &gst_filesink_details, NULL },
66 { "identity", gst_identity_get_type, &gst_identity_details, NULL },
67 { "md5sink", gst_md5sink_get_type, &gst_md5sink_details, gst_md5sink_factory_init },
68 { "multidisksrc", gst_multidisksrc_get_type, &gst_multidisksrc_details, NULL },
69 { "pipefilter", gst_pipefilter_get_type, &gst_pipefilter_details, NULL },
70 { "shaper", gst_shaper_get_type, &gst_shaper_details, gst_shaper_factory_init },
71 { "statistics", gst_statistics_get_type, &gst_statistics_details, NULL },
72 { "tee", gst_tee_get_type, &gst_tee_details, gst_tee_factory_init },
73 { "typefind", gst_type_find_element_get_type, &gst_type_find_element_details, NULL },
78 plugin_init (GModule *module, GstPlugin *plugin)
80 GstElementFactory *factory;
83 gst_plugin_set_longname (plugin, "Standard GST Elements");
85 GST_DEBUG_CATEGORY_INIT (gst_aggregator_debug, "aggregator", 0, "aggregator element");
86 GST_DEBUG_CATEGORY_INIT (gst_fakesink_debug, "fakesink", 0, "fakesink element");
87 GST_DEBUG_CATEGORY_INIT (gst_fakesrc_debug, "fakesrc", 0, "fakesrc element");
88 GST_DEBUG_CATEGORY_INIT (gst_fdsink_debug, "fdsink", 0, "fdsink element");
89 GST_DEBUG_CATEGORY_INIT (gst_fdsrc_debug, "fdsrc", 0, "fdsrc element");
90 GST_DEBUG_CATEGORY_INIT (gst_filesink_debug, "filesink", 0, "filesink element");
91 GST_DEBUG_CATEGORY_INIT (gst_filesrc_debug, "filesrc", 0, "filesrc element");
92 GST_DEBUG_CATEGORY_INIT (gst_identity_debug, "identity", 0, "identity element");
93 GST_DEBUG_CATEGORY_INIT (gst_md5sink_debug, "md5sink", 0, "md5sink element");
94 GST_DEBUG_CATEGORY_INIT (gst_multidisksrc_debug, "multidisksrc", 0, "multidisksrc element");
95 GST_DEBUG_CATEGORY_INIT (gst_pipefilter_debug, "pipefilter", 0, "pipefilter element");
96 GST_DEBUG_CATEGORY_INIT (gst_shaper_debug, "shaper", 0, "shaper element");
97 GST_DEBUG_CATEGORY_INIT (gst_statistics_debug, "statistics", 0, "statistics element");
98 GST_DEBUG_CATEGORY_INIT (gst_tee_debug, "tee", 0, "tee element");
99 GST_DEBUG_CATEGORY_INIT (gst_type_find_element_debug, "typefind", GST_DEBUG_BG_YELLOW | GST_DEBUG_FG_GREEN, "typefind element");
101 while (_elements[i].name) {
102 factory = gst_element_factory_new (_elements[i].name,
103 (_elements[i].type) (),
104 _elements[i].details);
108 g_warning ("gst_element_factory_new failed for `%s'",
113 gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
114 if (_elements[i].factoryinit) {
115 _elements[i].factoryinit (factory);
117 /* g_print("added factory '%s'\n",_elements[i].name); */
121 /* INFO (GST_INFO_PLUGIN_LOAD,"gstelements: loaded %d standard elements", i);*/
125 GstPluginDesc plugin_desc = {