third time I try commiting this today, let's hope I watch the result this time
[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 GStreamer 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 The name of a GstElement can be get with gst_element_get_name() and set with
16 gst_element_set_name().  For speed, GST_ELEMENT_NAME() can be used in the 
17 core.
18 Do not use this in plug-ins or applications in order to retain ABI 
19 compatibility.
20 </para>
21
22 <para>
23 All elements have pads (of the type #GstPad).  These pads link to pads on
24 other elements.  Buffers flow between these linked pads.
25 A GstElement has a GList of #GstPad structures for all their input (or sink)
26 and output (or source) pads.  
27 Core and plug-in writers can add and remove pads with gst_element_add_pad()
28 and gst_element_remove_pad().
29 Application writers can manipulate ghost pads (copies of real pads inside a bin)
30 with gst_element_add_ghost_pad() and gst_element_remove_ghost_pad().
31 A pad of an element can be retrieved by name with gst_element_get_pad().
32 A GList of all pads can be retrieved with gst_element_get_pad_list().
33 </para>
34
35 <para>
36 Elements can be linked through their pads.
37 If the link is straightforward, use the gst_element_link() 
38 convenience function to link two elements, or gst_element_link_many() 
39 for more elements in a row.
40 Use gst_element_link_filtered() to link two elements constrained by
41 a specified set of #GstCaps.
42 For finer control, use gst_element_link_pads() and 
43 gst_element_link_pads_filtered() to specify the pads to link on 
44 each element by name.
45 </para>
46
47 <para>
48 Each element has a state (see #GstElementState).  You can get and set the state
49 of an element with gst_element_get_state() and gst_element_set_state().  
50 You can wait for an element to change it's state with gst_element_wait_state_change().
51 To get a string representation of a #GstElementState, use 
52 gst_element_state_get_name().
53 </para>
54
55 <para>
56 You can get and set a #GstClock on an element using gst_element_get_clock()
57 and gst_element_set_clock().  You can wait for the clock to reach a given
58 #GstClockTime using gst_element_clock_wait().
59 </para>
60
61 <!-- ##### SECTION See_Also ##### -->
62 <para>
63 #GstElementFactory, #GstPad
64 </para>
65
66 <!-- basic object functions -->
67
68 <!-- ##### STRUCT GstElement ##### -->
69 <para>
70 The element object
71 </para>
72
73
74 <!-- ##### MACRO gst_element_get_name ##### -->
75 <para>
76 Gets the name of the element.
77 </para>
78
79 @elem: 
80 @Returns: the name of the element.
81
82
83 <!-- link -->
84
85
86 <!-- ##### MACRO gst_element_set_name ##### -->
87 <para>
88 Sets the name of the element, getting rid of the old name if there was one.
89 </para>
90
91 @elem: a #GstElement to set the name of.
92 @name: the new name of the element.
93
94
95 <!-- ##### FUNCTION gst_element_get_factory ##### -->
96 <para>
97
98 </para>
99
100 @element: 
101 @Returns: 
102
103
104 <!-- ##### FUNCTION gst_element_add_pad ##### -->
105 <para>
106
107 </para>
108
109 @element: 
110 @pad: 
111
112
113 <!-- ##### FUNCTION gst_element_remove_pad ##### -->
114 <para>
115
116 </para>
117
118 @element: 
119 @pad: 
120
121
122 <!-- ##### FUNCTION gst_element_add_ghost_pad ##### -->
123 <para>
124
125 </para>
126
127 @element: 
128 @pad: 
129 @name: 
130 @Returns: 
131
132
133 <!-- ##### FUNCTION gst_element_remove_ghost_pad ##### -->
134 <para>
135
136 </para>
137
138 @element: 
139 @pad: 
140
141
142 <!-- pad template manipulation -->
143
144
145 <!-- ##### FUNCTION gst_element_get_pad ##### -->
146 <para>
147
148 </para>
149
150 @element: 
151 @name: 
152 @Returns: GList of #GstPads
153
154
155 <!-- ##### FUNCTION gst_element_get_static_pad ##### -->
156 <para>
157
158 </para>
159
160 @element: 
161 @name: 
162 @Returns: 
163
164
165 <!-- ##### FUNCTION gst_element_get_request_pad ##### -->
166 <para>
167
168 </para>
169
170 @element: 
171 @name: 
172 @Returns: 
173
174
175 <!-- ##### FUNCTION gst_element_release_request_pad ##### -->
176 <para>
177
178 </para>
179
180 @element: 
181 @pad: 
182
183
184 <!-- ##### FUNCTION gst_element_get_pad_list ##### -->
185 <para>
186
187 </para>
188
189 @element: 
190 @Returns: 
191
192
193 <!-- ##### FUNCTION gst_element_get_pad_template ##### -->
194 <para>
195
196 </para>
197
198 @element: 
199 @name: 
200 @Returns: 
201
202
203 <!-- ##### FUNCTION gst_element_get_pad_template_list ##### -->
204 <para>
205
206 </para>
207
208 @element: 
209 @Returns: 
210
211
212
213 <!-- scheduling -->
214
215
216 <!-- ##### FUNCTION gst_element_class_add_pad_template ##### -->
217 <para>
218
219 </para>
220
221 @klass: 
222 @templ: 
223
224
225 <!-- ##### FUNCTION gst_element_link ##### -->
226 <para>
227
228 </para>
229
230 @src: 
231 @dest: 
232 @Returns: 
233
234
235 <!-- ##### FUNCTION gst_element_link_many ##### -->
236 <para>
237
238 </para>
239
240 @element_1: 
241 @element_2: 
242 @Varargs: 
243 @Returns: 
244
245
246 <!-- ##### FUNCTION gst_element_link_filtered ##### -->
247 <para>
248
249 </para>
250
251 @src: 
252 @dest: 
253 @filtercaps: 
254 @Returns: 
255
256
257 <!-- ##### FUNCTION gst_element_link_pads ##### -->
258 <para>
259
260 </para>
261
262 @src: 
263 @srcpadname: 
264 @dest: 
265 @destpadname: 
266 @Returns: 
267
268
269 <!-- ##### FUNCTION gst_element_link_pads_filtered ##### -->
270 <para>
271
272 </para>
273
274 @src: 
275 @srcpadname: 
276 @dest: 
277 @destpadname: 
278 @filtercaps: 
279 @Returns: 
280
281
282 <!-- ##### FUNCTION gst_element_unlink ##### -->
283 <para>
284
285 </para>
286
287 @src: 
288 @dest: 
289
290
291 <!-- ##### FUNCTION gst_element_unlink_many ##### -->
292 <para>
293
294 </para>
295
296 @element_1: 
297 @element_2: 
298 @Varargs: 
299
300
301 <!-- ##### FUNCTION gst_element_unlink_pads ##### -->
302 <para>
303
304 </para>
305
306 @src: 
307 @srcpadname: 
308 @dest: 
309 @destpadname: 
310
311
312 <!-- pad manipulation -->
313
314
315 <!-- ##### FUNCTION gst_element_get_compatible_pad ##### -->
316 <para>
317
318 </para>
319
320 @element: 
321 @pad: 
322 @Returns: 
323
324
325 <!-- ##### FUNCTION gst_element_get_compatible_pad_filtered ##### -->
326 <para>
327
328 </para>
329
330 @element: 
331 @pad: 
332 @filtercaps: 
333 @Returns: 
334
335
336 <!-- ##### FUNCTION gst_element_get_compatible_pad_template ##### -->
337 <para>
338
339 </para>
340
341 @element: 
342 @compattempl: 
343 @Returns: 
344
345
346 <!-- ##### FUNCTION gst_element_set_state ##### -->
347 <para>
348
349 </para>
350
351 @element: 
352 @state: 
353 @Returns: 
354
355
356 <!-- ##### FUNCTION gst_element_get_state ##### -->
357 <para>
358
359 </para>
360
361 @element: 
362 @Returns: 
363
364
365 <!-- ##### FUNCTION gst_element_state_get_name ##### -->
366 <para>
367
368 </para>
369
370 @state: 
371 @Returns: 
372
373
374 <!-- ##### FUNCTION gst_element_wait_state_change ##### -->
375 <para>
376
377 </para>
378
379 @element: 
380
381
382 <!-- ##### FUNCTION gst_element_set_eos ##### -->
383 <para>
384
385 </para>
386
387 @element: 
388
389
390 <!-- ##### FUNCTION gst_element_interrupt ##### -->
391 <para>
392
393 </para>
394
395 @element: 
396 @Returns: 
397
398
399 <!-- ##### FUNCTION gst_element_yield ##### -->
400 <para>
401
402 </para>
403
404 @element: 
405
406
407 <!-- ##### FUNCTION gst_element_release_locks ##### -->
408 <para>
409
410 </para>
411
412 @element: 
413 @Returns: 
414
415
416 <!-- ##### FUNCTION gst_element_get_clock ##### -->
417 <para>
418
419 </para>
420
421 @element: 
422 @Returns: 
423
424
425 <!-- ##### FUNCTION gst_element_set_clock ##### -->
426 <para>
427
428 </para>
429
430 @element: 
431 @clock: 
432
433
434 <!-- ##### FUNCTION gst_element_clock_wait ##### -->
435 <para>
436
437 </para>
438
439 @element: 
440 @id: 
441 @jitter: 
442 @Returns: 
443 <!-- # Unused Parameters # -->
444 @clock: 
445 @time: 
446
447
448 <!-- ##### FUNCTION gst_element_provides_clock ##### -->
449 <para>
450
451 </para>
452
453 @element: 
454 @Returns: 
455
456
457 <!-- ##### FUNCTION gst_element_requires_clock ##### -->
458 <para>
459
460 </para>
461
462 @element: 
463 @Returns: 
464
465
466 <!-- ##### FUNCTION gst_element_set_index ##### -->
467 <para>
468
469 </para>
470
471 @element: 
472 @index: 
473
474
475 <!-- ##### FUNCTION gst_element_get_index ##### -->
476 <para>
477
478 </para>
479
480 @element: 
481 @Returns: 
482
483
484 <!-- ##### FUNCTION gst_element_is_indexable ##### -->
485 <para>
486
487 </para>
488
489 @element: 
490 @Returns: 
491
492
493 <!-- ##### FUNCTION gst_element_set_loop_function ##### -->
494 <para>
495
496 </para>
497
498 @element: 
499 @loop: 
500
501
502 <!-- ##### USER_FUNCTION GstElementLoopFunction ##### -->
503 <para>
504 This function type is used to specify a loop function for the element.  It
505 is passed the element in question, and is expect to return only in error
506 circumstances.
507 </para>
508
509 @element: The element in question.
510
511
512 <!-- ##### FUNCTION gst_element_get_scheduler ##### -->
513 <para>
514
515 </para>
516
517 @element: 
518 @Returns: 
519
520
521 <!-- ##### FUNCTION gst_element_set_scheduler ##### -->
522 <para>
523
524 </para>
525
526 @element: 
527 @sched: 
528
529
530 <!-- ##### MACRO gst_element_get_parent ##### -->
531 <para>
532 Gets the parent of an element.
533 </para>
534
535 @elem: a #GstElement to get the parent of.
536 @Returns: the #GstObject parent of the element.
537
538
539 <!-- ##### MACRO gst_element_set_parent ##### -->
540 <para>
541 Sets the parent of an element.
542 </para>
543
544 @elem: a #GstElement to set the parent of.
545 @parent:  the new #GstObject parent of the object.
546
547
548 <!-- ##### FUNCTION gst_element_get_managing_bin ##### -->
549 <para>
550
551 </para>
552
553 @element: 
554 @Returns: 
555
556 <!-- clocking -->
557
558
559 <!-- ##### USER_FUNCTION GstElementPostRunFunction ##### -->
560 <para>
561 The signature of the function to execute before this element
562 is scheduled.
563 </para>
564
565 @element: The element
566
567
568 <!-- ##### USER_FUNCTION GstElementPreRunFunction ##### -->
569 <para>
570 The signature of the function to execute after this element
571 is scheduled.
572 </para>
573
574 @element: The element
575
576
577 <!-- ##### FUNCTION gst_element_disable_threadsafe_properties ##### -->
578 <para>
579
580 </para>
581
582 @element: 
583
584
585 <!-- ##### FUNCTION gst_element_enable_threadsafe_properties ##### -->
586 <para>
587
588 </para>
589
590 @element: 
591
592
593 <!-- ##### FUNCTION gst_element_get ##### -->
594 <para>
595
596 </para>
597
598 @element: 
599 @first_property_name: 
600 @Varargs: 
601
602
603 <!-- ##### FUNCTION gst_element_get_property ##### -->
604 <para>
605
606 </para>
607
608 @element: 
609 @property_name: 
610 @value: 
611
612
613 <!-- ##### FUNCTION gst_element_get_valist ##### -->
614 <para>
615
616 </para>
617
618 @element: 
619 @first_property_name: 
620 @var_args: 
621
622
623 <!-- ##### FUNCTION gst_element_set ##### -->
624 <para>
625
626 </para>
627
628 @element: 
629 @first_property_name: 
630 @Varargs: 
631
632
633 <!-- ##### FUNCTION gst_element_set_pending_properties ##### -->
634 <para>
635
636 </para>
637
638 @element: 
639
640
641 <!-- ##### FUNCTION gst_element_set_property ##### -->
642 <para>
643
644 </para>
645
646 @element: 
647 @property_name: 
648 @value: 
649
650
651 <!-- ##### FUNCTION gst_element_set_valist ##### -->
652 <para>
653
654 </para>
655
656 @element: 
657 @first_property_name: 
658 @var_args: 
659
660
661 <!-- ##### FUNCTION gst_element_query ##### -->
662 <para>
663
664 </para>
665
666 @element: 
667 @type: 
668 @format: 
669 @value: 
670 @Returns: 
671
672
673 <!-- ##### FUNCTION gst_element_send_event ##### -->
674 <para>
675
676 </para>
677
678 @element: 
679 @event: 
680 @Returns: 
681
682
683 <!-- ##### FUNCTION gst_element_get_event_masks ##### -->
684 <para>
685
686 </para>
687
688 @element: 
689 @Returns: 
690
691
692 <!-- ##### FUNCTION gst_element_get_formats ##### -->
693 <para>
694
695 </para>
696
697 @element: 
698 @Returns: 
699
700
701 <!-- ##### FUNCTION gst_element_get_query_types ##### -->
702 <para>
703
704 </para>
705
706 @element: 
707 @Returns: 
708
709
710 <!-- ##### FUNCTION gst_element_convert ##### -->
711 <para>
712
713 </para>
714
715 @element: 
716 @src_format: 
717 @src_value: 
718 @dest_format: 
719 @dest_value: 
720 @Returns: 
721
722
723 <!-- ##### MACRO gst_element_default_deep_notify ##### -->
724 <para>
725 The default deep notify handler that prints out the property change
726 notifications to stdout.
727 </para>
728
729
730
731 <!-- ##### FUNCTION gst_element_default_error ##### -->
732 <para>
733
734 </para>
735
736 @object: 
737 @orig: 
738 @error: 
739 @debug: 
740
741
742 <!-- ##### ENUM GstElementState ##### -->
743 <para>
744 This enum defines the standard states an element may be in.  You will normally
745 use gst_element_set_state() to change the state of an element.
746
747 </para>
748
749 @GST_STATE_VOID_PENDING: 
750 @GST_STATE_NULL: Reset the state of an element.
751 @GST_STATE_READY: will make the element ready to start processing data. some
752 elements might have a non trivial way to initialize themselves.
753 @GST_STATE_PAUSED: means there really is data flowing temporary stops the data flow.
754 @GST_STATE_PLAYING: means there really is data flowing through the graph.
755
756 <!-- ##### ENUM GstElementStateReturn ##### -->
757 <para>
758 This enum defines the standard return values that an element
759 can return after a state change.
760
761 </para>
762
763 @GST_STATE_FAILURE: the element could not perform the state change
764 @GST_STATE_SUCCESS: the element successfully changed its state
765 @GST_STATE_ASYNC: the element will asynchronously change its state as soon as possible
766
767 <!-- ##### MACRO GST_NUM_STATES ##### -->
768 <para>
769 The maximun number of states.
770 </para>
771
772
773
774 <!-- ##### MACRO GST_STATE ##### -->
775 <para>
776 This macro returns the current state of the element.
777 </para>
778
779 @obj: Element to return state for.
780
781
782 <!-- ##### MACRO GST_STATE_PENDING ##### -->
783 <para>
784 This macro returns the currently pending state of the element.
785 </para>
786
787 @obj: Element to return the pending state for.
788
789
790 <!-- ##### MACRO GST_STATE_TRANSITION ##### -->
791 <para>
792 Returns the state transition this object is going through.
793 </para>
794
795 @obj: the Element to return the state transition for
796
797
798 <!-- ##### MACRO GST_STATE_NULL_TO_READY ##### -->
799 <para>
800 The Element is going from the NULL state to the READY state.
801 </para>
802
803
804
805 <!-- ##### MACRO GST_STATE_READY_TO_PAUSED ##### -->
806 <para>
807 The Element is going from the READY state to the PAUSED state.
808 </para>
809
810
811
812 <!-- ##### MACRO GST_STATE_PAUSED_TO_READY ##### -->
813 <para>
814 The Element is going from the PAUSED state to the READY state.
815 </para>
816
817
818
819 <!-- ##### MACRO GST_STATE_PLAYING_TO_PAUSED ##### -->
820 <para>
821 The Element is going from the PLAYING state to the PAUSED state.
822 </para>
823
824
825
826 <!-- ##### MACRO GST_STATE_PAUSED_TO_PLAYING ##### -->
827 <para>
828 The Element is going from the PAUSED state to the PLAYING state.
829 </para>
830
831
832
833 <!-- ##### MACRO GST_STATE_READY_TO_NULL ##### -->
834 <para>
835 The Element is going from the READY state to the NULL state.
836 </para>
837
838
839
840 <!-- ##### ENUM GstElementFlags ##### -->
841 <para>
842 This enum defines the standard flags that an element may have.
843 </para>
844
845 @GST_ELEMENT_COMPLEX: 
846 @GST_ELEMENT_DECOUPLED: 
847 @GST_ELEMENT_THREAD_SUGGESTED: 
848 @GST_ELEMENT_INFINITE_LOOP: 
849 @GST_ELEMENT_NEW_LOOPFUNC: 
850 @GST_ELEMENT_EVENT_AWARE: 
851 @GST_ELEMENT_USE_THREADSAFE_PROPERTIES: 
852 @GST_ELEMENT_SCHEDULER_PRIVATE1: 
853 @GST_ELEMENT_SCHEDULER_PRIVATE2: 
854 @GST_ELEMENT_LOCKED_STATE: 
855 @GST_ELEMENT_IN_ERROR: 
856 @GST_ELEMENT_FLAG_LAST: 
857
858 <!-- ##### MACRO GST_ELEMENT_IS_THREAD_SUGGESTED ##### -->
859 <para>
860 Queries whether the Element should be placed in a thread.
861 </para>
862
863 @obj: a #GstElement to query
864
865
866 <!-- ##### MACRO GST_ELEMENT_IS_DECOUPLED ##### -->
867 <para>
868 Queries if the Element is decoupled.
869 </para>
870
871 @obj: a #GstElement to query
872
873
874 <!-- ##### MACRO GST_ELEMENT_IS_EVENT_AWARE ##### -->
875 <para>
876 Query wether this element can handle events.
877 </para>
878
879 @obj: a #GstElement to query
880
881
882 <!-- ##### MACRO GST_ELEMENT_PARENT ##### -->
883 <para>
884 Get the parent object of this element.
885 </para>
886
887 @obj: a #GstElement to query
888
889
890 <!-- ##### MACRO GST_ELEMENT_NAME ##### -->
891 <para>
892 Gets the name of this element.  Used in the core.  Not ABI-compatible.
893 </para>
894
895 @obj: A #GstElement to query
896
897
898 <!-- ##### MACRO GST_ELEMENT_PADS ##### -->
899 <para>
900 Get the pads of this elements.
901 </para>
902
903 @obj: a #GstElement to query
904
905
906 <!-- ##### MACRO GST_ELEMENT_SCHED ##### -->
907 <para>
908 Get the scheduler of this element.
909 </para>
910
911 @obj: a #GstElement to query
912
913
914 <!-- ##### MACRO GST_ELEMENT_MANAGER ##### -->
915 <para>
916 Get the manager of this element.
917 </para>
918
919 @obj: a #GstElement to query
920
921
922 <!-- ##### MACRO GST_ELEMENT_CLOCK ##### -->
923 <para>
924 Get the clock of this element
925 </para>
926
927 @obj: a #GstElement to query
928
929
930 <!-- ##### MACRO GST_ELEMENT_EVENT_MASK_FUNCTION ##### -->
931 <para>
932 A helper macro to create a mask function
933 </para>
934
935 @functionname: the name of the mask function
936 @...: Masks
937
938
939 <!-- ##### MACRO GST_ELEMENT_FORMATS_FUNCTION ##### -->
940 <para>
941 Halper macro to create element format functions
942 </para>
943
944 @functionname: The function name
945 @...: formats
946
947
948 <!-- ##### MACRO GST_ELEMENT_QUERY_TYPE_FUNCTION ##### -->
949 <para>
950 Helper macro to create query type functions
951 </para>
952
953 @functionname: The function name
954 @...: list of query types.
955
956
957 <!-- ##### SIGNAL GstElement::eos ##### -->
958 <para>
959 Signal emited when the element goes to PAUSED due to an end-of-stream
960 condition.
961 </para>
962
963 @gstelement: the object which received the signal.
964
965 <!-- ##### SIGNAL GstElement::error ##### -->
966 <para>
967 Is triggered whenever an error occured.
968
969 </para>
970
971 @gstelement: the object which received the signal.
972 @arg1: the error message
973 @arg2: 
974 @:
975 @:
976 @:
977 @:
978 @:
979 @:
980 @:
981 @:
982 @:
983 @:
984 @:
985 @: 
986
987 <!-- ##### SIGNAL GstElement::found-tag ##### -->
988 <para>
989
990 </para>
991
992 @gstelement: the object which received the signal.
993 @arg1: 
994 @arg2: 
995
996 <!-- ##### SIGNAL GstElement::new-pad ##### -->
997 <para>
998 Is triggered whenever a new pad is added to an element.
999 </para>
1000
1001 @gstelement: the object which received the signal.
1002 @arg1: the new pad that was added
1003
1004 <!-- ##### SIGNAL GstElement::pad-removed ##### -->
1005 <para>
1006 Is triggered whenever a pad has been removed from the element.
1007 </para>
1008
1009 @gstelement: the object which received the signal.
1010 @arg1: The pad that was removed.
1011
1012 <!-- ##### SIGNAL GstElement::state-change ##### -->
1013 <para>
1014 Is triggered whenever the state of an element changes.
1015 </para>
1016
1017 @gstelement: the object which received the signal.
1018 @arg1: the new state of the object
1019 @arg2: 
1020