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