2 * This file is part of GStreamerD.
4 * GStreamerD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * GStreamerD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with GStreamerD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils package
23 module gstreamerc
.gstreamertypes
;
25 public import gtkc
.glibtypes
;
26 public import gtkc
.gobjecttypes
;
27 public import gtkc
.gthreadtypes
;
30 //Hand added, these might be clean to define as GstClockTimes:
32 //#define G_USEC_PER_SEC 1000000 //This should be in glib...
33 const ulong G_USEC_PER_SEC
= 1000000uL;
34 //#define GST_SECOND (G_USEC_PER_SEC * G_GINT64_CONSTANT (1000))
35 const ulong GST_SECOND
= (G_USEC_PER_SEC
* 1000uL);
37 public alias GST_SECOND SECOND
;
39 //This one is an undefined GstClockTime. How can this be ulong???
40 //I guess it should be long...???
41 //#define GST_CLOCK_TIME_NONE ((GstClockTime) -1)
42 const long GST_CLOCK_TIME_NONE
= -1L;
43 public alias GST_CLOCK_TIME_NONE CLOCK_TIME_NONE
;
48 * typedef guint64 GstClockTime;
49 * A datatype to hold a time, measured in nanoseconds.
51 public alias ulong GstClockTime
;
54 * typedef gint64 GstClockTimeDiff;
55 * A datatype to hold a timedifference, measured in nanoseconds.
57 public alias long GstClockTimeDiff
;
60 * typedef gpointer GstClockID;
61 * A datatype to hold the handle to an outstanding sync or async clock callback.
63 public alias void* GstClockID
;
66 * typedef GstStructure GstTagList;
67 * Opaque GstTagList data structure.
69 public alias GstStructure GstTagList
;
72 * The standard flags that an gstobject may have.
73 * GST_OBJECT_DISPOSING
75 public enum GstObjectFlags
82 alias GstObjectFlags ObjectFlags
;
86 * The standard flags that an element may have.
87 * GST_ELEMENT_LOCKED_STATE
89 public enum GstElementFlags
91 LOCKED_STATE
= (GstObjectFlags
.FLAG_LAST
<< 0),
92 IS_SINK
= (GstObjectFlags
.FLAG_LAST
<< 1),
93 UNPARENTING
= (GstObjectFlags
.FLAG_LAST
<< 2),
95 FLAG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 16)
97 alias GstElementFlags ElementFlags
;
101 * GstBinFlags are a set of flags specific to bins. Most are set/used
102 * internally. They can be checked using the GST_OBJECT_FLAG_IS_SET() macro,
103 * and (un)set using GST_OBJECT_FLAG_SET() and GST_OBJECT_FLAG_UNSET().
106 public enum GstBinFlags
109 FLAG_LAST
= (GstElementFlags
.FLAG_LAST
<< 5)
111 alias GstBinFlags BinFlags
;
114 * Flags for the padtemplate
115 * GST_MINI_OBJECT_FLAG_READONLY
117 public enum GstMiniObjectFlags
123 alias GstMiniObjectFlags MiniObjectFlags
;
126 * A set of buffer flags used to describe properties of a GstBuffer.
127 * GST_BUFFER_FLAG_READONLY
129 public enum GstBufferFlag
131 FLAG_READONLY
= GstMiniObjectFlags
.READONLY
,
132 FLAG_PREROLL
= (GstObjectFlags
.FLAG_LAST
<< 0),
133 FLAG_DISCONT
= (GstObjectFlags
.FLAG_LAST
<< 1),
134 FLAG_IN_CAPS
= (GstObjectFlags
.FLAG_LAST
<< 2),
135 FLAG_GAP
= (GstObjectFlags
.FLAG_LAST
<< 3),
136 FLAG_DELTA_UNIT
= (GstObjectFlags
.FLAG_LAST
<< 4),
138 FLAG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 8)
140 alias GstBufferFlag BufferFlag
;
143 * The standard flags that a bus may have.
146 public enum GstBusFlags
148 USHING
= (GstObjectFlags
.FLAG_LAST
<< 0),
150 AG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 1)
152 alias GstBusFlags BusFlags
;
155 * The result values for a GstBusSyncHandler.
158 public enum GstBusSyncReply
164 alias GstBusSyncReply BusSyncReply
;
167 * Extra flags for a caps.
170 public enum GstCapsFlags
174 alias GstCapsFlags CapsFlags
;
177 * The type of the clock entry
178 * GST_CLOCK_ENTRY_SINGLE
180 public enum GstClockEntryType
185 alias GstClockEntryType ClockEntryType
;
188 * The return value of a clock operation.
191 public enum GstClockReturn
201 alias GstClockReturn ClockReturn
;
204 * The capabilities of this clock
205 * GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC
207 public enum GstClockFlags
209 CAN_DO_SINGLE_SYNC
= (GstObjectFlags
.FLAG_LAST
<< 0),
210 CAN_DO_SINGLE_ASYNC
= (GstObjectFlags
.FLAG_LAST
<< 1),
211 CAN_DO_PERIODIC_SYNC
= (GstObjectFlags
.FLAG_LAST
<< 2),
212 CAN_DO_PERIODIC_ASYNC
= (GstObjectFlags
.FLAG_LAST
<< 3),
213 CAN_SET_RESOLUTION
= (GstObjectFlags
.FLAG_LAST
<< 4),
214 CAN_SET_MASTER
= (GstObjectFlags
.FLAG_LAST
<< 5),
216 LAST
= (GstObjectFlags
.FLAG_LAST
<< 8),
218 alias GstClockFlags ClockFlags
;
221 * The posible states an element can be in.
222 * GST_STATE_VOID_PENDING
232 alias GstState State
;
235 * The different (interesting) state changes that are passed to the
236 * state change functions of elements.
237 * GST_STATE_CHANGE_NULL_TO_READY
239 public enum GstStateChange
241 NULL_TO_READY
= (GstState
.NULL
<<3) | GstState
.READY
,
242 READY_TO_PAUSED
= (GstState
.READY
<<3) | GstState
.PAUSED
,
243 PAUSED_TO_PLAYING
= (GstState
.PAUSED
<<3) | GstState
.PLAYING
,
244 PLAYING_TO_PAUSED
= (GstState
.PLAYING
<<3) | GstState
.PAUSED
,
245 PAUSED_TO_READY
= (GstState
.PAUSED
<<3) | GstState
.READY
,
246 READY_TO_NULL
= (GstState
.READY
<<3) | GstState
.NULL
248 alias GstStateChange StateChange
;
251 * the possible return values from a state change function.
252 * GST_STATE_CHANGE_FAILURE
254 public enum GstStateChangeReturn
261 alias GstStateChangeReturn StateChangeReturn
;
264 * GstEventTypeFlags indicate the aspects of the different GstEventType
265 * values. You can get the type flags of a GstEventType with the
266 * gst_event_type_get_flags() function.
267 * GST_EVENT_TYPE_UPSTREAM
269 public enum GstEventTypeFlags
275 alias GstEventTypeFlags EventTypeFlags
;
278 * GstEventType lists the standard event types that can be sent in a pipeline.
279 * The custom event types can be used for private messages between elements
280 * that can't be expressed using normal
281 * GStreamer buffer passing semantics. Custom events carry an arbitrary
283 * Specific custom events are distinguished by the name of the structure.
287 public enum GstEventType
290 /+* bidirectional events +/
291 FLUSH_START
= 16 | GstEventTypeFlags
.UPSTREAM | GstEventTypeFlags
.DOWNSTREAM
,
292 FLUSH_STOP
= 32 | GstEventTypeFlags
.UPSTREAM | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
293 /+* downstream serialized events +/
294 EOS
= 80 | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
295 NEWSEGMENT
= 96 | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
296 TAG
= 112 | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
297 BUFFERSIZE
= 128 | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
298 /+* upstream events +/
299 QOS
= 240 | GstEventTypeFlags
.UPSTREAM
,
300 SEEK
= 256 | GstEventTypeFlags
.UPSTREAM
,
301 NAVIGATION
= 272 | GstEventTypeFlags
.UPSTREAM
,
302 /+* custom events start here +/
303 CUSTOM_UPSTREAM
= 512 | GstEventTypeFlags
.UPSTREAM
,
304 CUSTOM_DOWNSTREAM
= 512 | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
305 CUSTOM_DOWNSTREAM_OOB
= 512 | GstEventTypeFlags
.DOWNSTREAM
,
306 CUSTOM_BOTH
= 512 | GstEventTypeFlags
.UPSTREAM | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
307 CUSTOM_BOTH_OOB
= 512 | GstEventTypeFlags
.UPSTREAM | GstEventTypeFlags
.DOWNSTREAM
309 alias GstEventType EventType
;
311 /*public enum GstEventType
313 UNKNOWN = GST_EVENT_MAKE_TYPE (0, 0),
314 /+* bidirectional events +/
315 FLUSH_START = GST_EVENT_MAKE_TYPE (1, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM),
316 FLUSH_STOP = GST_EVENT_MAKE_TYPE (2, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
317 /+* downstream serialized events +/
318 EOS = GST_EVENT_MAKE_TYPE (5, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
319 NEWSEGMENT = GST_EVENT_MAKE_TYPE (6, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
320 TAG = GST_EVENT_MAKE_TYPE (7, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
321 BUFFERSIZE = GST_EVENT_MAKE_TYPE (8, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
322 /+* upstream events +/
323 QOS = GST_EVENT_MAKE_TYPE (15, GstEventTypeFlags.UPSTREAM),
324 SEEK = GST_EVENT_MAKE_TYPE (16, GstEventTypeFlags.UPSTREAM),
325 NAVIGATION = GST_EVENT_MAKE_TYPE (17, GstEventTypeFlags.UPSTREAM),
326 /+* custom events start here +/
327 CUSTOM_UPSTREAM = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.UPSTREAM),
328 CUSTOM_DOWNSTREAM = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
329 CUSTOM_DOWNSTREAM_OOB = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.DOWNSTREAM),
330 CUSTOM_BOTH = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
331 CUSTOM_BOTH_OOB = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM)
333 alias GstEventType EventType;
337 * The different types of seek events. When constructing a seek event, a format,
338 * a seek method and optional flags are to be provided. The seek event is then
339 * inserted into the graph with gst_pad_send_event() or
340 * gst_element_send_event().
343 public enum GstSeekType
350 /*GST_SEEK_TYPE_NONE = 0,
351 GST_SEEK_TYPE_CUR = 1,
352 GST_SEEK_TYPE_SET = 2,
353 GST_SEEK_TYPE_END = 3*/
355 alias GstSeekType SeekType
;
358 * Flags to be used with gst_element_seek() or gst_event_new_seek()
359 * A non flushing seek might take some time to perform as the currently
360 * playing data in the pipeline will not be cleared.
361 * An accurate seek might be slower for formats that don't have any indexes
362 * or timestamp markers in the stream. Specifying this flag might require a
363 * complete scan of the file in those cases.
364 * When performing a segment seek: after the playback of the segment completes,
365 * no EOS will be emmited by the element that performed the seek, but a
366 * SEGMENT_DONE message will be posted on the bus by the element. When this
367 * message is posted, it is possible to send a new seek event to continue
368 * playback. With this seek method it is possible to perform seemless looping
369 * or simple linear editing.
372 public enum GstSeekFlags
380 alias GstSeekFlags SeekFlags
;
383 * Standard predefined formats
384 * GST_FORMAT_UNDEFINED
386 public enum GstFormat
388 UNDEFINED
= 0, /+* must be first inn list +/
395 alias GstFormat Format
;
398 * Core errors are errors inside the core GStreamer library.
399 * GST_CORE_ERROR_FAILED
401 public enum GstCoreError
418 alias GstCoreError CoreError
;
421 * Library errors are for errors from the library being used by elements
422 * (initializing, finalizing, settings, ...)
423 * GST_LIBRARY_ERROR_FAILED
425 public enum GstLibraryError
435 alias GstLibraryError LibraryError
;
438 * Resource errors are for any resource used by an element:
439 * memory, files, network connections, process space, ...
440 * They're typically used by source and sink elements.
441 * GST_RESOURCE_ERROR_FAILED
443 public enum GstResourceError
461 alias GstResourceError ResourceError
;
464 * Stream errors are for anything related to the stream being processed:
465 * format errors, media type errors, ...
466 * They're typically used by decoders, demuxers, converters, ...
467 * GST_STREAM_ERROR_FAILED
469 public enum GstStreamError
484 alias GstStreamError StreamError
;
487 * The certainty of a group in the index.
490 public enum GstIndexCertainty
496 alias GstIndexCertainty IndexCertainty
;
499 * The different types of entries in the index.
502 public enum GstIndexEntryType
509 alias GstIndexEntryType IndexEntryType
;
512 * Specify the method to find an index entry in the index.
513 * GST_INDEX_LOOKUP_EXACT
515 public enum GstIndexLookupMethod
521 alias GstIndexLookupMethod IndexLookupMethod
;
524 * Flags for an association entry.
525 * GST_ASSOCIATION_FLAG_NONE
527 public enum GstAssocFlags
529 IATION_FLAG_NONE
= 0,
530 IATION_FLAG_KEY_UNIT
= (1 << 0),
531 IATION_FLAG_DELTA_UNIT
= (1 << 1),
532 /+* new flags should start here +/
533 IATION_FLAG_LAST
= (1 << 8)
535 alias GstAssocFlags AssocFlags
;
538 * The method used to resolve index writers
539 * GST_INDEX_RESOLVER_CUSTOM
541 public enum GstIndexResolverMethod
547 alias GstIndexResolverMethod IndexResolverMethod
;
550 * Flags for this index
553 public enum GstIndexFlags
555 WRITABLE
= (GstObjectFlags
.FLAG_LAST
<< 0),
556 READABLE
= (GstObjectFlags
.FLAG_LAST
<< 1),
557 FLAG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 8)
559 alias GstIndexFlags IndexFlags
;
562 * The result of a GstIteratorItemFunction.
563 * GST_ITERATOR_ITEM_SKIP
565 public enum GstIteratorItem
571 alias GstIteratorItem IteratorItem
;
574 * The result of gst_iterator_next().
577 public enum GstIteratorResult
584 alias GstIteratorResult IteratorResult
;
587 * The different message types that are available.
588 * GST_MESSAGE_UNKNOWN
590 public enum GstMessageType
598 BUFFERING
= (1 << 5),
599 STATE_CHANGED
= (1 << 6),
600 STATE_DIRTY
= (1 << 7),
601 STEP_DONE
= (1 << 8),
602 CLOCK_PROVIDE
= (1 << 9),
603 CLOCK_LOST
= (1 << 10),
604 NEW_CLOCK
= (1 << 11),
605 STRUCTURE_CHANGE
= (1 << 12),
606 STREAM_STATUS
= (1 << 13),
607 APPLICATION
= (1 << 14),
609 SEGMENT_START
= (1 << 16),
610 SEGMENT_DONE
= (1 << 17),
611 DURATION
= (1 << 18),
614 alias GstMessageType MessageType
;
617 * The direction of a pad.
620 public enum GstPadDirection
626 alias GstPadDirection PadDirection
;
632 public enum GstPadFlags
634 BLOCKED
= (GstObjectFlags
.FLAG_LAST
<< 0),
635 FLUSHING
= (GstObjectFlags
.FLAG_LAST
<< 1),
636 IN_GETCAPS
= (GstObjectFlags
.FLAG_LAST
<< 2),
637 IN_SETCAPS
= (GstObjectFlags
.FLAG_LAST
<< 3),
639 FLAG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 8)
641 alias GstPadFlags PadFlags
;
644 * Result values from gst_pad_link and friends.
647 public enum GstPadLinkReturn
650 WRONG_HIERARCHY
= -1,
652 WRONG_DIRECTION
= -3,
657 alias GstPadLinkReturn PadLinkReturn
;
660 * The result of passing data to a linked pad.
663 public enum GstFlowReturn
667 /+* expected failures +/
668 GST_FLOW_NOT_LINKED
= -1,
669 GST_FLOW_WRONG_STATE
= -2,
671 GST_FLOW_UNEXPECTED
= -3,
672 GST_FLOW_NOT_NEGOTIATED
= -4,
674 GST_FLOW_NOT_SUPPORTED
= -6
676 alias GstFlowReturn FlowReturn
;
679 * The status of a GstPad. After activating a pad, which usually happens when the
680 * parent element goes from READY to PAUSED, the GstActivateMode defines if the
681 * pad operates in push or pull mode.
684 public enum GstActivateMode
690 alias GstActivateMode ActivateMode
;
693 * Flags for the padtemplate
694 * GST_PAD_TEMPLATE_FIXED
696 public enum GstPadTemplateFlags
698 IXED
= (GstObjectFlags
.FLAG_LAST
<< 0),
700 LAG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 4)
702 alias GstPadTemplateFlags PadTemplateFlags
;
705 * Indicates when this pad will become available.
708 public enum GstPadPresence
714 alias GstPadPresence PadPresence
;
717 * The different parsing errors that can occur.
718 * GST_PARSE_ERROR_SYNTAX
720 public enum GstParseError
726 COULD_NOT_SET_PROPERTY
,
730 alias GstParseError ParseError
;
734 * GST_PIPELINE_FLAG_FIXED_CLOCK
736 public enum GstPipelineFlags
738 FIXED_CLOCK
= (GstBinFlags
.FLAG_LAST
<< 0),
740 LAST
= (GstBinFlags
.FLAG_LAST
<< 4)
742 alias GstPipelineFlags PipelineFlags
;
745 * The plugin loading errors
746 * GST_PLUGIN_ERROR_MODULE
748 public enum GstPluginError
754 alias GstPluginError PluginError
;
757 * Element priority ranks. Defines the order in which the autoplugger (or
758 * similar rank-picking mechanisms) will choose this element over an alternative
759 * one with the same function.
760 * The rank is a unsigned integer ranging from 0 (GST_RANK_NONE) to 256
761 * (GST_RANK_PRIMARY). These constants serve as a rough guidiance for defining
762 * the rank of a GstPlugin using gst_plugin_feature_set_rank().
775 * Standard predefined Query types
778 public enum GstQueryType
784 JITTER
, /+* not inn draft-query, necessary? +/
791 alias GstQueryType QueryType
;
794 * The different tag merging modes.
795 * GST_TAG_MERGE_UNDEFINED
797 public enum GstTagMergeMode
809 alias GstTagMergeMode TagMergeMode
;
812 * Extra tag flags used when registering tags.
813 * GST_TAG_FLAG_UNDEFINED
815 public enum GstTagFlag
823 alias GstTagFlag TagFlag
;
826 * The different states a task can be in
829 public enum GstTaskState
835 alias GstTaskState TaskState
;
838 * The probability of the typefind function. Higher values have more certainty
839 * in doing a reliable typefind.
840 * GST_TYPE_FIND_MINIMUM
842 public enum GstTypeFindProbability
850 alias GstTypeFindProbability TypeFindProbability
;
855 * The GstBin base class. Subclasses can access these fields provided
859 public struct GstBin
;
860 // /+* our children, subclass are supposed to update these
861 // * fields to reflect their state with _Iterate*() +/
864 // uint childrenCookie;
870 // GstClock *providedClock;
871 // GstElement *clockProvider;
875 * Subclasses can override the add_element and remove_element to
876 * update the list of children in the bin.
877 * The handle_message method can be overriden to implement custom
879 * GstElementClassparent_class;
881 public struct GstBinClass
;
882 // GstElementClass parentClass;
883 // /+* virtual methods for subclasses +/
884 // int (*addElement) (GstBin *bin, GstElement *element);
885 // int (*removeElement) (GstBin *bin, GstElement *element);
886 // void (*handleMessage) (GstBin *bin, GstMessage *message);
891 * The structure of a GstBuffer. Use the associated macros to access the public
893 * GstMiniObjectmini_object;
895 public struct GstBuffer
;
896 // GstMiniObject miniObject;
897 // /+* pointer to data and its size +/
901 // GstClockTime timestamp;
902 // GstClockTime duration;
903 // /+* the media type of this buffer +/
905 // /+* media specific offset +/
913 * The opaque GstBus data structure.
915 public struct GstBus
;
920 * Object describing media types.
923 public struct GstCaps
;
925 // /+* refcounting +/
927 // GstCapsFlags flags;
931 * Datastructure to initialize GstCaps from a string description usually
932 * used in conjunction with GST_STATIC_CAPS() and gst_static_caps_get() to
933 * instantiate a GstCaps.
936 public struct GstStaticCaps
;
944 public struct GstClock
;
948 * All pending timeouts or periodic notifies are converted into
952 public struct GstClockEntry
960 * GStreamer element abstract base class.
961 * GStaticRecMutex*state_lock;
963 public struct GstElement
;
964 // GStaticRecMutex *stateLock;
965 // /+* element state +/
968 // GstState currentState;
969 // GstState nextState;
970 // GstState pendingState;
971 // GstStateChangeReturn lastReturn;
973 // /+* allocated clock +/
975 // GstClockTimeDiff baseTime; /+* NULL/READY: 0 - PAUSED: current time - PLAYING: difference to clock +/
976 // /+* element pads, these lists can only be iterated while holding
977 // * the LOCK or checking the cookie after each LOCK. +/
980 // ushort numsrcpads;
982 // ushort numsinkpads;
988 * GStreamer element class. Override the vmethods to implement the element
990 * GstObjectClassparent_class;
992 public struct GstElementClass
;
993 // GstObjectClass parentClass;
994 // /+* the element details +/
995 // GstElementDetails details;
996 // /+* factory that the element was created from +/
997 // GstElementFactory *elementfactory;
998 // /+* templates for our pads +/
999 // GList *padtemplates;
1000 // int numpadtemplates;
1001 // uint padTemplCookie;
1002 // /+* virtual methods for subclasses +/
1003 // /+* request/release pads +/
1004 // GstPad* (*requestNewPad) (GstElement *element, GstPadTemplate *templ, char* name);
1005 // void (*releasePad) (GstElement *element, GstPad *pad);
1006 // /+* state changes +/
1007 // GstStateChangeReturn (*getState) (GstElement * element, GstState * state,
1008 // GstState * pending, GstClockTime timeout);
1009 // GstStateChangeReturn (*setState) (GstElement *element, GstState state);
1010 // GstStateChangeReturn (*changeState) (GstElement *element, GstStateChange transition);
1012 // void (*setBus) (GstElement * element, GstBus * bus);
1013 // /+* set/get clocks +/
1014 // GstClock* (*provideClock) (GstElement *element);
1015 // int (*setClock) (GstElement *element, GstClock *clock);
1017 // GstIndex* (*getIndex) (GstElement *element);
1018 // void (*setIndex) (GstElement *element, GstIndex *index);
1019 // /+* query functions +/
1020 // int (*sendEvent) (GstElement *element, GstEvent *event);
1021 // GstQueryType* (*getQueryTypes) (GstElement *element);
1022 // int (*query) (GstElement *element, GstQuery *query);
1027 * The opaque GstElementFactory data structure.
1029 public struct GstElementFactory
;
1033 * This struct defines the public information about a GstElement. It contains
1034 * meta-data about the element that is mostly for the benefit of editors.
1035 * The klass member can be used by applications to filter elements based
1039 public struct GstElementDetails
1050 * GstMiniObjectmini_object;
1052 public struct GstEvent
;
1054 GstMiniObject miniObject;
1058 GstStructure *structure;
1063 * A format definition
1066 public struct GstFormatDefinition
;
1069 // char *description;
1075 * Opaque GstGhostPad structure.
1077 public struct GstGhostPad
;
1082 * Opaque GstIndex structure.
1084 public struct GstIndex
;
1088 * The basic element of an index.
1090 public struct GstIndexEntry
;
1094 * A group of related entries in an index.
1096 public struct GstIndexGroup
;
1100 * An association in an entry.
1103 public struct GstIndexAssociation
;
1104 // GstFormat format;
1110 * The GstIndexFactory object
1112 public struct GstIndexFactory
;
1117 * GstIterator base structure. The values of this structure are
1118 * protected for subclasses, use the methods to use the GstIterator.
1120 public struct GstIterator
;
1124 * Base class for refcounted lightweight objects.
1125 * GTypeInstanceinstance;
1127 public struct GstMiniObject
1129 GTypeInstance instanc
;
1130 //< public >// with COW
1131 int refcount
;//gint refcount;
1132 uint flags
;//guint flags;
1135 gpointer _gst_reserved
;
1141 * GStreamer base object class.
1144 public struct GstObject
;
1146 // GMutex *lock; /+* object LOCK +/
1147 // char *name; /+* object name +/
1148 // char *namePrefix; /+* used for debugging +/
1149 // GstObject *parent; /+* this object's parent, weak ref +/
1155 * The GstPad structure. Use the functions to update the variables.
1156 * gpointerelement_private;
1158 public struct GstPad
;
1159 // void* elementPrivate;
1160 // GstPadTemplate *padtemplate;
1161 // GstPadDirection direction;
1162 // /+* streaming recLock +/
1163 // GStaticRecMutex *streamRecLock;
1165 // GMutex *prerollLock;
1166 // GCond *prerollCond;
1167 // /+* block cond, mutex is from the object +/
1168 // GCond *blockCond;
1169 // GstPadBlockCallback blockCallback;
1171 // /+* the pad capabilities +/
1173 // GstPadGetCapsFunction getcapsfunc;
1174 // GstPadSetCapsFunction setcapsfunc;
1175 // GstPadAcceptCapsFunction acceptcapsfunc;
1176 // GstPadFixateCapsFunction fixatecapsfunc;
1177 // GstPadActivateFunction activatefunc;
1178 // GstPadActivateModeFunction activatepushfunc;
1179 // GstPadActivateModeFunction activatepullfunc;
1181 // GstPadLinkFunction linkfunc;
1182 // GstPadUnlinkFunction unlinkfunc;
1184 // void* schedPrivate;
1185 // /+* data transport functions +/
1186 // GstPadChainFunction chainfunc;
1187 // GstPadCheckGetRangeFunction checkgetrangefunc;
1188 // GstPadGetRangeFunction getrangefunc;
1189 // GstPadEventFunction eventfunc;
1190 // GstActivateMode mode;
1191 // /+* generic query method +/
1192 // GstPadQueryTypeFunction querytypefunc;
1193 // GstPadQueryFunction queryfunc;
1194 // /+* internal links +/
1195 // GstPadIntLinkFunction intlinkfunc;
1196 // GstPadBufferAllocFunction bufferallocfunc;
1197 // /+* whether to emit signals for have-data. counts number
1198 // * of handlers attached. +/
1199 // int doBufferSignals;
1200 // int doEventSignals;
1204 * Structure describing the GstStaticPadTemplate.
1205 * gchar*name_template;
1207 public struct GstStaticPadTemplate
;
1208 // char *nameTemplate;
1209 // GstPadDirection direction;
1210 // GstPadPresence presence;
1211 // GstStaticCaps staticCaps;
1216 * The padtemplate object.
1218 public struct GstPadTemplate
;
1223 * The GstPipeline structure.
1224 * GstClock*fixed_clock;
1226 public struct GstPipeline
;
1227 // GstClock *fixedClock; /+* fixed clock if any +/
1228 // GstClockTime streamTime;
1229 // GstClockTime delay;
1236 public struct GstPlugin
;
1240 * A plugins should export a variable of this type called plugin_desc. This plugin
1241 * loaded will use this variable to initialize the plugin.
1242 * gintmajor_version;
1244 public struct GstPluginDesc
;
1245 // int majorVersion;
1246 // int minorVersion;
1248 // char *description;
1249 // GstPluginInitFunc pluginInit;
1255 // void* _GstReserved[GST_PADDING];
1260 * Opaque GstPluginFeature structure.
1262 public struct GstPluginFeature
;
1266 * Structure used for filtering based on name and type.
1269 public struct GstTypeNameData
;
1276 * The GstQuery structure.
1277 * GstMiniObjectmini_object;
1279 public struct GstQuery
;
1280 // GstMiniObject miniObject;
1281 // GstQueryType type;
1282 // GstStructure *structure;
1286 * A Query Type definition
1287 * GstQueryTypevalue;
1289 public struct GstQueryTypeDefinition
;
1290 // GstQueryType value;
1292 // char *description;
1298 * Opaque GstRegistry structure.
1300 public struct GstRegistry
;
1305 * A helper structure that holds the configured region of
1306 * interest in a media file.
1309 public struct GstSegment
;
1312 // GstFormat format;
1313 // GstSeekFlags flags;
1320 // /+* API added 0.10.6 +/
1321 // double appliedRate;
1326 * The GstStructure object. Most fields are private.
1329 public struct GstStructure
;
1335 * GstMiniObjectmini_object;
1337 /*public struct GstMessage
1339 GstMiniObject mini_object;
1341 GstMessageType type;
1346 GstStructure* structure;
1349 public struct GstMessage
1351 GstMiniObject mini_object;
1353 GstMessageType type;
1357 GstStructure *structure;
1360 /***** default padding of structures *****/
1361 const long GST_PADDING
= 4;
1362 //#define GST_PADDING_INIT {0}
1364 /***** padding for very extensible base classes *****/
1365 const long GST_PADDING_LARGE
= 20;
1369 GstMiniObject mini_object
;
1371 /*< private > *//* with MESSAGE_LOCK */
1372 GMutex
* lock; /* lock and cond for async delivery */
1375 /*< public > *//* with COW */
1376 GstMessageType type
;
1377 ulong timestamp
;//guint64 timestamp;
1380 GstStructure
* structure
;
1383 gpointer _gst_reserved
[GST_PADDING
];
1388 * The default implementation of a GstClock that uses the system time.
1390 public struct GstSystemClock
;
1395 * Opaque GstTagSetter data structure.
1397 public struct GstTagSetter
;
1401 * GstTagSetterIFace interface.
1402 * GTypeInterfaceg_iface;
1404 public struct GstTagSetterIFace
;
1405 // GTypeInterface gIface;
1407 // /+* virtual table +/
1412 * The GstTask object.
1413 * GstTaskStatestate;
1415 public struct GstTask
;
1416 // GstTaskState state;
1418 // GStaticRecMutex *lock;
1419 // GstTaskFunction func;
1426 * Object that stores typefind callbacks. To use with GstTypeFindFactory.
1429 public struct GstTypeFind
;
1430 // /+* private to the caller of the typefind funct +/
1431 // byte * (* peek) (void* data,
1434 // void (* suggest) (void* data,
1435 // uint probability,
1439 // ulong (* getLength) (void* data);
1444 * Object that stores information about a typefind function.
1446 public struct GstTypeFindFactory
;
1453 public struct GstXML
;
1457 * Gets the list with children in a bin.
1462 // #define GST_BIN_CHILDREN(bin) (GST_BIN_CAST(bin)->children)
1465 * Gets the children cookie that watches the children list.
1470 // #define GST_BIN_CHILDREN_COOKIE(bin) (GST_BIN_CAST(bin)->children_cookie)
1473 * Gets the number of children in a bin.
1477 * The "element-added" signal
1478 * void user_function (GstBin *bin,
1479 * GstElement *element,
1480 * gpointer user_data) : Run first
1481 * Will be emitted after the element was added to the bin.
1485 * the GstElement that was added to the bin
1487 * user data set when the signal handler was connected.
1490 // #define GST_BIN_NUMCHILDREN(bin) (GST_BIN_CAST(bin)->numchildren)
1493 * A flags word containing GstBufferFlag flags set on this buffer.
1498 // #define GST_BUFFER_FLAGS(buf) GST_MINI_OBJECT_FLAGS(buf)
1501 * Gives the status of a specific flag on a buffer.
1505 * the GstBufferFlag to check.
1508 // #define GST_BUFFER_FLAG_IS_SET(buf,flag) GST_MINI_OBJECT_FLAG_IS_SET (buf, flag)
1511 * Sets a buffer flag on a buffer.
1515 * the GstBufferFlag to set.
1518 // #define GST_BUFFER_FLAG_SET(buf,flag) GST_MINI_OBJECT_FLAG_SET (buf, flag)
1521 * Clears a buffer flag.
1525 * the GstBufferFlag to clear.
1528 // #define GST_BUFFER_FLAG_UNSET(buf,flag) GST_MINI_OBJECT_FLAG_UNSET (buf, flag)
1531 * A pointer to the data element of this buffer.
1536 // #define GST_BUFFER_DATA(buf) (GST_BUFFER_CAST(buf)->data)
1539 * A pointer to any data allocated for this buffer using malloc(). If this is
1540 * non-NULL, this memory will be freed at the end of the buffer's lifecycle
1541 * (i.e. when its refcount becomes zero).
1546 // #define GST_BUFFER_MALLOCDATA(buf) (GST_BUFFER_CAST(buf)->malloc_data)
1549 * The size in bytes of the data in this buffer.
1554 // #define GST_BUFFER_SIZE(buf) (GST_BUFFER_CAST(buf)->size)
1557 * The timestamp in nanoseconds (as a GstClockTime) of the data in the buffer.
1558 * Value will be GST_CLOCK_TIME_NONE if the timestamp is unknown.
1563 // #define GST_BUFFER_TIMESTAMP(buf) (GST_BUFFER_CAST(buf)->timestamp)
1566 * The duration in nanoseconds (as a GstClockTime) of the data in the buffer.
1567 * Value will be GST_CLOCK_TIME_NONE if the duration is unknown.
1572 // #define GST_BUFFER_DURATION(buf) (GST_BUFFER_CAST(buf)->duration)
1575 * The caps for this buffer.
1580 // #define GST_BUFFER_CAPS(buf) (GST_BUFFER_CAST(buf)->caps)
1583 * The offset in the source file of the beginning of this buffer.
1588 // #define GST_BUFFER_OFFSET(buf) (GST_BUFFER_CAST(buf)->offset)
1591 * The offset in the source file of the end of this buffer.
1596 // #define GST_BUFFER_OFFSET_END(buf) (GST_BUFFER_CAST(buf)->offset_end)
1599 * Tests if the duration is known.
1604 // #define GST_BUFFER_DURATION_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (buffer)))
1607 * Tests if the timestamp is known.
1612 // #define GST_BUFFER_TIMESTAMP_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buffer)))
1615 * Tests if the start offset is known.
1620 // #define GST_BUFFER_OFFSET_IS_VALID(buffer) (GST_BUFFER_OFFSET (buffer) != GST_BUFFER_OFFSET_NONE)
1623 * Tests if the end offset is known.
1628 // #define GST_BUFFER_OFFSET_END_IS_VALID(buffer) (GST_BUFFER_OFFSET_END (buffer) != GST_BUFFER_OFFSET_NONE)
1631 * Decreases the refcount of the buffer. If the refcount reaches 0, the buffer
1632 * will be freed. If GST_BUFFER_MALLOCDATA() is non-NULL, this pointer will
1633 * also be freed at this time.
1638 // #define gst_buffer_unref(buf) gst_mini_object_unref (GST_MINI_OBJECT (buf))
1641 * A convenience function to set the data and size on a buffer.
1642 * This will replace any existing data pointer set on this buffer, but will
1643 * not change GST_BUFFER_MALLOCDATA(), if any. Callers should ensure that
1644 * GST_BUFFER_MALLOCDATA() is non-NULL, or should free that and set it to NULL.
1645 * No checks are done on the data or size arguments passed.
1649 * The data (a guint8 *) to set on the buffer.
1651 * The size (in bytes, as a guint) of the data being set.
1654 // #define gst_buffer_set_data(buf, data, size)
1657 * Create a copy of the given buffer. This will also make a newly allocated
1658 * copy of the data the source buffer contains.
1663 // #define gst_buffer_copy(buf) GST_BUFFER_CAST (gst_mini_object_copy (GST_MINI_OBJECT (buf)))
1666 * Tests if you can safely write data into a buffer's data array or validly
1667 * modify the caps and timestamp metadata. Metadata in a GstBuffer is always
1668 * writable, but it is only safe to change it when there is only one owner
1669 * of the buffer - ie, the refcount is 1.
1674 // #define gst_buffer_is_writable(buf) gst_mini_object_is_writable (GST_MINI_OBJECT (buf))
1677 * Makes a writable buffer from the given buffer. If the source buffer is
1678 * already writable, this will simply return the same buffer. A copy will
1679 * otherwise be made using gst_buffer_copy().
1684 // #define gst_buffer_make_writable(buf) GST_BUFFER_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT (buf)))
1687 * Modifies a pointer to a Gstbuffer to point to a different GstBuffer. The
1688 * modification is done atomically (so this is useful for ensuring thread safety
1689 * in some cases), and the reference counts are updated appropriately (the old
1690 * buffer is unreffed, the new is reffed).
1691 * Either nbuf or the GstBuffer pointed to by obuf may be NULL.
1693 * pointer to a pointer to a GstBuffer to be replaced.
1695 * pointer to a GstBuffer that will replace the buffer pointed to by
1699 // #define gst_buffer_replace(obuf,nbuf) gst_mini_object_replace ((GstMiniObject **)(obuf), GST_MINI_OBJECT (nbuf))
1702 * Get access to the reference count field of the caps
1707 // #define GST_CAPS_REFCOUNT(caps) ((GST_CAPS(caps))->refcount)
1710 * Get the reference count value of the caps.
1715 // #define GST_CAPS_REFCOUNT_VALUE(caps) (g_atomic_int_get ((GST_CAPS(caps))->refcount))
1718 * Convenience macro that checks if the number of structures in the given caps
1721 * the GstCaps instance to check
1724 // #define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1)
1728 * GST_DEBUG_CAPS is deprecated and should not be used in newly-written code. do not use anymore
1729 * Convenience macro for printing out the contents of caps with GST_DEBUG().
1731 * a string that should be prepended to the caps data.
1733 * the GstCaps instance to print
1736 // #define GST_DEBUG_CAPS(string, caps)
1739 * Creates a new GstCaps static caps from an input string.
1740 * This can be used in pad templates.
1742 * the string describing the caps
1745 // #define GST_STATIC_CAPS(string)
1748 * Tests if a given GstClockTime represents a valid defined time.
1750 * clock time to validate
1753 // #define GST_CLOCK_TIME_IS_VALID(time) (((GstClockTime)(time)) != GST_CLOCK_TIME_NONE)
1756 * Calculate a difference between two clock times as a GstClockTimeDiff.
1757 * The difference is calculated as e - s.
1764 // #define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((e) - (s))
1767 * Convert a GTimeVal to a GstClockTime.
1769 * the timeval to convert
1772 // #define GST_TIMEVAL_TO_TIME(tv) ((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND)
1775 * Note: on 32-bit systems, a timeval has a range of only 2^32 - 1 seconds,
1776 * which is about 68 years. Expect trouble if you want to schedule stuff
1777 * in your pipeline for 2038.
1778 * Convert a GstClockTime to a GTimeVal
1780 * The GstClockTime to convert
1782 * The target timeval
1785 // #define GST_TIME_TO_TIMEVAL(t,tv)
1788 * Convert a struct timespec (see man pselect) to a GstClockTime.
1790 * the timespec to convert
1793 // #define GST_TIMESPEC_TO_TIME(ts) ((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND)
1796 * Convert a GstClockTime to a struct timespec (see man pselect)
1798 * The GstClockTime to convert
1800 * The target timespec
1803 // #define GST_TIME_TO_TIMESPEC(t,ts)
1806 * Cast to a clock entry
1811 // #define GST_CLOCK_ENTRY(entry) ((GstClockEntry *)(entry))
1814 * Get the owner clock of the entry
1816 * the entry to query
1819 // #define GST_CLOCK_ENTRY_CLOCK(entry) ((entry)->clock)
1822 * Get the type of the clock entry
1824 * the entry to query
1827 // #define GST_CLOCK_ENTRY_TYPE(entry) ((entry)->type)
1830 * Get the requested time of this entry
1832 * the entry to query
1835 // #define GST_CLOCK_ENTRY_TIME(entry) ((entry)->time)
1838 * Get the interval of this periodic entry
1840 * the entry to query
1843 // #define GST_CLOCK_ENTRY_INTERVAL(entry) ((entry)->interval)
1846 * The status of the entry
1848 * the entry to query
1851 // #define GST_CLOCK_ENTRY_STATUS(entry) ((entry)->status)
1854 * Gets the GstClockFlags clock flags.
1856 * the clock to query
1859 // #define GST_CLOCK_FLAGS(clock) (GST_CLOCK(clock)->flags)
1862 * Signal that the entries in the clock have changed.
1864 * the clock to broadcast
1867 // #define GST_CLOCK_BROADCAST(clock) g_cond_broadcast(GST_CLOCK_COND(clock))
1870 * Gets the GCond that gets signaled when the entries of the clock
1873 * the clock to query
1876 // #define GST_CLOCK_COND(clock) (GST_CLOCK_CAST(clock)->entries_changed)
1879 * Wait on the clock until the entries changed or the specified timeout
1882 * the clock to wait on
1884 * a GTimeVal to wait.
1887 // #define GST_CLOCK_TIMED_WAIT(clock,tv) g_cond_timed_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock),tv)
1890 * Wait on the clock until the entries changed.
1892 * the clock to wait on
1895 // #define GST_CLOCK_WAIT(clock) g_cond_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock))
1898 * This macro returns the current GstState of the element.
1900 * a GstElement to return state for.
1903 // #define GST_STATE(elem) (GST_ELEMENT_CAST(elem)->current_state)
1906 * Given a current state cur and a target state pending, calculate the next (intermediate)
1909 * A starting GstState
1914 // #define GST_STATE_GET_NEXT(cur,pending) ((cur) + __GST_SIGN ((gint)(pending) - (gint)(cur)))
1917 * This macro returns the next GstState of the element.
1919 * a GstElement to return the next state for.
1922 // #define GST_STATE_NEXT(elem) (GST_ELEMENT_CAST(elem)->next_state)
1925 * This macro returns the currently pending GstState of the element.
1927 * a GstElement to return the pending state for.
1930 // #define GST_STATE_PENDING(elem) (GST_ELEMENT_CAST(elem)->pending_state)
1933 * This macro returns the last GstStateChangeReturn value.
1935 * a GstElement to return the last state result for.
1938 // #define GST_STATE_RETURN(elem) (GST_ELEMENT_CAST(elem)->last_return)
1941 * Given a current state cur and a next state next, calculate the associated
1942 * GstStateChange transition.
1949 // #define GST_STATE_TRANSITION(cur,next) (((cur)<<3)|(next))
1952 * Given a state transition trans, extract the current GstState.
1957 // #define GST_STATE_TRANSITION_CURRENT(trans) ((trans)>>3)
1960 * Given a state transition trans, extract the next GstState.
1965 // #define GST_STATE_TRANSITION_NEXT(trans) ((trans)0x7)
1968 * Get a reference to the state lock of elem.
1969 * This lock is used by the core. It is taken while getting or setting
1970 * the state, during state changes, and while finalizing.
1975 // #define GST_STATE_GET_LOCK(elem) (GST_ELEMENT_CAST(elem)->state_lock)
1978 * Get the conditional used to signal the completion of a state change.
1983 // #define GST_STATE_GET_COND(elem) (GST_ELEMENT_CAST(elem)->state_cond)
1986 * Gets the name of this element. Use only in core as this is not
1987 * ABI-compatible. Others use gst_element_get_name()
1989 * A GstElement to query
1992 // #define GST_ELEMENT_NAME(elem) (GST_OBJECT_NAME(elem))
1995 * Get the parent object of this element.
1997 * A GstElement to query
2000 // #define GST_ELEMENT_PARENT(elem) (GST_ELEMENT_CAST(GST_OBJECT_PARENT(elem)))
2003 * Get the message bus of this element.
2005 * A GstElement to query
2008 // #define GST_ELEMENT_BUS(elem) (GST_ELEMENT_CAST(elem)->bus)
2011 * Get the clock of this element
2013 * A GstElement to query
2016 // #define GST_ELEMENT_CLOCK(elem) (GST_ELEMENT_CAST(elem)->clock)
2019 * Get the pads of this elements.
2021 * A GstElement to query
2024 // #define GST_ELEMENT_PADS(elem) (GST_ELEMENT_CAST(elem)->pads)
2027 * Utility function that elements can use in case they encountered a fatal
2028 * data processing error. The pipeline will throw an error signal and the
2029 * application will be requested to stop further media processing.
2031 * the element that throws the error
2033 * like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)
2035 * error code defined for that domain (see GstGError)
2037 * the message to display (format string and args enclosed in
2040 * debugging information for the message (format string and args
2041 * enclosed in parentheses)
2044 // #define GST_ELEMENT_ERROR(el, domain, code, text, debug)
2047 * Utility function that elements can use in case they encountered a non-fatal
2048 * data processing problem. The pipeline will throw a warning signal and the
2049 * application will be informed.
2051 * the element that throws the error
2053 * like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)
2055 * error code defined for that domain (see GstGError)
2057 * the message to display (format string and args enclosed in
2060 * debugging information for the message (format string and args
2061 * enclosed in parentheses)
2064 // #define GST_ELEMENT_WARNING(el, domain, code, text, debug)
2067 * Check if the element is in the locked state and therefore will ignore state
2068 * changes from its parent object.
2070 * A GstElement to query
2073 // #define GST_ELEMENT_IS_LOCKED_STATE(elem) (GST_OBJECT_FLAG_IS_SET(elem,GST_ELEMENT_LOCKED_STATE))
2076 * Sets the name of the element, getting rid of the old name if there was one.
2078 * a GstElement to set the name of.
2083 // #define gst_element_set_name(elem,name) gst_object_set_name(GST_OBJECT_CAST(elem),name)
2086 * Gets the name of the element.
2088 * a GstElement to set the name of.
2091 // #define gst_element_get_name(elem) gst_object_get_name(GST_OBJECT_CAST(elem))
2094 * Sets the parent of an element.
2096 * a GstElement to set the parent of.
2098 * the new parent GstObject of the element.
2101 // #define gst_element_set_parent(elem,parent) gst_object_set_parent(GST_OBJECT_CAST(elem),parent)
2104 * Gets the parent of an element.
2106 * a GstElement to get the parent of.
2109 // #define gst_element_get_parent(elem) gst_object_get_parent(GST_OBJECT_CAST(elem))
2112 * Macro to initialize GstElementDetails.
2114 * long, english name
2116 * type of element, as hierarchy
2118 * what the element is about
2120 * who wrote this thing?
2123 // #define GST_ELEMENT_DETAILS(longname,klass,description,author)
2126 * Tests if element details are initialized.
2128 * the GstElementDetails to check
2131 // #define GST_IS_ELEMENT_DETAILS(details)
2134 * Get the GstEventType of the event.
2136 * the event to query
2139 // #define GST_EVENT_TYPE(event) (GST_EVENT_CAST(event)->type)
2142 * Get a constant string representation of the GstEventType of the event.
2144 * the event to query
2147 // #define GST_EVENT_TYPE_NAME(event) (gst_event_type_get_name(GST_EVENT_TYPE(event)))
2150 * Get the GstClockTime timestamp of the event. This is the time when the event
2153 * the event to query
2156 // #define GST_EVENT_TIMESTAMP(event) (GST_EVENT_CAST(event)->timestamp)
2159 * The source GstObject that generated this event.
2161 * the event to query
2164 // #define GST_EVENT_SRC(event) (GST_EVENT_CAST(event)->src)
2167 * Check if an event can travel downstream.
2169 * the event to query
2172 // #define GST_EVENT_IS_DOWNSTREAM(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_DOWNSTREAM)
2175 * Check if an event is serialized with the data stream.
2177 * the event to query
2180 // #define GST_EVENT_IS_SERIALIZED(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_SERIALIZED)
2183 * Check if an event can travel upstream.
2185 * the event to query
2188 // #define GST_EVENT_IS_UPSTREAM(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_UPSTREAM)
2191 * when making custom event types, use this macro with the num and
2194 * the event number to create
2199 // #define GST_EVENT_MAKE_TYPE(num,flags)
2201 int GST_EVENT_TYPE_SHIFT
= 4;
2204 * GST_EVENT_MAKE_TYPE:
2205 * @num: the event number to create
2206 * @flags: the event flags
2208 * when making custom event types, use this macro with the num and
2211 int GST_EVENT_MAKE_TYPE( int num
, int flags
)
2213 return (((num
) << GST_EVENT_TYPE_SHIFT
) |
(flags
));
2217 * Copy the event using the event specific copy function.
2222 // #define gst_event_copy(ev) GST_EVENT_CAST (gst_mini_object_copy (GST_MINI_OBJECT (ev)))
2225 * Decrease the refcount of an event, freeing it if the refcount reaches 0.
2227 * The event to refcount
2230 // #define gst_event_unref(ev) gst_mini_object_unref (GST_MINI_OBJECT (ev))
2233 * Modifies a pointer to a GstEvent to point to a different GstEvent. The
2234 * modification is done atomically (so this is useful for ensuring thread safety
2235 * in some cases), and the reference counts are updated appropriately (the old
2236 * event is unreffed, the new one is reffed).
2237 * Either new_event or the GstEvent pointed to by old_event may be NULL.
2239 * pointer to a pointer to a GstEvent to be replaced.
2241 * pointer to a GstEvent that will replace the event pointed to
2246 // #define gst_event_replace(old_event,new_event)
2249 * Get the number of associations in the entry.
2251 * The entry to query
2254 // #define GST_INDEX_NASSOCS(entry) ((entry)->data.assoc.nassocs)
2257 * Get the flags for this entry.
2259 * The entry to query
2262 // #define GST_INDEX_ASSOC_FLAGS(entry) ((entry)->data.assoc.flags)
2265 * Get the i-th format of the entry.
2267 * The entry to query
2272 // #define GST_INDEX_ASSOC_FORMAT(entry,i) ((entry)->data.assoc.assocs[(i)].format)
2275 * Get the i-th value of the entry.
2277 * The entry to query
2282 // #define GST_INDEX_ASSOC_VALUE(entry,i) ((entry)->data.assoc.assocs[(i)].value)
2285 * Get the format of the format entry
2287 * The entry to query
2290 // #define GST_INDEX_FORMAT_FORMAT(entry) ((entry)->data.format.format)
2293 * Get the key of the format entry
2295 * The entry to query
2298 // #define GST_INDEX_FORMAT_KEY(entry) ((entry)->data.format.key)
2301 * Get the description of the id entry
2303 * The entry to query
2306 // #define GST_INDEX_ID_DESCRIPTION(entry) ((entry)->data.id.description)
2309 * Check if the index can be read from
2311 * The index to check
2314 // #define GST_INDEX_IS_READABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_INDEX_READABLE))
2317 * Check if the index can be written to
2319 * The index to check
2322 // #define GST_INDEX_IS_WRITABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_INDEX_WRITABLE))
2325 * Macro to cast to a GstIterator
2327 * the GstIterator value
2330 // #define GST_ITERATOR(it) ((GstIterator*)(it))
2333 * Macro to get the lock protecting the datastructure being iterated.
2335 * the GstIterator to get the lock of
2338 // #define GST_ITERATOR_LOCK(it) (GST_ITERATOR(it)->lock)
2341 * Macro to get the cookie of a GstIterator. The cookie of the
2342 * iterator is the value of the master cookie when the iterator
2344 * Whenever the iterator is iterated, the value is compared to the
2345 * value of the master cookie. If they are different, a concurrent
2346 * modification happened to the iterator and a resync is needed.
2348 * the GstIterator to get the cookie of
2351 // #define GST_ITERATOR_COOKIE(it) (GST_ITERATOR(it)->cookie)
2354 * Macro to get a pointer to where the master cookie is stored. The
2355 * master cookie protects the structure being iterated and gets updated
2356 * whenever the datastructure changes.
2358 * the GstIterator to get the master cookie of
2361 // #define GST_ITERATOR_ORIG_COOKIE(it) (GST_ITERATOR(it)->master_cookie)
2364 * Get the object that posted message.
2369 // #define GST_MESSAGE_SRC(message) (GST_MESSAGE(message)->src)
2372 * Get the timestamp of message. This is the timestamp when the message
2378 // #define GST_MESSAGE_TIMESTAMP(message) (GST_MESSAGE(message)->timestamp)
2381 * Get the GstMessageType of message.
2386 // #define GST_MESSAGE_TYPE(message) (GST_MESSAGE(message)->type)
2389 * Get a constant string representation of the GstMessageType of message.
2395 // #define GST_MESSAGE_TYPE_NAME(message) gst_message_type_get_name(GST_MESSAGE_TYPE(message))
2398 * Creates a copy of the message. Returns a copy of the message.
2401 * the message to copy
2404 // #define gst_message_copy(msg) GST_MESSAGE (gst_mini_object_copy (GST_MINI_OBJECT (msg)))
2407 * Checks if a message is writable. If not, a writable copy is made and
2408 * returned. Returns a message (possibly a duplicate) that is writable.
2411 * the message to make writable
2414 // #define gst_message_make_writable(msg) GST_MESSAGE (gst_mini_object_make_writable (GST_MINI_OBJECT (msg)))
2417 * Convenience macro to decrease the reference count of the message, possibly freeing
2420 * the message to unref
2422 * GstBus, GstMiniObject, GstElement
2425 // #define gst_message_unref(msg) gst_mini_object_unref (GST_MINI_OBJECT (msg))
2428 * This macro returns the entire set of flags for the mini-object.
2430 * MiniObject to return flags for.
2433 // #define GST_MINI_OBJECT_FLAGS(obj) (GST_MINI_OBJECT(obj)->flags)
2436 * This macro checks to see if the given flag is set.
2438 * MiniObject to check for flags.
2443 // #define GST_MINI_OBJECT_FLAG_IS_SET(obj,flag) !!(GST_MINI_OBJECT_FLAGS (obj) (flag))
2446 * This macro sets the given bits.
2448 * MiniObject to set flag in.
2450 * Flag to set, can by any number of bits in guint32.
2453 // #define GST_MINI_OBJECT_FLAG_SET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) |= (flag))
2456 * This macro usets the given bits.
2458 * MiniObject to unset flag in.
2460 * Flag to set, must be a single bit in guint32.
2463 // #define GST_MINI_OBJECT_FLAG_UNSET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) = ~(flag))
2466 * Get access to the reference count field of the mini-object.
2471 // #define GST_MINI_OBJECT_REFCOUNT(obj) ((GST_MINI_OBJECT_CAST(obj))->refcount)
2474 * Get the reference count value of the mini-object.
2479 // #define GST_MINI_OBJECT_REFCOUNT_VALUE(obj) (g_atomic_int_get ((GST_MINI_OBJECT_CAST(obj))->refcount))
2482 * This macro returns the entire set of flags for the object.
2487 // #define GST_OBJECT_FLAGS(obj) (GST_OBJECT_CAST (obj)->flags)
2490 * This macro checks to see if the given flag is set.
2497 // #define GST_OBJECT_FLAG_IS_SET(obj,flag) ((GST_OBJECT_FLAGS (obj) (flag)) == (flag))
2500 * This macro sets the given bits.
2507 // #define GST_OBJECT_FLAG_SET(obj,flag) (GST_OBJECT_FLAGS (obj) |= (flag))
2510 * This macro usets the given bits.
2517 // #define GST_OBJECT_FLAG_UNSET(obj,flag) (GST_OBJECT_FLAGS (obj) = ~(flag))
2520 * Get the name of this object
2525 // #define GST_OBJECT_NAME(obj) (GST_OBJECT_CAST(obj)->name)
2528 * Get the parent of this object
2533 // #define GST_OBJECT_PARENT(obj) (GST_OBJECT_CAST(obj)->parent)
2536 * Check if the given object is beeing destroyed.
2541 // #define GST_OBJECT_IS_DISPOSING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_DISPOSING))
2544 * Check if the given object is floating (has no owner).
2549 // #define GST_OBJECT_IS_FLOATING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_FLOATING))
2552 * Get access to the reference count field of the object.
2557 // #define GST_OBJECT_REFCOUNT(obj) (((GObject*)(obj))->ref_count)
2560 * Get the reference count value of the object.
2565 // #define GST_OBJECT_REFCOUNT_VALUE(obj) g_atomic_int_get (GST_OBJECT_REFCOUNT(obj))
2568 * This macro will return the class lock used to protect deep_notify signal
2569 * emission on thread-unsafe glib versions (glib < 2.8).
2574 // #define GST_CLASS_GET_LOCK(obj) (GST_OBJECT_CLASS_CAST(obj)->lock)
2582 // #define GST_CLASS_LOCK(obj) (g_static_rec_mutex_lock(GST_CLASS_GET_LOCK(obj)))
2585 * Try to lock the class, returns TRUE if class could be locked.
2590 // #define GST_CLASS_TRYLOCK(obj) (g_static_rec_mutex_trylock(GST_CLASS_GET_LOCK(obj)))
2598 // #define GST_CLASS_UNLOCK(obj) (g_static_rec_mutex_unlock(GST_CLASS_GET_LOCK(obj)))
2601 * This macro will obtain a lock on the object, making serialization possible.
2602 * It blocks until the lock can be obtained.
2604 * a GstObject to lock
2607 // #define GST_OBJECT_LOCK(obj) g_mutex_lock(GST_OBJECT_GET_LOCK(obj))
2610 * This macro will try to obtain a lock on the object, but will return with
2611 * FALSE if it can't get it immediately.
2616 // #define GST_OBJECT_TRYLOCK(obj) g_mutex_trylock(GST_OBJECT_GET_LOCK(obj))
2619 * This macro releases a lock on the object.
2621 * a GstObject to unlock.
2624 // #define GST_OBJECT_UNLOCK(obj) g_mutex_unlock(GST_OBJECT_GET_LOCK(obj))
2627 * Acquire a reference to the mutex of this object.
2632 // #define GST_OBJECT_GET_LOCK(obj) (GST_OBJECT_CAST(obj)->lock)
2635 * Macro to test if the given GstPadLinkReturn value indicates a failed
2638 * the GstPadLinkReturn value
2641 // #define GST_PAD_LINK_FAILED(ret) ((ret) < GST_PAD_LINK_OK)
2644 * Macro to test if the given GstPadLinkReturn value indicates a successful
2647 * the GstPadLinkReturn value
2650 // #define GST_PAD_LINK_SUCCESSFUL(ret) ((ret) >= GST_PAD_LINK_OK)
2653 * Get a copy of the name of the pad. g_free() after usage.
2656 * the pad to get the name from
2659 // #define gst_pad_get_name(pad) gst_object_get_name (GST_OBJECT_CAST (pad))
2662 * Get the parent of pad. This function increases the refcount
2663 * of the parent object so you should gst_object_unref() it after usage.
2664 * Can return NULL if the pad did not have a parent.
2667 * the pad to get the parent of
2670 // #define gst_pad_get_parent(pad) gst_object_get_parent (GST_OBJECT_CAST (pad))
2673 * Get the stream lock of pad. The stream lock is protecting the
2674 * resources used in the data processing functions of pad.
2679 // #define GST_PAD_GET_STREAM_LOCK(pad) (GST_PAD_CAST(pad)->stream_rec_lock)
2682 * Lock the stream lock of pad.
2687 // #define GST_PAD_STREAM_LOCK(pad) (g_static_rec_mutex_lock(GST_PAD_GET_STREAM_LOCK(pad)))
2690 * Lock the stream lock of pad t times.
2694 * the number of times to recursively lock
2697 // #define GST_PAD_STREAM_LOCK_FULL(pad,t) (g_static_rec_mutex_lock_full(GST_PAD_GET_STREAM_LOCK(pad), t))
2700 * Try to Lock the stream lock of the pad, return TRUE if the lock could be
2706 // #define GST_PAD_STREAM_TRYLOCK(pad) (g_static_rec_mutex_trylock(GST_PAD_GET_STREAM_LOCK(pad)))
2709 * Unlock the stream lock of pad.
2714 // #define GST_PAD_STREAM_UNLOCK(pad) (g_static_rec_mutex_unlock(GST_PAD_GET_STREAM_LOCK(pad)))
2717 * Fully unlock the recursive stream lock of pad, return the number of times
2723 // #define GST_PAD_STREAM_UNLOCK_FULL(pad) (g_static_rec_mutex_unlock_full(GST_PAD_GET_STREAM_LOCK(pad)))
2726 * Macro to test if the given GstFlowReturn value indicates a fatal
2727 * error. This macro is mainly used in elements to decide when an error
2728 * message should be posted on the bus.
2730 * a GstFlowReturn value
2732 * The "caps" property
2733 * "caps" GstCaps : Read
2734 * The capabilities of the pad.
2737 // #define GST_FLOW_IS_FATAL(ret) ((ret) <= GST_FLOW_UNEXPECTED)
2740 * Convenience macro to fill the values of a GstStaticPadTemplate
2743 * the name template of pad
2745 * the GstPadDirection of the pad
2747 * the GstPadPresence of the pad
2749 * the GstStaticCaps of the pad
2752 // #define GST_STATIC_PAD_TEMPLATE(padname, dir, pres, caps)
2755 * Get the nametemplate of the padtemplate.
2757 * the template to query
2760 // #define GST_PAD_TEMPLATE_NAME_TEMPLATE(templ) (((GstPadTemplate *)(templ))->name_template)
2763 * Get the direction of the padtemplate.
2765 * the template to query
2768 // #define GST_PAD_TEMPLATE_DIRECTION(templ) (((GstPadTemplate *)(templ))->direction)
2771 * Get the presence of the padtemplate.
2773 * the template to query
2776 // #define GST_PAD_TEMPLATE_PRESENCE(templ) (((GstPadTemplate *)(templ))->presence)
2779 * Get a handle to the padtemplate GstCaps
2781 * the template to query
2784 // #define GST_PAD_TEMPLATE_CAPS(templ) (((GstPadTemplate *)(templ))->caps)
2787 * Check if the properties of the padtemplate are fixed
2789 * the template to query
2792 // #define GST_PAD_TEMPLATE_IS_FIXED(templ) (GST_OBJECT_FLAG_IS_SET(templ, GST_PAD_TEMPLATE_FIXED))
2795 * This macro needs to be used to define the entry point and meta data of a
2796 * plugin. One would use this macro to export a plugin, so that it can be used
2797 * by other applications
2799 * major version number of the gstreamer-core that plugin was compiled for
2801 * minor version number of the gstreamer-core that plugin was compiled for
2803 * short, but unique name of the plugin
2805 * information about the purpose of the plugin
2807 * function pointer to the plugin_init method with the signature of static gboolean plugin_init (GstPlugin * plugin).
2809 * full version string (e.g. VERSION from config.h)
2811 * under which licence the package has been released, e.g. GPL, LGPL.
2813 * the package-name (e.g. PACKAGE_NAME from config.h)
2815 * a description from where the package comes from (e.g. the homepage URL)
2818 // #define GST_PLUGIN_DEFINE(major,minor,name,description,init,version,license,package,origin)
2821 * This macro needs to be used to define the entry point and meta data of a
2822 * local plugin. One would use this macro to define a local plugin that can only
2823 * be used by the own application.
2825 * major version number of the gstreamer-core that plugin was compiled for
2827 * minor version number of the gstreamer-core that plugin was compiled for
2829 * short, but unique name of the plugin
2831 * information about the purpose of the plugin
2833 * function pointer to the plugin_init method with the signature of static gboolean plugin_init (GstPlugin * plugin).
2835 * full version string (e.g. VERSION from config.h)
2837 * under which licence the package has been released, e.g. GPL, LGPL.
2839 * the package-name (e.g. PACKAGE_NAME from config.h)
2841 * a description from where the package comes from (e.g. the homepage URL)
2844 // #define GST_PLUGIN_DEFINE_STATIC(major,minor,name,description,init,version,license,package,origin)
2847 * Get the name of the feature
2849 * The feature to query
2852 // #define GST_PLUGIN_FEATURE_NAME(feature) (GST_PLUGIN_FEATURE (feature)->name)
2855 * Get the GstQueryType of the query.
2857 * the query to query
2860 // #define GST_QUERY_TYPE(query) (((GstQuery*)(query))->type)
2863 * Get a constant string representation of the GstQueryType of the query.
2865 * the query to query
2869 // #define GST_QUERY_TYPE_NAME(query) (gst_query_type_get_name(GST_QUERY_TYPE(query)))
2872 * Increases the refcount of the given query by one.
2874 * a GstQuery to increase the refcount of.
2877 // #define gst_query_ref(q) GST_QUERY (gst_mini_object_ref (GST_MINI_OBJECT (q)))
2880 * Decreases the refcount of the query. If the refcount reaches 0, the query
2883 * a GstQuery to decrease the refcount of.
2886 // #define gst_query_unref(q) gst_mini_object_unref (GST_MINI_OBJECT (q))
2889 * Copies the given query using the copy function of the parent GstData
2892 * a GstQuery to copy.
2895 // #define gst_query_copy(q) GST_QUERY (gst_mini_object_copy (GST_MINI_OBJECT (q)))
2898 * Makes a writable query from the given query.
2900 * a GstQuery to make writable
2903 // #define gst_query_make_writable(q) GST_QUERY (gst_mini_object_make_writable (GST_MINI_OBJECT (q)))
2906 * Get the list of paths for the default registry.
2909 // #define gst_default_registry_get_path_list()
2912 * Add the plugin to the default registry.
2913 * The plugin-added signal will be emitted.
2918 // #define gst_default_registry_add_plugin(plugin)
2921 * Add the given path to the default registry. The syntax of the
2922 * path is specific to the registry. If the path has already been
2923 * added, do nothing.
2925 * the path to add to the registry
2928 // #define gst_default_registry_add_path(path)
2931 * Find the plugin with the given name in the default registry.
2932 * The plugin will be reffed; caller is responsible for unreffing.
2934 * the plugin name to find
2937 // #define gst_default_registry_find_plugin(name)
2940 * Find the pluginfeature with the given name and type in the default registry.
2942 * the pluginfeature name to find
2944 * the pluginfeature type to find
2947 // #define gst_default_registry_find_feature(name,type)
2950 * Get a copy of all plugins registered in the default registry.
2953 // #define gst_default_registry_get_plugin_list()
2956 * Runs a filter against all features of the plugins in the default registry
2957 * and returns a GList with the results.
2958 * If the first flag is set, only the first match is
2959 * returned (as a list with a single object).
2963 * only return first match
2965 * user data passed to the filter function
2967 * GstPlugin, GstPluginFeature
2970 // #define gst_default_registry_feature_filter(filter,first,user_data)
2973 * Send a broadcast signal to all waiting task conds
2978 // #define GST_TASK_BROADCAST(task) g_cond_breadcast(GST_TASK_GET_COND (task))
2981 * Get access to the cond of the task.
2983 * Task to get the cond of
2986 // #define GST_TASK_GET_COND(task) (GST_TASK_CAST(task)->cond)
2989 * Get access to the task lock.
2991 * Task to get the lock of
2994 // #define GST_TASK_GET_LOCK(task) (GST_TASK_CAST(task)->lock)
2997 * Signal the task cond
3002 // #define GST_TASK_SIGNAL(task) g_cond_signal(GST_TASK_GET_COND (task))
3005 * Get access to the state of the task.
3007 * Task to get the state of
3010 // #define GST_TASK_STATE(task) (GST_TASK_CAST(task)->state)
3013 * Wait for the task cond to be signalled
3018 // #define GST_TASK_WAIT(task) g_cond_wait(GST_TASK_GET_COND (task), GST_OBJECT_GET_LOCK (task))
3021 * Specifies the type of function passed to gst_bus_add_watch() or
3022 * gst_bus_add_watch_full(), which is called from the mainloop when a message
3023 * is available on the bus.
3024 * The message passed to the function will be unreffed after execution of this
3025 * function so it should not be freed in the function.
3026 * Note that this function is used as a GSourceFunc which means that returning
3027 * FALSE will remove the GSource from the mainloop.
3029 * the GstBus that sent the message
3033 * user data that has been given, when registering the handler
3035 * FALSE if the event source should be removed.
3037 // gboolean (*GstBusFunc) (GstBus *bus, GstMessage *message, gpointer data);
3038 public typedef extern(C
) int function (GstBus
*, GstMessage
*, void*) GstBusFunc
;
3041 * Handler will be invoked synchronously, when a new message has been injected
3042 * into the bus. This function is mostly used internally. Only one sync handler
3043 * can be attached to a given bus.
3044 * If the handler returns GST_BUS_DROP, it should unref the message, else the
3045 * message should not be unreffed by the sync handler.
3047 * the GstBus that sent the message
3051 * user data that has been given, when registering the handler
3053 * GstBusSyncReply stating what to do with the message
3055 // GstBusSyncReply (*GstBusSyncHandler) (GstBus *bus, GstMessage *message, gpointer data);
3056 public typedef extern(C
) GstBusSyncReply
function (GstBus
*, GstMessage
*, void*) GstBusSyncHandler
;
3059 * The function prototype of the callback.
3061 * The clock that triggered the callback
3063 * The time it was triggered
3065 * The GstClockID that expired
3067 * user data passed in the async_wait call
3069 * TRUE or FALSE (currently unused)
3071 // gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time, GstClockID id, gpointer user_data);
3072 public typedef extern(C
) int function (GstClock
*, GstClockTime
, GstClockID
, void*) GstClockCallback
;
3075 * Function to filter out entries in the index.
3077 * The index being queried
3079 * The entry to be added.
3081 * User data passed to the function.
3083 * This function should return TRUE if the entry is to be added
3084 * to the index, FALSE otherwise.
3086 // gboolean (*GstIndexFilter) (GstIndex *index, GstIndexEntry *entry, gpointer user_data);
3087 public typedef extern(C
) int function (GstIndex
*, GstIndexEntry
*, void*) GstIndexFilter
;
3090 * Function to resolve ids to writer descriptions.
3092 * the index being queried.
3094 * The object that wants to write
3096 * A description of the writer.
3098 * user_data as registered
3100 * TRUE if an id could be assigned to the writer.
3102 // gboolean (*GstIndexResolver) (GstIndex *index, GstObject *writer, gchar **writer_string, gpointer user_data);
3103 public typedef extern(C
) int function (GstIndex
*, GstObject
*, gchar
**, void*) GstIndexResolver
;
3106 * The function that will be called when a GList iterator is freed. The
3107 * owner of the GList iterator can then clean up its resources.
3109 * the owner of the iterator
3111 // void (*GstIteratorDisposeFunction) (gpointer owner);
3112 public typedef extern(C
) void function (void*) GstIteratorDisposeFunction
;
3115 * The function that will be called when the next element of the iterator
3116 * should be retrieved.
3117 * Implementors of a GstIterator should implement this
3118 * function and pass it to the constructor of the custom iterator.
3119 * The function will be called with the iterator lock held.
3123 * a pointer to hold the next item
3125 * the result of the operation.
3127 // GstIteratorResult (*GstIteratorNextFunction) (GstIterator *it, gpointer *result);
3128 public typedef extern(C
) GstIteratorResult
function (GstIterator
*, gpointer
*) GstIteratorNextFunction
;
3131 * The function that will be called after the next item of the iterator
3132 * has been retrieved. This function will typically increase the refcount
3133 * of the item or make a copy.
3134 * Implementors of a GstIterator should implement this
3135 * function and pass it to the constructor of the custom iterator.
3136 * The function will be called with the iterator lock held.
3140 * the item being retrieved.
3142 * the result of the operation.
3144 // GstIteratorItem (*GstIteratorItemFunction) (GstIterator *it, gpointer item);
3145 public typedef extern(C
) GstIteratorItem
function (GstIterator
*, void*) GstIteratorItemFunction
;
3148 * This function will be called whenever a concurrent update happened
3149 * to the iterated datastructure. The implementor of the iterator should
3150 * restart the iterator from the beginning and clean up any state it might
3152 * Implementors of a GstIterator should implement this
3153 * function and pass it to the constructor of the custom iterator.
3154 * The function will be called with the iterator lock held.
3158 // void (*GstIteratorResyncFunction) (GstIterator *it);
3159 public typedef extern(C
) void function (GstIterator
*) GstIteratorResyncFunction
;
3162 * This function will be called when the iterator is freed.
3163 * Implementors of a GstIterator should implement this
3164 * function and pass it to the constructor of the custom iterator.
3165 * The function will be called with the iterator lock held.
3169 // void (*GstIteratorFreeFunction) (GstIterator *it);
3170 public typedef extern(C
) void function (GstIterator
*) GstIteratorFreeFunction
;
3173 * A function to be passed to gst_iterator_fold().
3177 * a GValue collecting the result
3179 * data passed to gst_iterator_fold()
3181 * TRUE if the fold should continue, FALSE if it should stop.
3183 // gboolean (*GstIteratorFoldFunction) (gpointer item, GValue *ret, gpointer user_data);
3184 public typedef extern(C
) int function (void*, GValue
*, void*) GstIteratorFoldFunction
;
3187 * Virtual function prototype for methods to create copies of instances.
3189 * MiniObject to copy
3191 * reference to cloned instance.
3193 // GstMiniObject* (*GstMiniObjectCopyFunction) (const GstMiniObject *obj);
3194 public typedef extern(C
) GstMiniObject
* function (GstMiniObject
*) GstMiniObjectCopyFunction
;
3197 * Virtual function prototype for methods to free ressources used by
3198 * mini-objects. Subclasses of the mini object are allowed to revive the
3199 * passed object by doing a gst_mini_object_ref(). If the object is not
3200 * revived after the finalize function, the memory associated with the
3203 * MiniObject to finalize
3205 // void (*GstMiniObjectFinalizeFunction) (GstMiniObject *obj);
3206 public typedef extern(C
) void function (GstMiniObject
*) GstMiniObjectFinalizeFunction
;
3209 * Callback used by gst_pad_set_blocked_async(). Gets called when the blocking
3210 * operation succeeds.
3212 * the GstPad that is blockend or unblocked.
3214 * blocking state for the pad
3216 * the gpointer to optional user data.
3218 // void (*GstPadBlockCallback) (GstPad *pad, gboolean blocked, gpointer user_data);
3219 public typedef extern(C
) void function (GstPad
*, int, void*) GstPadBlockCallback
;
3222 * Ask the sinkpad pad to allocate a buffer with offset, size and caps.
3223 * The result will be stored in buf.
3224 * The purpose of this function is to allocate a buffer that is optimal to
3225 * be processed by pad. The function is mostly overridden by elements that can
3226 * provide a hardware buffer in order to avoid additional memcpy operations.
3227 * The function can return a buffer that does not have caps, in which case the
3228 * upstream element requests a format change.
3229 * When this function returns anything else than GST_FLOW_OK, the buffer allocation
3230 * failed and buf does not contain valid data.
3231 * By default this function returns a new buffer of size and with caps containing
3232 * purely malloced data.
3236 * the desired offset of the buffer
3238 * the desired size of the buffer
3240 * the desired caps of the buffer
3242 * pointer to hold the allocated buffer.
3244 * GST_FLOW_OK if buf contains a valid buffer, any other return
3245 * value means buf does not hold a valid buffer.
3247 // GstFlowReturn (*GstPadBufferAllocFunction) (GstPad *pad, guint64 offset, guint size, GstCaps *caps, GstBuffer **buf);
3248 public typedef extern(C
) GstFlowReturn
function (GstPad
*, ulong, uint, GstCaps
*, GstBuffer
**) GstPadBufferAllocFunction
;
3251 * A function that will be called on sinkpads when chaining buffers.
3253 * the GstPad that performed the chain.
3255 * the GstBuffer that is chained.
3257 * GST_FLOW_OK for success
3259 // GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstBuffer *buffer);
3260 public typedef extern(C
) GstFlowReturn
function (GstPad
*, GstBuffer
*) GstPadChainFunction
;
3263 * Check if pad can be activated in pull mode.
3264 * This function will be deprecated after 0.10; use the seeking query to check
3265 * if a pad can support random access.
3269 * TRUE if the pad can operate in pull mode.
3271 // gboolean (*GstPadCheckGetRangeFunction) (GstPad *pad);
3272 public typedef extern(C
) int function (GstPad
*) GstPadCheckGetRangeFunction
;
3275 * This function will be called on sourcepads when a peer element
3276 * request a buffer at the specified offset and length. If this function
3277 * returns GST_FLOW_OK, the result buffer will be stored in buffer. The
3278 * contents of buffer is invalid for any other return value.
3280 * the GstPad to perform the getrange on.
3282 * the offset of the range
3284 * the length of the range
3286 * a memory location to hold the result buffer
3288 * GST_FLOW_OK for success
3290 // GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, guint64 offset, guint length, GstBuffer **buffer);
3291 public typedef extern(C
) GstFlowReturn
function (GstPad
*, ulong, uint, GstBuffer
**) GstPadGetRangeFunction
;
3294 * Function signature to handle an event for the pad.
3296 * the GstPad to handle the event.
3298 * the GstEvent to handle.
3300 * TRUE if the pad could handle the event.
3302 // gboolean (*GstPadEventFunction) (GstPad *pad, GstEvent *event);
3303 public typedef extern(C
) int function (GstPad
*, GstEvent
*) GstPadEventFunction
;
3306 * Function signature to handle a new link on the pad.
3308 * the GstPad that is linked.
3310 * the peer GstPad of the link
3312 * the result of the link with the specified peer.
3314 // GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, GstPad *peer);
3315 public typedef extern(C
) GstPadLinkReturn
function (GstPad
*, GstPad
*) GstPadLinkFunction
;
3318 * Function signature to handle a unlinking the pad prom its peer.
3320 * the GstPad that is linked.
3322 // void (*GstPadUnlinkFunction) (GstPad *pad);
3323 public typedef extern(C
) void function (GstPad
*) GstPadUnlinkFunction
;
3326 * Check if pad can accept caps. By default this function will see if caps
3327 * intersect with the result from gst_pad_get_caps() by can be overridden to
3328 * perform extra checks.
3330 * the GstPad to check
3332 * the GstCaps to check
3334 * TRUE if the caps can be accepted by the pad.
3336 // gboolean (*GstPadAcceptCapsFunction) (GstPad *pad, GstCaps *caps);
3337 public typedef extern(C
) int function (GstPad
*, GstCaps
*) GstPadAcceptCapsFunction
;
3340 * Returns a copy of the capabilities of the specified pad. By default this
3341 * function will return the pad template capabilities, but can optionally
3342 * be overridden by elements.
3344 * the GstPad to get the capabilities of.
3346 * a newly allocated copy GstCaps of the pad.
3348 // GstCaps* (*GstPadGetCapsFunction) (GstPad *pad);
3349 public typedef extern(C
) GstCaps
* function (GstPad
*) GstPadGetCapsFunction
;
3352 * Set caps on pad. By default this function updates the caps of the
3353 * pad but the function can be overriden by elements to perform extra
3354 * actions or verifications.
3356 * the GstPad to set the capabilities of.
3358 * the GstCaps to set
3360 * TRUE if the caps could be set on the pad.
3362 // gboolean (*GstPadSetCapsFunction) (GstPad *pad, GstCaps *caps);
3363 public typedef extern(C
) int function (GstPad
*, GstCaps
*) GstPadSetCapsFunction
;
3366 * Given possibly unfixed caps caps, let pad use its default prefered
3367 * format to make a fixed caps. caps should be writable. By default this
3368 * function will pick the first value of any ranges or lists in the caps but
3369 * elements can override this function to perform other behaviour.
3373 * the GstCaps to fixate
3375 // void (*GstPadFixateCapsFunction) (GstPad *pad, GstCaps *caps);
3376 public typedef extern(C
) void function (GstPad
*, GstCaps
*) GstPadFixateCapsFunction
;
3379 * This function is called when the pad is activated during the element
3380 * READY to PAUSED state change. By default this function will call the
3381 * activate function that puts the pad in push mode but elements can
3382 * override this function to activate the pad in pull mode if they wish.
3386 * TRUE if the pad could be activated.
3388 // gboolean (*GstPadActivateFunction) (GstPad *pad);
3389 public typedef extern(C
) int function (GstPad
*) GstPadActivateFunction
;
3392 * The prototype of the push and pull activate functions.
3396 * activate or deactivate the pad.
3398 * TRUE if the pad could be activated or deactivated.
3400 // gboolean (*GstPadActivateModeFunction) (GstPad *pad, gboolean active);
3401 public typedef extern(C
) int function (GstPad
*, int) GstPadActivateModeFunction
;
3404 * The signature of the query function.
3406 * the GstPad to query.
3408 * the GstQuery object to execute
3410 * TRUE if the query could be performed.
3412 // gboolean (*GstPadQueryFunction) (GstPad *pad, GstQuery *query);
3413 public typedef extern(C
) int function (GstPad
*, GstQuery
*) GstPadQueryFunction
;
3416 * The signature of the query types function.
3420 * a constant array of query types
3422 // const GstQueryType* (*GstPadQueryTypeFunction) (GstPad *pad);
3423 public typedef extern(C
) GstQueryType
* function (GstPad
*) GstPadQueryTypeFunction
;
3426 * The signature of the internal pad link function.
3428 * The GstPad to query.
3430 * a newly allocated GList of pads that are linked to the given pad on
3431 * the inside of the parent element.
3432 * The caller must call g_list_free() on it after use.
3434 // GList* (*GstPadIntLinkFunction) (GstPad *pad);
3435 public typedef extern(C
) GList
* function (GstPad
*) GstPadIntLinkFunction
;
3438 * A dispatcher function is called for all internally linked pads, see
3439 * gst_pad_dispatcher().
3441 * the GstPad that is dispatched.
3443 * the gpointer to optional user data.
3445 * TRUE if the dispatching procedure has to be stopped.
3447 // gboolean (*GstPadDispatcherFunction) (GstPad *pad, gpointer data);
3448 public typedef extern(C
) int function (GstPad
*, void*) GstPadDispatcherFunction
;
3451 * A plugin should provide a pointer to a function of this type in the
3452 * plugin_desc struct.
3453 * This function will be called by the loader at startup.
3455 * The plugin object that can be used to register GstPluginFeatures for this plugin.
3457 * TRUE if plugin initialised successfully
3459 // gboolean (*GstPluginInitFunc) (GstPlugin *plugin);
3460 public typedef extern(C
) int function (GstPlugin
*) GstPluginInitFunc
;
3463 * A function that can be used with e.g. gst_registry_plugin_filter()
3464 * to get a list of plugins that match certain criteria.
3466 * the plugin to check
3468 * the user_data that has been passed on e.g. gst_registry_plugin_filter()
3470 * TRUE for a positive match, FALSE otherwise
3472 // gboolean (*GstPluginFilter) (GstPlugin *plugin, gpointer user_data);
3473 public typedef extern(C
) int function (GstPlugin
*, void*) GstPluginFilter
;
3476 * A function that can be used with e.g. gst_registry_feature_filter()
3477 * to get a list of pluginfeature that match certain criteria.
3479 * the pluginfeature to check
3481 * the user_data that has been passed on e.g.
3482 * gst_registry_feature_filter()
3484 * TRUE for a positive match, FALSE otherwise
3486 // gboolean (*GstPluginFeatureFilter) (GstPluginFeature *feature, gpointer user_data);
3487 public typedef extern(C
) int function (GstPluginFeature
*, void*) GstPluginFeatureFilter
;
3490 * A function that will be called in gst_structure_foreach(). The function may
3493 * the GQuark of the field name
3495 * the GValue of the field
3499 * TRUE if the foreach operation should continue, FALSE if
3500 * the foreach operation should stop with FALSE.
3502 // gboolean (*GstStructureForeachFunc) (GQuark field_id, const GValue *value, gpointer user_data);
3503 public typedef extern(C
) int function (GQuark
, GValue
*, void*) GstStructureForeachFunc
;
3506 * A function that will be called in gst_structure_map_in_place(). The function
3509 * the GQuark of the field name
3511 * the GValue of the field
3515 * TRUE if the map operation should continue, FALSE if
3516 * the map operation should stop with FALSE.
3518 // gboolean (*GstStructureMapFunc) (GQuark field_id, GValue *value, gpointer user_data);
3519 public typedef extern(C
) int function (GQuark
, GValue
*, void*) GstStructureMapFunc
;
3522 * A function that will be called in gst_tag_list_foreach(). The function may
3523 * not modify the tag list.
3527 * a name of a tag in list
3531 // void (*GstTagForeachFunc) (const GstTagList *list, const gchar *tag, gpointer user_data);
3532 public typedef extern(C
) void function (GstTagList
*, char[], void*) GstTagForeachFunc
;
3535 * A function for merging multiple values of a tag used when registering
3538 * the destination GValue
3542 // void (*GstTagMergeFunc) (GValue *dest, const GValue *src);
3543 public typedef extern(C
) void function (GValue
*, GValue
*) GstTagMergeFunc
;
3546 * A function that will repeadedly be called in the thread created by
3549 * user data passed to the function
3551 // void (*GstTaskFunction) (void *data);
3552 public typedef extern(C
) void function (void*) GstTaskFunction
;
3555 * A function that will be called by typefinding.
3557 * A GstTypeFind structure
3559 * optionnal data to pass to the function
3561 // void (*GstTypeFindFunction) (GstTypeFind *find, gpointer data);
3562 public typedef extern(C
) void function (GstTypeFind
*, void*) GstTypeFindFunction
;