typefind: Only push a CAPS event downstream if the sinkpad is not in PULL mode
[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., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22
23
24 #ifdef HAVE_CONFIG_H
25 #  include "config.h"
26 #endif
27
28 #include <gst/gst.h>
29
30 #include "gstcapsfilter.h"
31 #include "gstconcat.h"
32 #include "gstdownloadbuffer.h"
33 #include "gstfakesink.h"
34 #include "gstfakesrc.h"
35 #include "gstfdsrc.h"
36 #include "gstfdsink.h"
37 #include "gstfilesink.h"
38 #include "gstfilesrc.h"
39 #include "gstfunnel.h"
40 #include "gstidentity.h"
41 #include "gstinputselector.h"
42 #include "gstoutputselector.h"
43 #include "gstmultiqueue.h"
44 #include "gstqueue.h"
45 #include "gstqueue2.h"
46 #include "gsttee.h"
47 #include "gsttypefindelement.h"
48 #include "gstvalve.h"
49 #include "gststreamiddemux.h"
50
51 static gboolean
52 plugin_init (GstPlugin * plugin)
53 {
54   if (!gst_element_register (plugin, "capsfilter", GST_RANK_NONE,
55           gst_capsfilter_get_type ()))
56     return FALSE;
57   if (!gst_element_register (plugin, "concat", GST_RANK_NONE,
58           gst_concat_get_type ()))
59     return FALSE;
60   if (!gst_element_register (plugin, "downloadbuffer", GST_RANK_NONE,
61           gst_download_buffer_get_type ()))
62     return FALSE;
63   if (!gst_element_register (plugin, "fakesrc", GST_RANK_NONE,
64           gst_fake_src_get_type ()))
65     return FALSE;
66   if (!gst_element_register (plugin, "fakesink", GST_RANK_NONE,
67           gst_fake_sink_get_type ()))
68     return FALSE;
69 #if defined(HAVE_SYS_SOCKET_H) || defined(_MSC_VER)
70   if (!gst_element_register (plugin, "fdsrc", GST_RANK_NONE,
71           gst_fd_src_get_type ()))
72     return FALSE;
73   if (!gst_element_register (plugin, "fdsink", GST_RANK_NONE,
74           gst_fd_sink_get_type ()))
75     return FALSE;
76 #endif
77   if (!gst_element_register (plugin, "filesrc", GST_RANK_PRIMARY,
78           gst_file_src_get_type ()))
79     return FALSE;
80   if (!gst_element_register (plugin, "funnel", GST_RANK_NONE,
81           gst_funnel_get_type ()))
82     return FALSE;
83   if (!gst_element_register (plugin, "identity", GST_RANK_NONE,
84           gst_identity_get_type ()))
85     return FALSE;
86   if (!gst_element_register (plugin, "input-selector", GST_RANK_NONE,
87           gst_input_selector_get_type ()))
88     return FALSE;
89   if (!gst_element_register (plugin, "output-selector", GST_RANK_NONE,
90           gst_output_selector_get_type ()))
91     return FALSE;
92   if (!gst_element_register (plugin, "queue", GST_RANK_NONE,
93           gst_queue_get_type ()))
94     return FALSE;
95   if (!gst_element_register (plugin, "queue2", GST_RANK_NONE,
96           gst_queue2_get_type ()))
97     return FALSE;
98   if (!gst_element_register (plugin, "filesink", GST_RANK_PRIMARY,
99           gst_file_sink_get_type ()))
100     return FALSE;
101   if (!gst_element_register (plugin, "tee", GST_RANK_NONE, gst_tee_get_type ()))
102     return FALSE;
103   if (!gst_element_register (plugin, "typefind", GST_RANK_NONE,
104           gst_type_find_element_get_type ()))
105     return FALSE;
106   if (!gst_element_register (plugin, "multiqueue", GST_RANK_NONE,
107           gst_multi_queue_get_type ()))
108     return FALSE;
109   if (!gst_element_register (plugin, "valve", GST_RANK_NONE,
110           gst_valve_get_type ()))
111     return FALSE;
112
113   if (!gst_element_register (plugin, "streamiddemux", GST_RANK_PRIMARY,
114           gst_streamid_demux_get_type ()))
115     return FALSE;
116
117   return TRUE;
118 }
119
120 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, coreelements,
121     "GStreamer core elements", plugin_init, VERSION, GST_LICENSE,
122     GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);