Tidy up of configure script.
[platform/upstream/gstreamer.git] / plugins / elements / gstelements.c
1 /* Gnome-Streamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3  *
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.
8  *
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.
13  *
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.
18  */
19
20
21 #include <gst/gst.h>
22
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>
31 #include <gstfdsrc.h>
32 #if HAVE_LIBGHTTP
33 #include <gsthttpsrc.h>
34 #endif /* HAVE_LIBGHTTP */
35 #include <gstqueue.h>
36 #include <gstsinesrc.h>
37
38
39 struct _elements_entry {
40   gchar *name;
41   GtkType (*type) (void);
42   GstElementDetails *details;
43 };
44
45 struct _elements_entry _elements[] = {
46   { "asyncdisksrc", gst_asyncdisksrc_get_type, &gst_asyncdisksrc_details },
47   { "audiosink", gst_audiosink_get_type, &gst_audiosink_details },
48   { "audiosrc", gst_audiosrc_get_type, &gst_audiosrc_details },
49   { "disksrc", gst_disksrc_get_type, &gst_disksrc_details },
50   { "identity", gst_identity_get_type, &gst_identity_details },
51   { "fakesink", gst_fakesink_get_type, &gst_fakesink_details },
52   { "fakesrc", gst_fakesrc_get_type, &gst_fakesrc_details },
53   { "fdsink", gst_fdsink_get_type, &gst_fdsink_details },
54   { "fdsrc", gst_fdsrc_get_type, &gst_fdsrc_details },
55 #if HAVE_LIBGHTTP
56   { "httpsrc", gst_httpsrc_get_type, &gst_httpsrc_details },
57 #endif /* HAVE_LIBGHTTP */
58   { "queue", gst_queue_get_type, &gst_queue_details },
59   { "sinesrc", gst_sinesrc_get_type, &gst_sinesrc_details },
60   { NULL, 0 },
61 };
62
63 GstPlugin *plugin_init(GModule *module) {
64   GstPlugin *plugin;
65   GstElementFactory *factory;
66   int i = 0;
67
68   if (gst_plugin_find("gstelements") != NULL) return NULL;
69
70   plugin = gst_plugin_new("gstelements");
71   g_return_val_if_fail(plugin != NULL,NULL);
72
73   gst_plugin_set_longname(plugin,"Standard GST Elements");
74
75   while (_elements[i].name) {
76     factory = gst_elementfactory_new(_elements[i].name,
77                                      (_elements[i].type)(),
78                                      _elements[i].details);
79     if (factory != NULL) {
80       gst_plugin_add_factory(plugin,factory);
81 //      DEBUG("added factory '%s'\n",_elements[i].name);
82     }
83     i++;
84   }
85
86   gst_info("gstelements: loaded %d standard elements\n",i);
87
88   return plugin;
89 }