2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
23 #include <gstasyncdisksrc.h>
24 #include <gstaudiosink.h>
25 #include <gstaudiosrc.h>
26 #include <gstdisksrc.h>
27 #include <gstidentity.h>
28 #include <gstfakesink.h>
29 #include <gstfakesrc.h>
30 #include <gstfdsink.h>
32 #include <gstpipefilter.h>
34 #include <gstsinesrc.h>
35 #include <gsttypefind.h>
38 #include <gsthttpsrc.h>
39 #endif /* HAVE_LIBGHTTP */
42 struct _elements_entry {
44 GtkType (*type) (void);
45 GstElementDetails *details;
46 gboolean (*factoryinit) (GstElementFactory *factory);
49 static struct _elements_entry _elements[] = {
50 { "fakesrc", gst_fakesrc_get_type, &gst_fakesrc_details, NULL },
51 { "fakesink", gst_fakesink_get_type, &gst_fakesink_details, NULL },
52 { "asyncdisksrc", gst_asyncdisksrc_get_type, &gst_asyncdisksrc_details, NULL },
53 { "audiosink", gst_audiosink_get_type, &gst_audiosink_details, gst_audiosink_factory_init },
54 { "audiosrc", gst_audiosrc_get_type, &gst_audiosrc_details, NULL },
55 { "disksrc", gst_disksrc_get_type, &gst_disksrc_details, NULL },
56 { "identity", gst_identity_get_type, &gst_identity_details, NULL },
57 { "fdsink", gst_fdsink_get_type, &gst_fdsink_details, NULL },
58 { "fdsrc", gst_fdsrc_get_type, &gst_fdsrc_details, NULL },
59 { "pipefilter", gst_pipefilter_get_type, &gst_pipefilter_details, NULL },
60 { "queue", gst_queue_get_type, &gst_queue_details, NULL },
61 { "sinesrc", gst_sinesrc_get_type, &gst_sinesrc_details, NULL },
62 { "typefind", gst_typefind_get_type, &gst_typefind_details, NULL },
65 { "httpsrc", gst_httpsrc_get_type, &gst_httpsrc_details, NULL },
66 #endif /* HAVE_LIBGHTTP */
71 GstPlugin *plugin_init (GModule *module)
74 GstElementFactory *factory;
77 plugin = gst_plugin_new("gstelements");
78 g_return_val_if_fail(plugin != NULL,NULL);
80 gst_plugin_set_longname (plugin, "Standard GST Elements");
82 while (_elements[i].name) {
83 factory = gst_elementfactory_new (_elements[i].name,
84 (_elements[i].type) (),
85 _elements[i].details);
86 if (factory != NULL) {
87 gst_plugin_add_factory (plugin, factory);
88 if (_elements[i].factoryinit) {
89 _elements[i].factoryinit (factory);
91 // g_print("added factory '%s'\n",_elements[i].name);
96 gst_info ("gstelements: loaded %d standard elements\n", i);