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