af4bcb1f0b6aac0f1d2911024acc3c65a490148d
[platform/upstream/gstreamer.git] / plugins / 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 "gstaggregator.h"
31 #include "gstfakesink.h"
32 #include "gstfakesrc.h"
33 #include "gstfdsink.h"
34 #include "gstfdsrc.h"
35 #include "gstfilesink.h"
36 #include "gstfilesrc.h"
37 #include "gstidentity.h"
38 #include "gstmd5sink.h"
39 #include "gstmultifilesrc.h"
40 #include "gstpipefilter.h"
41 #include "gstshaper.h"
42 #include "gststatistics.h"
43 #include "gsttee.h"
44 #include "gsttypefindelement.h"
45
46 struct _elements_entry
47 {
48   gchar *name;
49   guint rank;
50     GType (*type) (void);
51 };
52
53
54 extern GType gst_filesrc_get_type (void);
55 extern GstElementDetails gst_filesrc_details;
56
57 static struct _elements_entry _elements[] = {
58   {"aggregator", GST_RANK_NONE, gst_aggregator_get_type},
59   {"fakesrc", GST_RANK_NONE, gst_fakesrc_get_type},
60   {"fakesink", GST_RANK_NONE, gst_fakesink_get_type},
61   {"fdsink", GST_RANK_NONE, gst_fdsink_get_type},
62   {"fdsrc", GST_RANK_NONE, gst_fdsrc_get_type},
63   {"filesrc", GST_RANK_NONE, gst_filesrc_get_type},
64   {"filesink", GST_RANK_NONE, gst_filesink_get_type},
65   {"identity", GST_RANK_NONE, gst_identity_get_type},
66   {"md5sink", GST_RANK_NONE, gst_md5sink_get_type},
67 #ifndef HAVE_WIN32
68   {"multifilesrc", GST_RANK_NONE, gst_multifilesrc_get_type},
69   {"pipefilter", GST_RANK_NONE, gst_pipefilter_get_type},
70 #endif
71   {"shaper", GST_RANK_NONE, gst_shaper_get_type},
72   {"statistics", GST_RANK_NONE, gst_statistics_get_type},
73   {"tee", GST_RANK_NONE, gst_tee_get_type},
74   {"typefind", GST_RANK_NONE, gst_type_find_element_get_type},
75   {NULL, 0},
76 };
77
78 static gboolean
79 plugin_init (GstPlugin * plugin)
80 {
81   struct _elements_entry *my_elements = _elements;
82
83   while ((*my_elements).name) {
84     if (!gst_element_register (plugin, (*my_elements).name, (*my_elements).rank,
85             ((*my_elements).type) ()))
86       return FALSE;
87     my_elements++;
88   }
89
90   return TRUE;
91 }
92
93 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
94     GST_VERSION_MINOR,
95     "gstelements",
96     "standard GStreamer elements",
97     plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)