Branch data Line data Source code
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 "gstcapsfilter.h"
31 : : #include "gstfakesink.h"
32 : : #include "gstfakesrc.h"
33 : : #include "gstfdsrc.h"
34 : : #include "gstfdsink.h"
35 : : #include "gstfilesink.h"
36 : : #include "gstfilesrc.h"
37 : : #include "gstidentity.h"
38 : : #include "gstinputselector.h"
39 : : #include "gstoutputselector.h"
40 : : #include "gstmultiqueue.h"
41 : : #include "gstqueue.h"
42 : : #include "gstqueue2.h"
43 : : #include "gsttee.h"
44 : : #include "gsttypefindelement.h"
45 : : #include "gstvalve.h"
46 : :
47 : : struct _elements_entry
48 : : {
49 : : const gchar *name;
50 : : guint rank;
51 : : GType (*type) (void);
52 : : };
53 : :
54 : :
55 : : static struct _elements_entry _elements[] = {
56 : : {"capsfilter", GST_RANK_NONE, gst_capsfilter_get_type},
57 : : {"fakesrc", GST_RANK_NONE, gst_fake_src_get_type},
58 : : {"fakesink", GST_RANK_NONE, gst_fake_sink_get_type},
59 : : #if defined(HAVE_SYS_SOCKET_H) || defined(_MSC_VER)
60 : : {"fdsrc", GST_RANK_NONE, gst_fd_src_get_type},
61 : : {"fdsink", GST_RANK_NONE, gst_fd_sink_get_type},
62 : : #endif
63 : : {"filesrc", GST_RANK_PRIMARY, gst_file_src_get_type},
64 : : {"identity", GST_RANK_NONE, gst_identity_get_type},
65 : : {"input-selector", GST_RANK_NONE, gst_input_selector_get_type},
66 : : {"output-selector", GST_RANK_NONE, gst_output_selector_get_type},
67 : : {"queue", GST_RANK_NONE, gst_queue_get_type},
68 : : {"queue2", GST_RANK_NONE, gst_queue2_get_type},
69 : : {"filesink", GST_RANK_PRIMARY, gst_file_sink_get_type},
70 : : {"tee", GST_RANK_NONE, gst_tee_get_type},
71 : : {"typefind", GST_RANK_NONE, gst_type_find_element_get_type},
72 : : {"multiqueue", GST_RANK_NONE, gst_multi_queue_get_type},
73 : : {"valve", GST_RANK_NONE, gst_valve_get_type},
74 : : {NULL, 0},
75 : : };
76 : :
77 : : static gboolean
78 : 153 : plugin_init (GstPlugin * plugin)
79 : : {
80 : 153 : struct _elements_entry *my_elements = _elements;
81 : :
82 [ + + ]: 2601 : while ((*my_elements).name) {
83 [ - + ]: 2448 : if (!gst_element_register (plugin, (*my_elements).name, (*my_elements).rank,
84 : 2448 : ((*my_elements).type) ()))
85 : 0 : return FALSE;
86 : 2448 : my_elements++;
87 : : }
88 : :
89 : 153 : return TRUE;
90 : : }
91 : :
92 : : GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
93 : : GST_VERSION_MINOR,
94 : : "coreelements",
95 : : "standard GStreamer elements",
96 : : plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
|