fdsrc does not build currently on win32 due to socketpair
[platform/upstream/gstreamer.git] / gst / elements / gstelements.c
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wtay@chello.be>
4  *
5  * gstelements.c:
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  */
22
23
24 #ifdef HAVE_CONFIG_H
25 #  include "config.h"
26 #endif
27
28 #include <gst/gst.h>
29
30 #include "gstfakesink.h"
31 #include "gstfakesrc.h"
32 #include "gstfdsrc.h"
33 #include "gstfilesink.h"
34 #include "gstfilesrc.h"
35 #include "gstidentity.h"
36 #include "gsttee.h"
37 #include "gsttypefindelement.h"
38
39 struct _elements_entry
40 {
41   gchar *name;
42   guint rank;
43     GType (*type) (void);
44 };
45
46
47 /* this declaration is here because there's no gstcapsfilter.h */
48 extern GType gst_capsfilter_get_type (void);
49
50 static struct _elements_entry _elements[] = {
51   {"capsfilter", GST_RANK_NONE, gst_capsfilter_get_type},
52   {"fakesrc", GST_RANK_NONE, gst_fake_src_get_type},
53   {"fakesink", GST_RANK_NONE, gst_fake_sink_get_type},
54 #ifndef WIN32
55   {"fdsrc", GST_RANK_NONE, gst_fdsrc_get_type},
56 #endif
57   {"filesrc", GST_RANK_NONE, gst_file_src_get_type},
58   {"identity", GST_RANK_NONE, gst_identity_get_type},
59   {"filesink", GST_RANK_NONE, gst_file_sink_get_type},
60   {"tee", GST_RANK_NONE, gst_tee_get_type},
61   {"typefind", GST_RANK_NONE, gst_type_find_element_get_type},
62   {NULL, 0},
63 };
64
65 static gboolean
66 plugin_init (GstPlugin * plugin)
67 {
68   struct _elements_entry *my_elements = _elements;
69
70   while ((*my_elements).name) {
71     if (!gst_element_register (plugin, (*my_elements).name, (*my_elements).rank,
72             ((*my_elements).type) ()))
73       return FALSE;
74     my_elements++;
75   }
76
77   return TRUE;
78 }
79
80 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
81     GST_VERSION_MINOR,
82     "gstelements",
83     "standard GStreamer elements",
84     plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN);