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