Updated the API docs
[platform/upstream/gstreamer.git] / docs / gst / tmpl / gstelement.sgml
1 <!-- ##### SECTION Title ##### -->
2 GstElement
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Base class for all pipeline elements
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 GstElement is the base class needed to construct an element that can be
10 used in a GST pipeline.  As such, it is not a functional entity, and
11 cannot do anything when placed in a pipeline.
12 </para>
13
14 <para>
15 All GstElements have a list containing the #GstPad structure for all their
16 inputs and outputs.  These can be added with gst_element_add_pad() or
17 gst_element_add_ghost_pad(), and retrieved by name with
18 gst_element_get_pad(), or in a list form by gst_element_get_pad_list().
19 </para>
20
21 <para>
22 gst_element_connect() is a convenience function provided to make it
23 simpler to connect pads of two elements together.
24 </para>
25
26 <!-- ##### SECTION See_Also ##### -->
27 <para>
28 #GstElementFactory
29 </para>
30
31 <!-- ##### ENUM GstElementState ##### -->
32 <para>
33 This enum defines the standard states an element may be in.  You will normally
34 use gst_element_set_state() to change the state of an element.
35
36 </para>
37
38 @GST_STATE_VOID_PENDING: 
39 @GST_STATE_NULL: Reset the state of an element.
40 @GST_STATE_READY: will make the element ready to start processing data. some
41 elements might have a non trivial way to initialize themselves.
42 @GST_STATE_PAUSED: means there really is data flowing temporary stops the data flow.
43 @GST_STATE_PLAYING: means there really is data flowing through the graph.
44
45 <!-- ##### ENUM GstElementStateReturn ##### -->
46 <para>
47 This enum defines the standard return values that an element
48 can return after a state change.
49
50 </para>
51
52 @GST_STATE_FAILURE: the element could not perform the state change
53 @GST_STATE_SUCCESS: the element successfully changed its state
54 @GST_STATE_ASYNC: the element will asynchronously change its state as soon as possible
55
56 <!-- ##### MACRO GST_NUM_STATES ##### -->
57 <para>
58 The maximun number of states.
59 </para>
60
61
62
63 <!-- ##### MACRO GST_STATE ##### -->
64 <para>
65 This macro returns the current state of the element.
66 </para>
67
68 @obj: Element to return state for.
69
70
71 <!-- ##### MACRO GST_STATE_PENDING ##### -->
72 <para>
73 This macro returns the currently pending state of the element.
74 </para>
75
76 @obj: Element to return the pending state for.
77
78
79 <!-- ##### MACRO GST_STATE_TRANSITION ##### -->
80 <para>
81 Returns the state transition this object is going through.
82 </para>
83
84 @obj: the Element to return the state transition for
85
86
87 <!-- ##### MACRO GST_STATE_NULL_TO_READY ##### -->
88 <para>
89 The Element is going from the NULL state to the READY state.
90 </para>
91
92
93
94 <!-- ##### MACRO GST_STATE_READY_TO_PAUSED ##### -->
95 <para>
96 The Element is going from the READY state to the PAUSED state.
97 </para>
98
99
100
101 <!-- ##### MACRO GST_STATE_PAUSED_TO_READY ##### -->
102 <para>
103 The Element is going from the PAUSED state to the READY state.
104 </para>
105
106
107
108 <!-- ##### MACRO GST_STATE_PLAYING_TO_PAUSED ##### -->
109 <para>
110 The Element is going from the PLAYING state to the PAUSED state.
111 </para>
112
113
114
115 <!-- ##### MACRO GST_STATE_PAUSED_TO_PLAYING ##### -->
116 <para>
117 The Element is going from the PAUSED state to the PLAYING state.
118 </para>
119
120
121
122 <!-- ##### MACRO GST_STATE_READY_TO_NULL ##### -->
123 <para>
124 The Element is going from the READY state to the NULL state.
125 </para>
126
127
128
129 <!-- ##### ENUM GstElementFlags ##### -->
130 <para>
131 This enum defines the standard flags that an element may have.
132 </para>
133
134 @GST_ELEMENT_COMPLEX: 
135 @GST_ELEMENT_DECOUPLED: 
136 @GST_ELEMENT_THREAD_SUGGESTED: 
137 @GST_ELEMENT_NO_SEEK: 
138 @GST_ELEMENT_NO_ENTRY: 
139 @GST_ELEMENT_NEW_LOOPFUNC: 
140 @GST_ELEMENT_COTHREAD_STOPPING: 
141 @GST_ELEMENT_USE_COTHREAD: 
142 @GST_ELEMENT_EVENT_AWARE: 
143 @GST_ELEMENT_FLAG_LAST: 
144
145 <!-- ##### MACRO GST_ELEMENT_IS_THREAD_SUGGESTED ##### -->
146 <para>
147 Queries whether the Element should be placed in a thread.
148 </para>
149
150 @obj: The element to query
151
152
153 <!-- ##### MACRO GST_ELEMENT_IS_COTHREAD_STOPPING ##### -->
154 <para>
155 Queries whether the cothread holding this element needs to be stopped.
156 </para>
157
158 @obj: The element to query
159
160
161 <!-- ##### MACRO GST_ELEMENT_IS_EOS ##### -->
162 <para>
163 Query wether this element is in the End Of Stream state.
164 </para>
165
166 @obj: The element to query
167
168
169 <!-- ##### MACRO GST_ELEMENT_IS_EVENT_AWARE ##### -->
170 <para>
171 Query wether this element can handle events.
172 </para>
173
174 @obj: The element to query
175
176
177 <!-- ##### MACRO GST_ELEMENT_PARENT ##### -->
178 <para>
179 Get the parent object of this element.
180 </para>
181
182 @obj: The element to query
183
184
185 <!-- ##### MACRO GST_ELEMENT_NAME ##### -->
186 <para>
187 Get the name of this element.
188 </para>
189
190 @obj: The element to query
191
192
193 <!-- ##### MACRO GST_ELEMENT_PADS ##### -->
194 <para>
195 Get the pads of this elements.
196 </para>
197
198 @obj: The element to query
199
200
201 <!-- ##### MACRO GST_ELEMENT_SCHED ##### -->
202 <para>
203 Get the scheduler of this element.
204 </para>
205
206 @obj: The element to query
207
208
209 <!-- ##### MACRO GST_ELEMENT_MANAGER ##### -->
210 <para>
211 Get the manager of this element.
212 </para>
213
214 @obj: The element to query
215
216
217 <!-- ##### STRUCT GstElement ##### -->
218 <para>
219
220 </para>
221
222
223 <!-- ##### USER_FUNCTION GstElementLoopFunction ##### -->
224 <para>
225 This function type is used to specify a loop function for the element.  It
226 is passed the element in question, and is expect to return only in error
227 circumstances.
228 </para>
229
230 @element: The element in question.
231
232
233 <!-- ##### FUNCTION gst_element_class_add_padtemplate ##### -->
234 <para>
235
236 </para>
237
238 @klass: 
239 @templ: 
240 <!-- # Unused Parameters # -->
241 @element: 
242
243
244 <!-- ##### MACRO gst_element_destroy ##### -->
245 <para>
246 Destroy the element. This is potentially dangerous, use gst_object_unref
247 instead.
248 </para>
249
250 @element: the element to destroy
251
252
253 <!-- ##### FUNCTION gst_element_set_loop_function ##### -->
254 <para>
255
256 </para>
257
258 @element: 
259 @loop: 
260
261
262 <!-- ##### FUNCTION gst_element_set_name ##### -->
263 <para>
264
265 </para>
266
267 @element: 
268 @name: 
269
270
271 <!-- ##### FUNCTION gst_element_get_name ##### -->
272 <para>
273
274 </para>
275
276 @element: 
277 @Returns: 
278
279
280 <!-- ##### FUNCTION gst_element_get_sched ##### -->
281 <para>
282
283 </para>
284
285 @element: 
286 @Returns: 
287
288
289 <!-- ##### FUNCTION gst_element_set_sched ##### -->
290 <para>
291
292 </para>
293
294 @element: 
295 @sched: 
296
297
298 <!-- ##### FUNCTION gst_element_set_parent ##### -->
299 <para>
300
301 </para>
302
303 @element: 
304 @parent: 
305
306
307 <!-- ##### FUNCTION gst_element_get_parent ##### -->
308 <para>
309
310 </para>
311
312 @element: 
313 @Returns: 
314
315
316 <!-- ##### FUNCTION gst_element_add_pad ##### -->
317 <para>
318
319 </para>
320
321 @element: 
322 @pad: 
323
324
325 <!-- ##### FUNCTION gst_element_remove_pad ##### -->
326 <para>
327
328 </para>
329
330 @element: 
331 @pad: 
332
333
334 <!-- ##### FUNCTION gst_element_get_pad ##### -->
335 <para>
336
337 </para>
338
339 @element: 
340 @name: 
341 @Returns: GList of pads
342
343
344 <!-- ##### FUNCTION gst_element_get_pad_list ##### -->
345 <para>
346
347 </para>
348
349 @element: 
350 @Returns: 
351
352
353 <!-- ##### FUNCTION gst_element_get_padtemplate_list ##### -->
354 <para>
355
356 </para>
357
358 @element: 
359 @Returns: 
360
361
362 <!-- ##### FUNCTION gst_element_get_padtemplate_by_name ##### -->
363 <para>
364
365 </para>
366
367 @element: 
368 @name: 
369 @Returns: 
370
371
372 <!-- ##### FUNCTION gst_element_add_ghost_pad ##### -->
373 <para>
374
375 </para>
376
377 @element: 
378 @pad: 
379 @name: 
380
381
382 <!-- ##### FUNCTION gst_element_remove_ghost_pad ##### -->
383 <para>
384
385 </para>
386
387 @element: 
388 @pad: 
389
390
391 <!-- ##### FUNCTION gst_element_request_compatible_pad ##### -->
392 <para>
393
394 </para>
395
396 @element: 
397 @templ: 
398 @Returns: 
399
400
401 <!-- ##### FUNCTION gst_element_request_pad_by_name ##### -->
402 <para>
403
404 </para>
405
406 @element: 
407 @name: 
408 @Returns: 
409
410
411 <!-- ##### FUNCTION gst_element_connect ##### -->
412 <para>
413
414 </para>
415
416 @src: 
417 @srcpadname: 
418 @dest: 
419 @destpadname: 
420
421
422 <!-- ##### FUNCTION gst_element_disconnect ##### -->
423 <para>
424
425 </para>
426
427 @src: 
428 @srcpadname: 
429 @dest: 
430 @destpadname: 
431
432
433 <!-- ##### FUNCTION gst_element_set_state ##### -->
434 <para>
435
436 </para>
437
438 @element: 
439 @state: 
440 @Returns: 
441
442
443 <!-- ##### FUNCTION gst_element_get_state ##### -->
444 <para>
445
446 </para>
447
448 @element: 
449 @Returns: 
450 <!-- # Unused Parameters # -->
451 @elem: 
452
453
454 <!-- ##### FUNCTION gst_element_wait_state_change ##### -->
455 <para>
456
457 </para>
458
459 @element: 
460
461
462 <!-- ##### FUNCTION gst_element_statename ##### -->
463 <para>
464
465 </para>
466
467 @state: 
468 @Returns: 
469
470
471 <!-- ##### FUNCTION gst_element_error ##### -->
472 <para>
473
474 </para>
475
476 @element: 
477 @error: 
478
479
480 <!-- ##### FUNCTION gst_element_get_factory ##### -->
481 <para>
482
483 </para>
484
485 @element: 
486 @Returns: 
487
488
489 <!-- ##### FUNCTION gst_element_signal_eos ##### -->
490 <para>
491
492 </para>
493
494 @element: 
495
496
497 <!-- ##### FUNCTION gst_element_restore_thyself ##### -->
498 <para>
499
500 </para>
501
502 @self: 
503 @parent: 
504 @Returns: 
505
506
507 <!-- ##### SIGNAL GstElement::state-change ##### -->
508 <para>
509 Is trigered whenever the state of an element changes
510 </para>
511
512 @gstelement: the object which received the signal.
513 @arg1: the new state of the object
514 @arg2: 
515
516 <!-- ##### SIGNAL GstElement::new-pad ##### -->
517 <para>
518 Is trigered whenever a new pad is added to an element
519 </para>
520
521 @gstelement: the object which received the signal.
522 @arg1: the new pad that was added
523
524 <!-- ##### SIGNAL GstElement::pad-removed ##### -->
525 <para>
526
527 </para>
528
529 @gstelement: the object which received the signal.
530 @arg1: The pad that was removed.
531
532 <!-- ##### SIGNAL GstElement::error ##### -->
533 <para>
534 Is trigered whenever an error occured
535
536 </para>
537
538 @gstelement: the object which received the signal.
539 @arg1: the error message
540
541 <!-- ##### SIGNAL GstElement::eos ##### -->
542 <para>
543
544 </para>
545
546 @gstelement: the object which received the signal.
547