05b2defa61046294c8c833e85ab3e7612f78f117
[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
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_NONE_PENDING: The element is in the desired state.
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_PLAYING: means there really is data flowing through the graph.
43 @GST_STATE_PAUSED: means there really is data flowing temporary stops the data flow.
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_STATE ##### -->
57 <para>
58 This macro returns the current state of the element.
59 </para>
60
61 @obj: Element to return state for.
62
63
64 <!-- ##### MACRO GST_STATE_PENDING ##### -->
65 <para>
66 This macro returns the currently pending state of the element.
67 </para>
68
69 @obj: Element to return the pending state for.
70
71
72 <!-- ##### MACRO GST_STATE_TRANSITION ##### -->
73 <para>
74 Returns the state transition this object is going through.
75 </para>
76
77 @obj: the Element to return the state transition for
78
79
80 <!-- ##### MACRO GST_STATE_NULL_TO_READY ##### -->
81 <para>
82 The Element is going from the NULL state to the READY state.
83 </para>
84
85
86
87 <!-- ##### MACRO GST_STATE_READY_TO_PLAYING ##### -->
88 <para>
89 The Element is going from the READY state to the PLAYING state.
90 </para>
91
92
93
94 <!-- ##### MACRO GST_STATE_PLAYING_TO_PAUSED ##### -->
95 <para>
96 The Element is going from the PLAYING state to the PAUSED state.
97 </para>
98
99
100
101 <!-- ##### MACRO GST_STATE_PAUSED_TO_PLAYING ##### -->
102 <para>
103 The Element is going from the PAUSED state to the PLAYING state.
104 </para>
105
106
107
108 <!-- ##### MACRO GST_STATE_PLAYING_TO_READY ##### -->
109 <para>
110 The Element is going from the PLAYING state to the READY state.
111 </para>
112
113
114
115 <!-- ##### MACRO GST_STATE_READY_TO_NULL ##### -->
116 <para>
117 The Element is going from the READY state to the NULL state.
118 </para>
119
120
121
122 <!-- ##### ENUM GstElementFlags ##### -->
123 <para>
124 This enum defines the standard flags that an element may have.
125 </para>
126
127 @GST_ELEMENT_COMPLEX: 
128 @GST_ELEMENT_DECOUPLED: 
129 @GST_ELEMENT_THREAD_SUGGESTED: 
130 @GST_ELEMENT_NO_SEEK: 
131 @GST_ELEMENT_NEW_LOOPFUNC: 
132 @GST_ELEMENT_COTHREAD_STOPPING: 
133 @GST_ELEMENT_USE_COTHREAD: 
134 @GST_ELEMENT_EOS: 
135 @GST_ELEMENT_FLAG_LAST: 
136
137 <!-- ##### MACRO GST_ELEMENT_IS_THREAD_SUGGESTED ##### -->
138 <para>
139 Queries whether the Element should be placed in a thread.
140 </para>
141
142 @obj: The element to query
143
144
145 <!-- ##### MACRO GST_ELEMENT_IS_COTHREAD_STOPPING ##### -->
146 <para>
147 Queries whether the cothread holding this element needs to be stopped.
148 </para>
149
150 @obj: The element to query
151
152
153 <!-- ##### MACRO GST_ELEMENT_IS_EOS ##### -->
154 <para>
155 Query wether this element is in the End Of Stream state.
156 </para>
157
158 @obj: The element to query
159
160
161 <!-- ##### MACRO GST_ELEMENT_PARENT ##### -->
162 <para>
163 Get the parent object of this element.
164 </para>
165
166 @obj: The element to query
167
168
169 <!-- ##### MACRO GST_ELEMENT_NAME ##### -->
170 <para>
171 Get the name of this element.
172 </para>
173
174 @obj: The element to query
175
176
177 <!-- ##### MACRO GST_ELEMENT_PADS ##### -->
178 <para>
179 Get the pads of this elements.
180 </para>
181
182 @obj: The element to query
183
184
185 <!-- ##### STRUCT GstElement ##### -->
186 <para>
187
188 </para>
189
190
191 <!-- ##### STRUCT GstElementDetails ##### -->
192 <para>
193 This struct is used to define public information about the element.  It
194 describes the element, mostly for the benefit of editors.
195 </para>
196
197 @longname: 
198 @klass: 
199 @description: 
200 @version: 
201 @author: 
202 @copyright: 
203
204 <!-- ##### STRUCT GstElementFactory ##### -->
205 <para>
206 This factory is used when registering the element, and contains the name
207 of the element, the GtkType value for it, as well as a pointer to the
208 GstElementDetails struct for the element.
209 </para>
210
211 @name: 
212 @type: 
213 @details: 
214 @padtemplates: 
215 @numpadtemplates: 
216
217 <!-- ##### USER_FUNCTION GstElementLoopFunction ##### -->
218 <para>
219 This function type is used to specify a loop function for the element.  It
220 is passed the element in question, and is expect to return only in error
221 circumstances.
222 </para>
223
224 @element: The element in question.
225
226
227 <!-- ##### FUNCTION gst_element_new ##### -->
228 <para>
229
230 </para>
231
232 @Returns: 
233
234
235 <!-- ##### MACRO gst_element_destroy ##### -->
236 <para>
237
238 </para>
239
240 @element: the element to destroy
241
242
243 <!-- ##### FUNCTION gst_element_set_loop_function ##### -->
244 <para>
245
246 </para>
247
248 @element: 
249 @loop: 
250
251
252 <!-- ##### FUNCTION gst_element_set_name ##### -->
253 <para>
254
255 </para>
256
257 @element: 
258 @name: 
259
260
261 <!-- ##### FUNCTION gst_element_get_name ##### -->
262 <para>
263
264 </para>
265
266 @element: 
267 @Returns: 
268
269
270 <!-- ##### FUNCTION gst_element_set_manager ##### -->
271 <para>
272
273 </para>
274
275 @element: 
276 @manager: 
277
278
279 <!-- ##### FUNCTION gst_element_get_manager ##### -->
280 <para>
281
282 </para>
283
284 @element: 
285 @Returns: 
286
287
288 <!-- ##### FUNCTION gst_element_set_parent ##### -->
289 <para>
290
291 </para>
292
293 @element: 
294 @parent: 
295
296
297 <!-- ##### FUNCTION gst_element_get_parent ##### -->
298 <para>
299
300 </para>
301
302 @element: 
303 @Returns: 
304
305
306 <!-- ##### FUNCTION gst_element_add_pad ##### -->
307 <para>
308
309 </para>
310
311 @element: 
312 @pad: 
313
314
315 <!-- ##### FUNCTION gst_element_get_pad ##### -->
316 <para>
317
318 </para>
319
320 @element: 
321 @name: 
322 @Returns: GList of pads
323
324
325 <!-- ##### FUNCTION gst_element_get_pad_list ##### -->
326 <para>
327
328 </para>
329
330 @element: 
331 @Returns: 
332
333
334 <!-- ##### FUNCTION gst_element_get_padtemplate_list ##### -->
335 <para>
336
337 </para>
338
339 @element: 
340 @Returns: 
341
342
343 <!-- ##### FUNCTION gst_element_get_padtemplate_by_name ##### -->
344 <para>
345
346 </para>
347
348 @element: 
349 @name: 
350 @Returns: 
351
352
353 <!-- ##### FUNCTION gst_element_add_ghost_pad ##### -->
354 <para>
355
356 </para>
357
358 @element: 
359 @pad: 
360 @name: 
361
362
363 <!-- ##### FUNCTION gst_element_remove_ghost_pad ##### -->
364 <para>
365
366 </para>
367
368 @element: 
369 @pad: 
370
371
372 <!-- ##### FUNCTION gst_element_request_compatible_pad ##### -->
373 <para>
374
375 </para>
376
377 @element: 
378 @templ: 
379 @Returns: 
380
381
382 <!-- ##### FUNCTION gst_element_request_pad_by_name ##### -->
383 <para>
384
385 </para>
386
387 @element: 
388 @name: 
389 @Returns: 
390
391
392 <!-- ##### FUNCTION gst_element_connect ##### -->
393 <para>
394
395 </para>
396
397 @src: 
398 @srcpadname: 
399 @dest: 
400 @destpadname: 
401
402
403 <!-- ##### FUNCTION gst_element_disconnect ##### -->
404 <para>
405
406 </para>
407
408 @src: 
409 @srcpadname: 
410 @dest: 
411 @destpadname: 
412
413
414 <!-- ##### FUNCTION gst_element_set_state ##### -->
415 <para>
416
417 </para>
418
419 @element: 
420 @state: 
421 @Returns: 
422
423
424 <!-- ##### FUNCTION gst_element_error ##### -->
425 <para>
426
427 </para>
428
429 @element: 
430 @error: 
431
432
433 <!-- ##### FUNCTION gst_element_get_factory ##### -->
434 <para>
435
436 </para>
437
438 @element: 
439 @Returns: 
440
441
442 <!-- ##### FUNCTION gst_element_signal_eos ##### -->
443 <para>
444
445 </para>
446
447 @element: 
448
449
450 <!-- ##### FUNCTION gst_element_load_thyself ##### -->
451 <para>
452
453 </para>
454
455 @self: 
456 @parent: 
457 @Returns: 
458 <!-- # Unused Parameters # -->
459 @elements: 
460
461
462 <!-- ##### FUNCTION gst_elementfactory_new ##### -->
463 <para>
464
465 </para>
466
467 @name: 
468 @type: 
469 @details: 
470 @Returns: 
471
472
473 <!-- ##### FUNCTION gst_elementfactory_destroy ##### -->
474 <para>
475
476 </para>
477
478 @elementfactory: 
479
480
481 <!-- ##### FUNCTION gst_elementfactory_add_padtemplate ##### -->
482 <para>
483
484 </para>
485
486 @elementfactory: 
487 @templ: 
488 <!-- # Unused Parameters # -->
489 @temp: 
490 @pad: 
491
492
493 <!-- ##### FUNCTION gst_elementfactory_find ##### -->
494 <para>
495
496 </para>
497
498 @name: 
499 @Returns: 
500
501
502 <!-- ##### FUNCTION gst_elementfactory_get_list ##### -->
503 <para>
504
505 </para>
506
507 @Returns: 
508
509
510 <!-- ##### FUNCTION gst_elementfactory_can_src_caps ##### -->
511 <para>
512
513 </para>
514
515 @factory: 
516 @caps: 
517 @Returns: 
518
519
520 <!-- ##### FUNCTION gst_elementfactory_can_sink_caps ##### -->
521 <para>
522
523 </para>
524
525 @factory: 
526 @caps: 
527 @Returns: 
528
529
530 <!-- ##### FUNCTION gst_elementfactory_create ##### -->
531 <para>
532
533 </para>
534
535 @factory: 
536 @name: 
537 @Returns: 
538
539
540 <!-- ##### FUNCTION gst_elementfactory_make ##### -->
541 <para>
542
543 </para>
544
545 @factoryname: 
546 @name: 
547 @Returns: 
548
549
550 <!-- ##### FUNCTION gst_elementfactory_save_thyself ##### -->
551 <para>
552
553 </para>
554
555 @factory: 
556 @parent: 
557 @Returns: 
558
559
560 <!-- ##### FUNCTION gst_elementfactory_load_thyself ##### -->
561 <para>
562
563 </para>
564
565 @parent: 
566 @Returns: 
567
568
569 <!-- ##### SIGNAL GstElement::state-change ##### -->
570 <para>
571 Is trigered whenever the state of an element changes
572 </para>
573
574 @gstelement: the object which received the signal.
575 @arg1: the new state of the object
576
577 <!-- ##### SIGNAL GstElement::new-pad ##### -->
578 <para>
579 Is trigered whenever a new pad is added to an element
580 </para>
581
582 @gstelement: the object which received the signal.
583 @arg1: the new pad that was added
584
585 <!-- ##### SIGNAL GstElement::new-ghost-pad ##### -->
586 <para>
587
588 Is trigered whenever a new ghost pad is added to an element
589 </para>
590
591 @gstelement: the object which received the signal.
592 @arg1: the new ghost pad that was added
593
594 <!-- ##### SIGNAL GstElement::error ##### -->
595 <para>
596 Is trigered whenever an error occured
597
598 </para>
599
600 @gstelement: the object which received the signal.
601 @arg1: the error message
602
603 <!-- ##### SIGNAL GstElement::eos ##### -->
604 <para>
605
606 </para>
607
608 @gstelement: the object which received the signal.
609