tools/gst-typefind.c: Update, add copyright block.
[platform/upstream/gstreamer.git] / docs / gst / tmpl / gstplugin.sgml
1 <!-- ##### SECTION Title ##### -->
2 GstPlugin
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Container for features loaded from a shared object module
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 GStreamer is extensible, so <classname>GstElements</classname> can be loaded at runtime.
10 A plugin system can provide one or more of the basic <application>GStreamer</application>
11 #GstPluginFeature subclasses.
12 </para>
13 <para>
14 A plugin should export a symbol <symbol>plugin_desc</symbol> that is a struct of type #GstPluginDesc.
15 the plugin loader will check the version of the core library the plugin was linked against
16 and will create a new #GstPlugin. It will then call the #GstPluginInitFunc function
17 that was provided in the plugin_desc.
18 </para>
19 <para>
20 Once you have a handle to a #GstPlugin (e.g. from the #GstRegistryPool), you can
21 add any object that subclasses #GstPluginFeature.
22 </para>
23 <para>
24 Use gst_plugin_find_feature() and gst_plugin_get_feature_list() to find features in a plugin.
25 </para>
26 <para>
27 Usually plugins are always automaticlly loaded so you don't need to call gst_plugin_load() explicitly 
28 to bring it into memory. There are options to statically link plugins to an app or even
29 use GStreamer without a plugin repository in which case gst_plugin_load() can be needed 
30 to bring the plugin into memory.
31 </para>
32
33 <!-- ##### SECTION See_Also ##### -->
34 <para>
35 #GstPluginFeature, #GstType, #GstAutoplug, #GstElementFactory
36 </para>
37
38 <!-- ##### SECTION Stability_Level ##### -->
39
40
41 <!-- ##### FUNCTION gst_plugin_error_quark ##### -->
42 <para>
43 Get the error quark
44 </para>
45
46 @Returns: The error quark used in GError messages
47
48
49 <!-- ##### MACRO GST_PLUGIN_ERROR ##### -->
50 <para>
51 The error quark
52 </para>
53
54
55
56 <!-- ##### ENUM GstPluginError ##### -->
57 <para>
58 The plugin loading errors
59 </para>
60
61 @GST_PLUGIN_ERROR_MODULE: The plugin could not be loaded
62 @GST_PLUGIN_ERROR_DEPENDENCIES: The plugin has unresolved dependencies
63 @GST_PLUGIN_ERROR_NAME_MISMATCH: The plugin has already be loaded from a different file
64
65 <!-- ##### STRUCT GstPlugin ##### -->
66 <para>
67 The plugin object
68 </para>
69
70 @desc: 
71 @filename: 
72 @features: 
73 @numfeatures: 
74 @manager: 
75 @module: 
76 @_gst_reserved: 
77
78 <!-- ##### STRUCT GstPluginDesc ##### -->
79 <para>
80 A plugins should export a variable of this type called plugin_desc. This plugin
81 loaded will use this variable to initialize the plugin.
82 </para>
83
84 @major_version: the major version number of core that plugin was compiled for
85 @minor_version: the minor version number of core that plugin was compiled for
86 @name: a unique name of the plugin
87 @description: 
88 @plugin_init: The init function of this plugin.
89 @plugin_exit: 
90 @version: version of the plugin
91 @license: effective license of plugin
92 @package: package plugin belongs to
93 @origin: URL to provider of plugin
94 @_gst_reserved: 
95
96 <!-- ##### USER_FUNCTION GstPluginInitFunc ##### -->
97 <para>
98 A plugin should provide a pointer to a function of this type in the plugin_desc struct.
99 It will be called by the loader at statup.
100 </para>
101
102 @plugin: The plugin object that can be used to register stuff for this plugin.
103 @Returns: A boolean indicating success or failure.
104 <!-- # Unused Parameters # -->
105 @module: The <classname>GModule</classname> it was loaded from
106
107
108 <!-- ##### USER_FUNCTION GstPluginExitFunc ##### -->
109 <para>
110 Exiting function when plugin is unloaded.
111 </para>
112
113 @plugin: The plugin object that can be used to unregister stuff for this plugin.
114
115
116 <!-- ##### MACRO GST_PLUGIN_DEFINE ##### -->
117 <para>
118 This macro needs to be used to define the entry point and meta data of a plugin.
119 One would use this macro to export a plugin, so that it can be used by other applications
120 </para>
121
122 @major: major version number of the gstreamer-core that plugin was compiled for
123 @minor: minor version number of the gstreamer-core that plugin was compiled for
124 @name: short, but unique name of the plugin
125 @description: information about the purpose of the plugin
126 @init: function pointer to the plugin_init method with the signature of <code>static gboolean plugin_init (GstPlugin * plugin)</code>.
127 @version: full version string (e.g. VERSION from config.h)
128 @license: under which licence the package has been released, e.g. GPL, LGPL.
129 @package: the package-name (e.g. PACKAGE_NAME from config.h)
130 @origin: a description from where the package comes from (e.g. the homepage URL)
131
132
133 <!-- ##### MACRO GST_PLUGIN_DEFINE_STATIC ##### -->
134 <para>
135 This macro needs to be used to define the entry point and meta data of a local plugin.
136 One would use this macro to define a local plugin that can only be used by the own application.
137 </para>
138
139 @major: major version number of the gstreamer-core that plugin was compiled for
140 @minor: minor version number of the gstreamer-core that plugin was compiled for
141 @name: short, but unique name of the plugin
142 @description: information about the purpose of the plugin
143 @init: function pointer to the plugin_init method with the signature of <code>static gboolean plugin_init (GstPlugin * plugin)</code>.
144 @version: full version string (e.g. VERSION from config.h)
145 @license: under which licence the package has been released, e.g. GPL, LGPL.
146 @package: the package-name (e.g. PACKAGE_NAME from config.h)
147 @origin: a description from where the package comes from (e.g. the homepage URL)
148
149
150 <!-- ##### MACRO GST_LICENSE_UNKNOWN ##### -->
151 <para>
152
153 </para>
154
155
156
157 <!-- ##### USER_FUNCTION GstPluginFilter ##### -->
158 <para>
159 A function that can be used with e.g. gst_registry_plugin_filter()
160 to get a list of plugins that match certain criteria.
161 </para>
162
163 @plugin: the plugin to check
164 @user_data: the user_data that has been passed on e.g. gst_registry_plugin_filter()
165 @Returns: TRUE for a positive match, FALSE otherwise
166
167
168 <!-- ##### FUNCTION gst_plugin_get_name ##### -->
169 <para>
170
171 </para>
172
173 @plugin: 
174 @Returns: 
175
176
177 <!-- ##### FUNCTION gst_plugin_get_description ##### -->
178 <para>
179
180 </para>
181
182 @plugin: 
183 @Returns: 
184
185
186 <!-- ##### FUNCTION gst_plugin_get_filename ##### -->
187 <para>
188
189 </para>
190
191 @plugin: 
192 @Returns: 
193
194
195 <!-- ##### FUNCTION gst_plugin_get_license ##### -->
196 <para>
197
198 </para>
199
200 @plugin: 
201 @Returns: 
202
203
204 <!-- ##### FUNCTION gst_plugin_get_package ##### -->
205 <para>
206
207 </para>
208
209 @plugin: 
210 @Returns: 
211
212
213 <!-- ##### FUNCTION gst_plugin_get_origin ##### -->
214 <para>
215
216 </para>
217
218 @plugin: 
219 @Returns: 
220
221
222 <!-- ##### FUNCTION gst_plugin_get_module ##### -->
223 <para>
224
225 </para>
226
227 @plugin: 
228 @Returns: 
229
230
231 <!-- ##### FUNCTION gst_plugin_get_version ##### -->
232 <para>
233
234 </para>
235
236 @plugin: 
237 @Returns: 
238
239
240 <!-- ##### FUNCTION gst_plugin_is_loaded ##### -->
241 <para>
242
243 </para>
244
245 @plugin: 
246 @Returns: 
247
248
249 <!-- ##### FUNCTION gst_plugin_feature_filter ##### -->
250 <para>
251
252 </para>
253
254 @plugin: 
255 @filter: 
256 @first: 
257 @user_data: 
258 @Returns: 
259
260
261 <!-- ##### FUNCTION gst_plugin_list_feature_filter ##### -->
262 <para>
263
264 </para>
265
266 @list: 
267 @filter: 
268 @first: 
269 @user_data: 
270 @Returns: 
271
272
273 <!-- ##### FUNCTION gst_plugin_name_filter ##### -->
274 <para>
275
276 </para>
277
278 @plugin: 
279 @name: 
280 @Returns: 
281
282
283 <!-- ##### FUNCTION gst_plugin_get_feature_list ##### -->
284 <para>
285
286 </para>
287
288 @plugin: 
289 @Returns: 
290
291
292 <!-- ##### FUNCTION gst_plugin_find_feature ##### -->
293 <para>
294
295 </para>
296
297 @plugin: 
298 @name: 
299 @type: 
300 @Returns: 
301
302
303 <!-- ##### FUNCTION gst_plugin_check_file ##### -->
304 <para>
305
306 </para>
307
308 @filename: 
309 @error: 
310 @Returns: 
311
312
313 <!-- ##### FUNCTION gst_plugin_load_file ##### -->
314 <para>
315
316 </para>
317
318 @filename: 
319 @error: 
320 @Returns: 
321
322
323 <!-- ##### FUNCTION gst_plugin_unload_plugin ##### -->
324 <para>
325
326 </para>
327
328 @plugin: 
329 @Returns: 
330
331
332 <!-- ##### FUNCTION gst_plugin_add_feature ##### -->
333 <para>
334
335 </para>
336
337 @plugin: 
338 @feature: 
339
340
341 <!-- ##### FUNCTION gst_plugin_load ##### -->
342 <para>
343
344 </para>
345
346 @name: 
347 @Returns: 
348
349