fix non-validating docbook make sure validation gets checked before building
[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 <!-- ##### MACRO gst_element_error ##### -->
383 <para>
384
385 </para>
386
387 @el: 
388 @domain: 
389 @code: 
390 @message: 
391 @debug: 
392 <!-- # Unused Parameters # -->
393 @element: 
394 @error: 
395 @Varargs: 
396
397
398 <!-- ##### FUNCTION gst_element_set_eos ##### -->
399 <para>
400
401 </para>
402
403 @element: 
404
405
406 <!-- ##### FUNCTION gst_element_interrupt ##### -->
407 <para>
408
409 </para>
410
411 @element: 
412 @Returns: 
413
414
415 <!-- ##### FUNCTION gst_element_yield ##### -->
416 <para>
417
418 </para>
419
420 @element: 
421
422
423 <!-- ##### FUNCTION gst_element_release_locks ##### -->
424 <para>
425
426 </para>
427
428 @element: 
429 @Returns: 
430
431
432 <!-- ##### FUNCTION gst_element_get_clock ##### -->
433 <para>
434
435 </para>
436
437 @element: 
438 @Returns: 
439
440
441 <!-- ##### FUNCTION gst_element_set_clock ##### -->
442 <para>
443
444 </para>
445
446 @element: 
447 @clock: 
448
449
450 <!-- ##### FUNCTION gst_element_clock_wait ##### -->
451 <para>
452
453 </para>
454
455 @element: 
456 @id: 
457 @jitter: 
458 @Returns: 
459 <!-- # Unused Parameters # -->
460 @clock: 
461 @time: 
462
463
464 <!-- ##### FUNCTION gst_element_provides_clock ##### -->
465 <para>
466
467 </para>
468
469 @element: 
470 @Returns: 
471
472
473 <!-- ##### FUNCTION gst_element_requires_clock ##### -->
474 <para>
475
476 </para>
477
478 @element: 
479 @Returns: 
480
481
482 <!-- ##### FUNCTION gst_element_set_index ##### -->
483 <para>
484
485 </para>
486
487 @element: 
488 @index: 
489
490
491 <!-- ##### FUNCTION gst_element_get_index ##### -->
492 <para>
493
494 </para>
495
496 @element: 
497 @Returns: 
498
499
500 <!-- ##### FUNCTION gst_element_is_indexable ##### -->
501 <para>
502
503 </para>
504
505 @element: 
506 @Returns: 
507
508
509 <!-- ##### FUNCTION gst_element_set_loop_function ##### -->
510 <para>
511
512 </para>
513
514 @element: 
515 @loop: 
516
517
518 <!-- ##### USER_FUNCTION GstElementLoopFunction ##### -->
519 <para>
520 This function type is used to specify a loop function for the element.  It
521 is passed the element in question, and is expect to return only in error
522 circumstances.
523 </para>
524
525 @element: The element in question.
526
527
528 <!-- ##### FUNCTION gst_element_get_scheduler ##### -->
529 <para>
530
531 </para>
532
533 @element: 
534 @Returns: 
535
536
537 <!-- ##### FUNCTION gst_element_set_scheduler ##### -->
538 <para>
539
540 </para>
541
542 @element: 
543 @sched: 
544
545
546 <!-- ##### MACRO gst_element_get_parent ##### -->
547 <para>
548 Gets the parent of an element.
549 </para>
550
551 @elem: a #GstElement to get the parent of.
552 @Returns: the #GstObject parent of the element.
553
554
555 <!-- ##### MACRO gst_element_set_parent ##### -->
556 <para>
557 Sets the parent of an element.
558 </para>
559
560 @elem: a #GstElement to set the parent of.
561 @parent:  the new #GstObject parent of the object.
562
563
564 <!-- ##### FUNCTION gst_element_get_managing_bin ##### -->
565 <para>
566
567 </para>
568
569 @element: 
570 @Returns: 
571
572 <!-- clocking -->
573
574
575 <!-- ##### USER_FUNCTION GstElementPostRunFunction ##### -->
576 <para>
577 The signature of the function to execute before this element
578 is scheduled.
579 </para>
580
581 @element: The element
582
583
584 <!-- ##### USER_FUNCTION GstElementPreRunFunction ##### -->
585 <para>
586 The signature of the function to execute after this element
587 is scheduled.
588 </para>
589
590 @element: The element
591
592
593 <!-- ##### FUNCTION gst_element_disable_threadsafe_properties ##### -->
594 <para>
595
596 </para>
597
598 @element: 
599
600
601 <!-- ##### FUNCTION gst_element_enable_threadsafe_properties ##### -->
602 <para>
603
604 </para>
605
606 @element: 
607
608
609 <!-- ##### FUNCTION gst_element_get ##### -->
610 <para>
611
612 </para>
613
614 @element: 
615 @first_property_name: 
616 @Varargs: 
617
618
619 <!-- ##### FUNCTION gst_element_get_property ##### -->
620 <para>
621
622 </para>
623
624 @element: 
625 @property_name: 
626 @value: 
627
628
629 <!-- ##### FUNCTION gst_element_get_valist ##### -->
630 <para>
631
632 </para>
633
634 @element: 
635 @first_property_name: 
636 @var_args: 
637
638
639 <!-- ##### FUNCTION gst_element_set ##### -->
640 <para>
641
642 </para>
643
644 @element: 
645 @first_property_name: 
646 @Varargs: 
647
648
649 <!-- ##### FUNCTION gst_element_set_pending_properties ##### -->
650 <para>
651
652 </para>
653
654 @element: 
655
656
657 <!-- ##### FUNCTION gst_element_set_property ##### -->
658 <para>
659
660 </para>
661
662 @element: 
663 @property_name: 
664 @value: 
665
666
667 <!-- ##### FUNCTION gst_element_set_valist ##### -->
668 <para>
669
670 </para>
671
672 @element: 
673 @first_property_name: 
674 @var_args: 
675
676
677 <!-- ##### FUNCTION gst_element_query ##### -->
678 <para>
679
680 </para>
681
682 @element: 
683 @type: 
684 @format: 
685 @value: 
686 @Returns: 
687
688
689 <!-- ##### FUNCTION gst_element_send_event ##### -->
690 <para>
691
692 </para>
693
694 @element: 
695 @event: 
696 @Returns: 
697
698
699 <!-- ##### FUNCTION gst_element_get_event_masks ##### -->
700 <para>
701
702 </para>
703
704 @element: 
705 @Returns: 
706
707
708 <!-- ##### FUNCTION gst_element_get_formats ##### -->
709 <para>
710
711 </para>
712
713 @element: 
714 @Returns: 
715
716
717 <!-- ##### FUNCTION gst_element_get_query_types ##### -->
718 <para>
719
720 </para>
721
722 @element: 
723 @Returns: 
724
725
726 <!-- ##### FUNCTION gst_element_convert ##### -->
727 <para>
728
729 </para>
730
731 @element: 
732 @src_format: 
733 @src_value: 
734 @dest_format: 
735 @dest_value: 
736 @Returns: 
737
738
739 <!-- ##### MACRO gst_element_default_deep_notify ##### -->
740 <para>
741 The default deep notify handler that prints out the property change
742 notifications to stdout.
743 </para>
744
745
746
747 <!-- ##### FUNCTION gst_element_default_error ##### -->
748 <para>
749
750 </para>
751
752 @object: 
753 @orig: 
754 @error: 
755 @debug: 
756
757
758 <!-- ##### ENUM GstElementState ##### -->
759 <para>
760 This enum defines the standard states an element may be in.  You will normally
761 use gst_element_set_state() to change the state of an element.
762
763 </para>
764
765 @GST_STATE_VOID_PENDING: 
766 @GST_STATE_NULL: Reset the state of an element.
767 @GST_STATE_READY: will make the element ready to start processing data. some
768 elements might have a non trivial way to initialize themselves.
769 @GST_STATE_PAUSED: means there really is data flowing temporary stops the data flow.
770 @GST_STATE_PLAYING: means there really is data flowing through the graph.
771
772 <!-- ##### ENUM GstElementStateReturn ##### -->
773 <para>
774 This enum defines the standard return values that an element
775 can return after a state change.
776
777 </para>
778
779 @GST_STATE_FAILURE: the element could not perform the state change
780 @GST_STATE_SUCCESS: the element successfully changed its state
781 @GST_STATE_ASYNC: the element will asynchronously change its state as soon as possible
782
783 <!-- ##### MACRO GST_NUM_STATES ##### -->
784 <para>
785 The maximun number of states.
786 </para>
787
788
789
790 <!-- ##### MACRO GST_STATE ##### -->
791 <para>
792 This macro returns the current state of the element.
793 </para>
794
795 @obj: Element to return state for.
796
797
798 <!-- ##### MACRO GST_STATE_PENDING ##### -->
799 <para>
800 This macro returns the currently pending state of the element.
801 </para>
802
803 @obj: Element to return the pending state for.
804
805
806 <!-- ##### MACRO GST_STATE_TRANSITION ##### -->
807 <para>
808 Returns the state transition this object is going through.
809 </para>
810
811 @obj: the Element to return the state transition for
812
813
814 <!-- ##### MACRO GST_STATE_NULL_TO_READY ##### -->
815 <para>
816 The Element is going from the NULL state to the READY state.
817 </para>
818
819
820
821 <!-- ##### MACRO GST_STATE_READY_TO_PAUSED ##### -->
822 <para>
823 The Element is going from the READY state to the PAUSED state.
824 </para>
825
826
827
828 <!-- ##### MACRO GST_STATE_PAUSED_TO_READY ##### -->
829 <para>
830 The Element is going from the PAUSED state to the READY state.
831 </para>
832
833
834
835 <!-- ##### MACRO GST_STATE_PLAYING_TO_PAUSED ##### -->
836 <para>
837 The Element is going from the PLAYING state to the PAUSED state.
838 </para>
839
840
841
842 <!-- ##### MACRO GST_STATE_PAUSED_TO_PLAYING ##### -->
843 <para>
844 The Element is going from the PAUSED state to the PLAYING state.
845 </para>
846
847
848
849 <!-- ##### MACRO GST_STATE_READY_TO_NULL ##### -->
850 <para>
851 The Element is going from the READY state to the NULL state.
852 </para>
853
854
855
856 <!-- ##### ENUM GstElementFlags ##### -->
857 <para>
858 This enum defines the standard flags that an element may have.
859 </para>
860
861 @GST_ELEMENT_COMPLEX: 
862 @GST_ELEMENT_DECOUPLED: 
863 @GST_ELEMENT_THREAD_SUGGESTED: 
864 @GST_ELEMENT_INFINITE_LOOP: 
865 @GST_ELEMENT_NEW_LOOPFUNC: 
866 @GST_ELEMENT_EVENT_AWARE: 
867 @GST_ELEMENT_USE_THREADSAFE_PROPERTIES: 
868 @GST_ELEMENT_SCHEDULER_PRIVATE1: 
869 @GST_ELEMENT_SCHEDULER_PRIVATE2: 
870 @GST_ELEMENT_LOCKED_STATE: 
871 @GST_ELEMENT_ERROR: 
872 @GST_ELEMENT_FLAG_LAST: 
873
874 <!-- ##### MACRO GST_ELEMENT_IS_THREAD_SUGGESTED ##### -->
875 <para>
876 Queries whether the Element should be placed in a thread.
877 </para>
878
879 @obj: a #GstElement to query
880
881
882 <!-- ##### MACRO GST_ELEMENT_IS_DECOUPLED ##### -->
883 <para>
884 Queries if the Element is decoupled.
885 </para>
886
887 @obj: a #GstElement to query
888
889
890 <!-- ##### MACRO GST_ELEMENT_IS_EVENT_AWARE ##### -->
891 <para>
892 Query wether this element can handle events.
893 </para>
894
895 @obj: a #GstElement to query
896
897
898 <!-- ##### MACRO GST_ELEMENT_PARENT ##### -->
899 <para>
900 Get the parent object of this element.
901 </para>
902
903 @obj: a #GstElement to query
904
905
906 <!-- ##### MACRO GST_ELEMENT_NAME ##### -->
907 <para>
908 Gets the name of this element.  Used in the core.  Not ABI-compatible.
909 </para>
910
911 @obj: A #GstElement to query
912
913
914 <!-- ##### MACRO GST_ELEMENT_PADS ##### -->
915 <para>
916 Get the pads of this elements.
917 </para>
918
919 @obj: a #GstElement to query
920
921
922 <!-- ##### MACRO GST_ELEMENT_SCHED ##### -->
923 <para>
924 Get the scheduler of this element.
925 </para>
926
927 @obj: a #GstElement to query
928
929
930 <!-- ##### MACRO GST_ELEMENT_MANAGER ##### -->
931 <para>
932 Get the manager of this element.
933 </para>
934
935 @obj: a #GstElement to query
936
937
938 <!-- ##### MACRO GST_ELEMENT_CLOCK ##### -->
939 <para>
940 Get the clock of this element
941 </para>
942
943 @obj: a #GstElement to query
944
945
946 <!-- ##### MACRO GST_ELEMENT_EVENT_MASK_FUNCTION ##### -->
947 <para>
948 A helper macro to create a mask function
949 </para>
950
951 @functionname: the name of the mask function
952 @...: Masks
953
954
955 <!-- ##### MACRO GST_ELEMENT_FORMATS_FUNCTION ##### -->
956 <para>
957 Halper macro to create element format functions
958 </para>
959
960 @functionname: The function name
961 @...: formats
962
963
964 <!-- ##### MACRO GST_ELEMENT_QUERY_TYPE_FUNCTION ##### -->
965 <para>
966 Helper macro to create query type functions
967 </para>
968
969 @functionname: The function name
970 @...: list of query types.
971
972
973 <!-- ##### SIGNAL GstElement::eos ##### -->
974 <para>
975 Signal emited when the element goes to PAUSED due to an end-of-stream
976 condition.
977 </para>
978
979 @gstelement: the object which received the signal.
980
981 <!-- ##### SIGNAL GstElement::error ##### -->
982 <para>
983 Is triggered whenever an error occured.
984
985 </para>
986
987 @gstelement: the object which received the signal.
988 @arg1: the error message
989 @arg2: 
990 @:
991 @:
992 @:
993 @:
994 @:
995 @:
996 @:
997 @:
998 @:
999 @: 
1000
1001 <!-- ##### SIGNAL GstElement::found-tag ##### -->
1002 <para>
1003
1004 </para>
1005
1006 @gstelement: the object which received the signal.
1007 @arg1: 
1008 @arg2: 
1009
1010 <!-- ##### SIGNAL GstElement::new-pad ##### -->
1011 <para>
1012 Is triggered whenever a new pad is added to an element.
1013 </para>
1014
1015 @gstelement: the object which received the signal.
1016 @arg1: the new pad that was added
1017
1018 <!-- ##### SIGNAL GstElement::pad-removed ##### -->
1019 <para>
1020 Is triggered whenever a pad has been removed from the element.
1021 </para>
1022
1023 @gstelement: the object which received the signal.
1024 @arg1: The pad that was removed.
1025
1026 <!-- ##### SIGNAL GstElement::state-change ##### -->
1027 <para>
1028 Is triggered whenever the state of an element changes.
1029 </para>
1030
1031 @gstelement: the object which received the signal.
1032 @arg1: the new state of the object
1033 @arg2: 
1034