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 /***** default padding of structures *****/
31 const long GST_PADDING
= 4;
32 //#define GST_PADDING_INIT {0}
34 /***** padding for very extensible base classes *****/
35 const long GST_PADDING_LARGE
= 20;
37 //Hand added, these might be clean to define as GstClockTimes:
39 //#define G_USEC_PER_SEC 1000000 //This should be in glib...
40 const ulong G_USEC_PER_SEC
= 1000000uL;
41 //#define GST_SECOND (G_USEC_PER_SEC * G_GINT64_CONSTANT (1000))
42 const ulong GST_SECOND
= (G_USEC_PER_SEC
* 1000uL);
44 public alias GST_SECOND SECOND
;
46 //This one is an undefined GstClockTime. How can this be ulong???
47 //I guess it should be long...???
48 //#define GST_CLOCK_TIME_NONE ((GstClockTime) -1)
49 const long GST_CLOCK_TIME_NONE
= -1L;
50 public alias GST_CLOCK_TIME_NONE CLOCK_TIME_NONE
;
55 * typedef guint64 GstClockTime;
56 * A datatype to hold a time, measured in nanoseconds.
58 public alias ulong GstClockTime
;
61 * typedef gint64 GstClockTimeDiff;
62 * A datatype to hold a timedifference, measured in nanoseconds.
64 public alias long GstClockTimeDiff
;
67 * typedef gpointer GstClockID;
68 * A datatype to hold the handle to an outstanding sync or async clock callback.
70 public alias void* GstClockID
;
73 * typedef GstStructure GstTagList;
74 * Opaque GstTagList data structure.
76 public alias GstStructure GstTagList
;
79 * The standard flags that an gstobject may have.
80 * GST_OBJECT_DISPOSING
82 public enum GstObjectFlags
89 alias GstObjectFlags ObjectFlags
;
93 * The standard flags that an element may have.
94 * GST_ELEMENT_LOCKED_STATE
96 public enum GstElementFlags
98 LOCKED_STATE
= (GstObjectFlags
.FLAG_LAST
<< 0),
99 IS_SINK
= (GstObjectFlags
.FLAG_LAST
<< 1),
100 UNPARENTING
= (GstObjectFlags
.FLAG_LAST
<< 2),
102 FLAG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 16)
104 alias GstElementFlags ElementFlags
;
108 * GstBinFlags are a set of flags specific to bins. Most are set/used
109 * internally. They can be checked using the GST_OBJECT_FLAG_IS_SET() macro,
110 * and (un)set using GST_OBJECT_FLAG_SET() and GST_OBJECT_FLAG_UNSET().
113 public enum GstBinFlags
116 FLAG_LAST
= (GstElementFlags
.FLAG_LAST
<< 5)
118 alias GstBinFlags BinFlags
;
121 * Flags for the padtemplate
122 * GST_MINI_OBJECT_FLAG_READONLY
124 public enum GstMiniObjectFlags
130 alias GstMiniObjectFlags MiniObjectFlags
;
133 * A set of buffer flags used to describe properties of a GstBuffer.
134 * GST_BUFFER_FLAG_READONLY
136 public enum GstBufferFlag
138 FLAG_READONLY
= GstMiniObjectFlags
.READONLY
,
139 FLAG_PREROLL
= (GstObjectFlags
.FLAG_LAST
<< 0),
140 FLAG_DISCONT
= (GstObjectFlags
.FLAG_LAST
<< 1),
141 FLAG_IN_CAPS
= (GstObjectFlags
.FLAG_LAST
<< 2),
142 FLAG_GAP
= (GstObjectFlags
.FLAG_LAST
<< 3),
143 FLAG_DELTA_UNIT
= (GstObjectFlags
.FLAG_LAST
<< 4),
145 FLAG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 8)
147 alias GstBufferFlag BufferFlag
;
150 * The standard flags that a bus may have.
153 public enum GstBusFlags
155 USHING
= (GstObjectFlags
.FLAG_LAST
<< 0),
157 AG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 1)
159 alias GstBusFlags BusFlags
;
162 * The result values for a GstBusSyncHandler.
165 public enum GstBusSyncReply
171 alias GstBusSyncReply BusSyncReply
;
174 * Extra flags for a caps.
177 public enum GstCapsFlags
181 alias GstCapsFlags CapsFlags
;
184 * The type of the clock entry
185 * GST_CLOCK_ENTRY_SINGLE
187 public enum GstClockEntryType
192 alias GstClockEntryType ClockEntryType
;
195 * The return value of a clock operation.
198 public enum GstClockReturn
208 alias GstClockReturn ClockReturn
;
211 * The capabilities of this clock
212 * GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC
214 public enum GstClockFlags
216 CAN_DO_SINGLE_SYNC
= (GstObjectFlags
.FLAG_LAST
<< 0),
217 CAN_DO_SINGLE_ASYNC
= (GstObjectFlags
.FLAG_LAST
<< 1),
218 CAN_DO_PERIODIC_SYNC
= (GstObjectFlags
.FLAG_LAST
<< 2),
219 CAN_DO_PERIODIC_ASYNC
= (GstObjectFlags
.FLAG_LAST
<< 3),
220 CAN_SET_RESOLUTION
= (GstObjectFlags
.FLAG_LAST
<< 4),
221 CAN_SET_MASTER
= (GstObjectFlags
.FLAG_LAST
<< 5),
223 LAST
= (GstObjectFlags
.FLAG_LAST
<< 8),
225 alias GstClockFlags ClockFlags
;
228 * The posible states an element can be in.
229 * GST_STATE_VOID_PENDING
239 alias GstState State
;
242 * The different (interesting) state changes that are passed to the
243 * state change functions of elements.
244 * GST_STATE_CHANGE_NULL_TO_READY
246 public enum GstStateChange
248 NULL_TO_READY
= (GstState
.NULL
<<3) | GstState
.READY
,
249 READY_TO_PAUSED
= (GstState
.READY
<<3) | GstState
.PAUSED
,
250 PAUSED_TO_PLAYING
= (GstState
.PAUSED
<<3) | GstState
.PLAYING
,
251 PLAYING_TO_PAUSED
= (GstState
.PLAYING
<<3) | GstState
.PAUSED
,
252 PAUSED_TO_READY
= (GstState
.PAUSED
<<3) | GstState
.READY
,
253 READY_TO_NULL
= (GstState
.READY
<<3) | GstState
.NULL
255 alias GstStateChange StateChange
;
258 * the possible return values from a state change function.
259 * GST_STATE_CHANGE_FAILURE
261 public enum GstStateChangeReturn
268 alias GstStateChangeReturn StateChangeReturn
;
271 * GstEventTypeFlags indicate the aspects of the different GstEventType
272 * values. You can get the type flags of a GstEventType with the
273 * gst_event_type_get_flags() function.
274 * GST_EVENT_TYPE_UPSTREAM
276 public enum GstEventTypeFlags
282 alias GstEventTypeFlags EventTypeFlags
;
285 * GstEventType lists the standard event types that can be sent in a pipeline.
286 * The custom event types can be used for private messages between elements
287 * that can't be expressed using normal
288 * GStreamer buffer passing semantics. Custom events carry an arbitrary
290 * Specific custom events are distinguished by the name of the structure.
294 public enum GstEventType
297 /+* bidirectional events +/
298 FLUSH_START
= 16 | GstEventTypeFlags
.UPSTREAM | GstEventTypeFlags
.DOWNSTREAM
,
299 FLUSH_STOP
= 32 | GstEventTypeFlags
.UPSTREAM | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
300 /+* downstream serialized events +/
301 EOS
= 80 | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
302 NEWSEGMENT
= 96 | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
303 TAG
= 112 | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
304 BUFFERSIZE
= 128 | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
305 /+* upstream events +/
306 QOS
= 240 | GstEventTypeFlags
.UPSTREAM
,
307 SEEK
= 256 | GstEventTypeFlags
.UPSTREAM
,
308 NAVIGATION
= 272 | GstEventTypeFlags
.UPSTREAM
,
309 /+* custom events start here +/
310 CUSTOM_UPSTREAM
= 512 | GstEventTypeFlags
.UPSTREAM
,
311 CUSTOM_DOWNSTREAM
= 512 | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
312 CUSTOM_DOWNSTREAM_OOB
= 512 | GstEventTypeFlags
.DOWNSTREAM
,
313 CUSTOM_BOTH
= 512 | GstEventTypeFlags
.UPSTREAM | GstEventTypeFlags
.DOWNSTREAM | GstEventTypeFlags
.SERIALIZED
,
314 CUSTOM_BOTH_OOB
= 512 | GstEventTypeFlags
.UPSTREAM | GstEventTypeFlags
.DOWNSTREAM
316 alias GstEventType EventType
;
318 /*public enum GstEventType
320 UNKNOWN = GST_EVENT_MAKE_TYPE (0, 0),
321 /+* bidirectional events +/
322 FLUSH_START = GST_EVENT_MAKE_TYPE (1, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM),
323 FLUSH_STOP = GST_EVENT_MAKE_TYPE (2, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
324 /+* downstream serialized events +/
325 EOS = GST_EVENT_MAKE_TYPE (5, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
326 NEWSEGMENT = GST_EVENT_MAKE_TYPE (6, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
327 TAG = GST_EVENT_MAKE_TYPE (7, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
328 BUFFERSIZE = GST_EVENT_MAKE_TYPE (8, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
329 /+* upstream events +/
330 QOS = GST_EVENT_MAKE_TYPE (15, GstEventTypeFlags.UPSTREAM),
331 SEEK = GST_EVENT_MAKE_TYPE (16, GstEventTypeFlags.UPSTREAM),
332 NAVIGATION = GST_EVENT_MAKE_TYPE (17, GstEventTypeFlags.UPSTREAM),
333 /+* custom events start here +/
334 CUSTOM_UPSTREAM = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.UPSTREAM),
335 CUSTOM_DOWNSTREAM = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
336 CUSTOM_DOWNSTREAM_OOB = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.DOWNSTREAM),
337 CUSTOM_BOTH = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
338 CUSTOM_BOTH_OOB = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM)
340 alias GstEventType EventType;
344 * The different types of seek events. When constructing a seek event, a format,
345 * a seek method and optional flags are to be provided. The seek event is then
346 * inserted into the graph with gst_pad_send_event() or
347 * gst_element_send_event().
350 public enum GstSeekType
357 /*GST_SEEK_TYPE_NONE = 0,
358 GST_SEEK_TYPE_CUR = 1,
359 GST_SEEK_TYPE_SET = 2,
360 GST_SEEK_TYPE_END = 3*/
362 alias GstSeekType SeekType
;
365 * Flags to be used with gst_element_seek() or gst_event_new_seek()
366 * A non flushing seek might take some time to perform as the currently
367 * playing data in the pipeline will not be cleared.
368 * An accurate seek might be slower for formats that don't have any indexes
369 * or timestamp markers in the stream. Specifying this flag might require a
370 * complete scan of the file in those cases.
371 * When performing a segment seek: after the playback of the segment completes,
372 * no EOS will be emmited by the element that performed the seek, but a
373 * SEGMENT_DONE message will be posted on the bus by the element. When this
374 * message is posted, it is possible to send a new seek event to continue
375 * playback. With this seek method it is possible to perform seemless looping
376 * or simple linear editing.
379 public enum GstSeekFlags
387 alias GstSeekFlags SeekFlags
;
390 * Standard predefined formats
391 * GST_FORMAT_UNDEFINED
393 public enum GstFormat
395 UNDEFINED
= 0, /+* must be first inn list +/
402 alias GstFormat Format
;
405 * Core errors are errors inside the core GStreamer library.
406 * GST_CORE_ERROR_FAILED
408 public enum GstCoreError
425 alias GstCoreError CoreError
;
428 * Library errors are for errors from the library being used by elements
429 * (initializing, finalizing, settings, ...)
430 * GST_LIBRARY_ERROR_FAILED
432 public enum GstLibraryError
442 alias GstLibraryError LibraryError
;
445 * Resource errors are for any resource used by an element:
446 * memory, files, network connections, process space, ...
447 * They're typically used by source and sink elements.
448 * GST_RESOURCE_ERROR_FAILED
450 public enum GstResourceError
468 alias GstResourceError ResourceError
;
471 * Stream errors are for anything related to the stream being processed:
472 * format errors, media type errors, ...
473 * They're typically used by decoders, demuxers, converters, ...
474 * GST_STREAM_ERROR_FAILED
476 public enum GstStreamError
491 alias GstStreamError StreamError
;
494 * The certainty of a group in the index.
497 public enum GstIndexCertainty
503 alias GstIndexCertainty IndexCertainty
;
506 * The different types of entries in the index.
509 public enum GstIndexEntryType
516 alias GstIndexEntryType IndexEntryType
;
519 * Specify the method to find an index entry in the index.
520 * GST_INDEX_LOOKUP_EXACT
522 public enum GstIndexLookupMethod
528 alias GstIndexLookupMethod IndexLookupMethod
;
531 * Flags for an association entry.
532 * GST_ASSOCIATION_FLAG_NONE
534 public enum GstAssocFlags
536 IATION_FLAG_NONE
= 0,
537 IATION_FLAG_KEY_UNIT
= (1 << 0),
538 IATION_FLAG_DELTA_UNIT
= (1 << 1),
539 /+* new flags should start here +/
540 IATION_FLAG_LAST
= (1 << 8)
542 alias GstAssocFlags AssocFlags
;
545 * The method used to resolve index writers
546 * GST_INDEX_RESOLVER_CUSTOM
548 public enum GstIndexResolverMethod
554 alias GstIndexResolverMethod IndexResolverMethod
;
557 * Flags for this index
560 public enum GstIndexFlags
562 WRITABLE
= (GstObjectFlags
.FLAG_LAST
<< 0),
563 READABLE
= (GstObjectFlags
.FLAG_LAST
<< 1),
564 FLAG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 8)
566 alias GstIndexFlags IndexFlags
;
569 * The result of a GstIteratorItemFunction.
570 * GST_ITERATOR_ITEM_SKIP
572 public enum GstIteratorItem
578 alias GstIteratorItem IteratorItem
;
581 * The result of gst_iterator_next().
584 public enum GstIteratorResult
591 alias GstIteratorResult IteratorResult
;
594 * The different message types that are available.
595 * GST_MESSAGE_UNKNOWN
597 public enum GstMessageType
// : ushort
605 BUFFERING
= (1 << 5),
606 STATE_CHANGED
= (1 << 6),
607 STATE_DIRTY
= (1 << 7),
608 STEP_DONE
= (1 << 8),
609 CLOCK_PROVIDE
= (1 << 9),
610 CLOCK_LOST
= (1 << 10),
611 NEW_CLOCK
= (1 << 11),
612 STRUCTURE_CHANGE
= (1 << 12),
613 STREAM_STATUS
= (1 << 13),
614 APPLICATION
= (1 << 14),
616 SEGMENT_START
= (1 << 16),
617 SEGMENT_DONE
= (1 << 17),
618 DURATION
= (1 << 18),
621 //alias GstMessageType MessageType;
624 * The direction of a pad.
627 public enum GstPadDirection
633 alias GstPadDirection PadDirection
;
639 public enum GstPadFlags
641 BLOCKED
= (GstObjectFlags
.FLAG_LAST
<< 0),
642 FLUSHING
= (GstObjectFlags
.FLAG_LAST
<< 1),
643 IN_GETCAPS
= (GstObjectFlags
.FLAG_LAST
<< 2),
644 IN_SETCAPS
= (GstObjectFlags
.FLAG_LAST
<< 3),
646 FLAG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 8)
648 alias GstPadFlags PadFlags
;
651 * Result values from gst_pad_link and friends.
654 public enum GstPadLinkReturn
657 WRONG_HIERARCHY
= -1,
659 WRONG_DIRECTION
= -3,
664 alias GstPadLinkReturn PadLinkReturn
;
667 * The result of passing data to a linked pad.
670 public enum GstFlowReturn
674 /+* expected failures +/
675 GST_FLOW_NOT_LINKED
= -1,
676 GST_FLOW_WRONG_STATE
= -2,
678 GST_FLOW_UNEXPECTED
= -3,
679 GST_FLOW_NOT_NEGOTIATED
= -4,
681 GST_FLOW_NOT_SUPPORTED
= -6
683 alias GstFlowReturn FlowReturn
;
686 * The status of a GstPad. After activating a pad, which usually happens when the
687 * parent element goes from READY to PAUSED, the GstActivateMode defines if the
688 * pad operates in push or pull mode.
691 public enum GstActivateMode
697 alias GstActivateMode ActivateMode
;
700 * Flags for the padtemplate
701 * GST_PAD_TEMPLATE_FIXED
703 public enum GstPadTemplateFlags
705 IXED
= (GstObjectFlags
.FLAG_LAST
<< 0),
707 LAG_LAST
= (GstObjectFlags
.FLAG_LAST
<< 4)
709 alias GstPadTemplateFlags PadTemplateFlags
;
712 * Indicates when this pad will become available.
715 public enum GstPadPresence
721 alias GstPadPresence PadPresence
;
724 * The different parsing errors that can occur.
725 * GST_PARSE_ERROR_SYNTAX
727 public enum GstParseError
733 COULD_NOT_SET_PROPERTY
,
737 alias GstParseError ParseError
;
741 * GST_PIPELINE_FLAG_FIXED_CLOCK
743 public enum GstPipelineFlags
745 FIXED_CLOCK
= (GstBinFlags
.FLAG_LAST
<< 0),
747 LAST
= (GstBinFlags
.FLAG_LAST
<< 4)
749 alias GstPipelineFlags PipelineFlags
;
752 * The plugin loading errors
753 * GST_PLUGIN_ERROR_MODULE
755 public enum GstPluginError
761 alias GstPluginError PluginError
;
764 * Element priority ranks. Defines the order in which the autoplugger (or
765 * similar rank-picking mechanisms) will choose this element over an alternative
766 * one with the same function.
767 * The rank is a unsigned integer ranging from 0 (GST_RANK_NONE) to 256
768 * (GST_RANK_PRIMARY). These constants serve as a rough guidiance for defining
769 * the rank of a GstPlugin using gst_plugin_feature_set_rank().
782 * Standard predefined Query types
785 public enum GstQueryType
791 JITTER
, /+* not inn draft-query, necessary? +/
798 alias GstQueryType QueryType
;
801 * The different tag merging modes.
802 * GST_TAG_MERGE_UNDEFINED
804 public enum GstTagMergeMode
816 alias GstTagMergeMode TagMergeMode
;
819 * Extra tag flags used when registering tags.
820 * GST_TAG_FLAG_UNDEFINED
822 public enum GstTagFlag
830 alias GstTagFlag TagFlag
;
833 * The different states a task can be in
836 public enum GstTaskState
842 alias GstTaskState TaskState
;
845 * The probability of the typefind function. Higher values have more certainty
846 * in doing a reliable typefind.
847 * GST_TYPE_FIND_MINIMUM
849 public enum GstTypeFindProbability
857 alias GstTypeFindProbability TypeFindProbability
;
862 * The GstBin base class. Subclasses can access these fields provided
866 public struct GstBin
;
867 // /+* our children, subclass are supposed to update these
868 // * fields to reflect their state with _Iterate*() +/
871 // uint childrenCookie;
877 // GstClock *providedClock;
878 // GstElement *clockProvider;
882 * Subclasses can override the add_element and remove_element to
883 * update the list of children in the bin.
884 * The handle_message method can be overriden to implement custom
886 * GstElementClassparent_class;
888 public struct GstBinClass
;
889 // GstElementClass parentClass;
890 // /+* virtual methods for subclasses +/
891 // int (*addElement) (GstBin *bin, GstElement *element);
892 // int (*removeElement) (GstBin *bin, GstElement *element);
893 // void (*handleMessage) (GstBin *bin, GstMessage *message);
898 * The structure of a GstBuffer. Use the associated macros to access the public
900 * GstMiniObjectmini_object;
902 public struct GstBuffer
;
903 // GstMiniObject miniObject;
904 // /+* pointer to data and its size +/
908 // GstClockTime timestamp;
909 // GstClockTime duration;
910 // /+* the media type of this buffer +/
912 // /+* media specific offset +/
920 * The opaque GstBus data structure.
922 public struct GstBus
;
927 * Object describing media types.
930 //public struct GstCaps;
931 public struct GstCaps
935 /*< public >*/ /* with COW */
939 /*< public >*/ /* read only */
946 gpointer _gst_reserved
[GST_PADDING
];
950 // /+* refcounting +/
952 // GstCapsFlags flags;
956 * Datastructure to initialize GstCaps from a string description usually
957 * used in conjunction with GST_STATIC_CAPS() and gst_static_caps_get() to
958 * instantiate a GstCaps.
961 public struct GstStaticCaps
;
969 public struct GstClock
;
973 * All pending timeouts or periodic notifies are converted into
977 public struct GstClockEntry
985 * GStreamer element abstract base class.
986 * GStaticRecMutex*state_lock;
988 public struct GstElement
;
989 // GStaticRecMutex *stateLock;
990 // /+* element state +/
993 // GstState currentState;
994 // GstState nextState;
995 // GstState pendingState;
996 // GstStateChangeReturn lastReturn;
998 // /+* allocated clock +/
1000 // GstClockTimeDiff baseTime; /+* NULL/READY: 0 - PAUSED: current time - PLAYING: difference to clock +/
1001 // /+* element pads, these lists can only be iterated while holding
1002 // * the LOCK or checking the cookie after each LOCK. +/
1005 // ushort numsrcpads;
1007 // ushort numsinkpads;
1013 * GStreamer element class. Override the vmethods to implement the element
1015 * GstObjectClassparent_class;
1017 public struct GstElementClass
;
1018 // GstObjectClass parentClass;
1019 // /+* the element details +/
1020 // GstElementDetails details;
1021 // /+* factory that the element was created from +/
1022 // GstElementFactory *elementfactory;
1023 // /+* templates for our pads +/
1024 // GList *padtemplates;
1025 // int numpadtemplates;
1026 // uint padTemplCookie;
1027 // /+* virtual methods for subclasses +/
1028 // /+* request/release pads +/
1029 // GstPad* (*requestNewPad) (GstElement *element, GstPadTemplate *templ, char* name);
1030 // void (*releasePad) (GstElement *element, GstPad *pad);
1031 // /+* state changes +/
1032 // GstStateChangeReturn (*getState) (GstElement * element, GstState * state,
1033 // GstState * pending, GstClockTime timeout);
1034 // GstStateChangeReturn (*setState) (GstElement *element, GstState state);
1035 // GstStateChangeReturn (*changeState) (GstElement *element, GstStateChange transition);
1037 // void (*setBus) (GstElement * element, GstBus * bus);
1038 // /+* set/get clocks +/
1039 // GstClock* (*provideClock) (GstElement *element);
1040 // int (*setClock) (GstElement *element, GstClock *clock);
1042 // GstIndex* (*getIndex) (GstElement *element);
1043 // void (*setIndex) (GstElement *element, GstIndex *index);
1044 // /+* query functions +/
1045 // int (*sendEvent) (GstElement *element, GstEvent *event);
1046 // GstQueryType* (*getQueryTypes) (GstElement *element);
1047 // int (*query) (GstElement *element, GstQuery *query);
1052 * The opaque GstElementFactory data structure.
1054 public struct GstElementFactory
;
1058 * This struct defines the public information about a GstElement. It contains
1059 * meta-data about the element that is mostly for the benefit of editors.
1060 * The klass member can be used by applications to filter elements based
1064 public struct GstElementDetails
1075 * GstMiniObjectmini_object;
1077 public struct GstEvent
;
1079 GstMiniObject miniObject;
1083 GstStructure *structure;
1088 * A format definition
1091 public struct GstFormatDefinition
;
1094 // char *description;
1100 * Opaque GstGhostPad structure.
1102 public struct GstGhostPad
;
1107 * Opaque GstIndex structure.
1109 public struct GstIndex
;
1113 * The basic element of an index.
1115 public struct GstIndexEntry
;
1119 * A group of related entries in an index.
1121 public struct GstIndexGroup
;
1125 * An association in an entry.
1128 public struct GstIndexAssociation
;
1129 // GstFormat format;
1135 * The GstIndexFactory object
1137 public struct GstIndexFactory
;
1142 * GstIterator base structure. The values of this structure are
1143 * protected for subclasses, use the methods to use the GstIterator.
1145 public struct GstIterator
;
1149 * Base class for refcounted lightweight objects.
1150 * GTypeInstanceinstance;
1152 public struct GstMiniObject
1154 GTypeInstance instanc
;
1155 //< public >// with COW
1156 int refcount
;//gint refcount;
1157 uint flags
;//guint flags;
1160 gpointer _gst_reserved
;
1166 * GStreamer base object class.
1169 public struct GstObject
;
1171 // GMutex *lock; /+* object LOCK +/
1172 // char *name; /+* object name +/
1173 // char *namePrefix; /+* used for debugging +/
1174 // GstObject *parent; /+* this object's parent, weak ref +/
1180 * The GstPad structure. Use the functions to update the variables.
1181 * gpointerelement_private;
1183 public struct GstPad
;
1184 // void* elementPrivate;
1185 // GstPadTemplate *padtemplate;
1186 // GstPadDirection direction;
1187 // /+* streaming recLock +/
1188 // GStaticRecMutex *streamRecLock;
1190 // GMutex *prerollLock;
1191 // GCond *prerollCond;
1192 // /+* block cond, mutex is from the object +/
1193 // GCond *blockCond;
1194 // GstPadBlockCallback blockCallback;
1196 // /+* the pad capabilities +/
1198 // GstPadGetCapsFunction getcapsfunc;
1199 // GstPadSetCapsFunction setcapsfunc;
1200 // GstPadAcceptCapsFunction acceptcapsfunc;
1201 // GstPadFixateCapsFunction fixatecapsfunc;
1202 // GstPadActivateFunction activatefunc;
1203 // GstPadActivateModeFunction activatepushfunc;
1204 // GstPadActivateModeFunction activatepullfunc;
1206 // GstPadLinkFunction linkfunc;
1207 // GstPadUnlinkFunction unlinkfunc;
1209 // void* schedPrivate;
1210 // /+* data transport functions +/
1211 // GstPadChainFunction chainfunc;
1212 // GstPadCheckGetRangeFunction checkgetrangefunc;
1213 // GstPadGetRangeFunction getrangefunc;
1214 // GstPadEventFunction eventfunc;
1215 // GstActivateMode mode;
1216 // /+* generic query method +/
1217 // GstPadQueryTypeFunction querytypefunc;
1218 // GstPadQueryFunction queryfunc;
1219 // /+* internal links +/
1220 // GstPadIntLinkFunction intlinkfunc;
1221 // GstPadBufferAllocFunction bufferallocfunc;
1222 // /+* whether to emit signals for have-data. counts number
1223 // * of handlers attached. +/
1224 // int doBufferSignals;
1225 // int doEventSignals;
1229 * Structure describing the GstStaticPadTemplate.
1230 * gchar*name_template;
1232 public struct GstStaticPadTemplate
;
1233 // char *nameTemplate;
1234 // GstPadDirection direction;
1235 // GstPadPresence presence;
1236 // GstStaticCaps staticCaps;
1241 * The padtemplate object.
1243 public struct GstPadTemplate
;
1248 * The GstPipeline structure.
1249 * GstClock*fixed_clock;
1251 public struct GstPipeline
;
1252 // GstClock *fixedClock; /+* fixed clock if any +/
1253 // GstClockTime streamTime;
1254 // GstClockTime delay;
1261 public struct GstPlugin
;
1265 * A plugins should export a variable of this type called plugin_desc. This plugin
1266 * loaded will use this variable to initialize the plugin.
1267 * gintmajor_version;
1269 public struct GstPluginDesc
;
1270 // int majorVersion;
1271 // int minorVersion;
1273 // char *description;
1274 // GstPluginInitFunc pluginInit;
1280 // void* _GstReserved[GST_PADDING];
1285 * Opaque GstPluginFeature structure.
1287 public struct GstPluginFeature
;
1291 * Structure used for filtering based on name and type.
1294 public struct GstTypeNameData
;
1301 * The GstQuery structure.
1302 * GstMiniObjectmini_object;
1304 public struct GstQuery
;
1305 // GstMiniObject miniObject;
1306 // GstQueryType type;
1307 // GstStructure *structure;
1311 * A Query Type definition
1312 * GstQueryTypevalue;
1314 public struct GstQueryTypeDefinition
;
1315 // GstQueryType value;
1317 // char *description;
1323 * Opaque GstRegistry structure.
1325 public struct GstRegistry
;
1330 * A helper structure that holds the configured region of
1331 * interest in a media file.
1334 public struct GstSegment
;
1337 // GstFormat format;
1338 // GstSeekFlags flags;
1345 // /+* API added 0.10.6 +/
1346 // double appliedRate;
1351 * The GstStructure object. Most fields are private.
1354 public struct GstStructure
;
1360 * GstMiniObjectmini_object;
1362 /*public struct GstMessage
1364 GstMiniObject mini_object;
1366 GstMessageType type;
1371 GstStructure* structure;
1374 public struct GstMessage
1376 GstMiniObject mini_object;
1378 GstMessageType type;
1382 GstStructure *structure;
1385 //This is needed so that there will be
1386 //no offsets in the struct.
1390 GstMiniObject mini_object
;
1392 /*< private > *//* with MESSAGE_LOCK */
1393 GMutex
* lock; /* lock and cond for async delivery */
1396 /*< public > *//* with COW */
1397 GstMessageType type
;//int type;
1398 ulong timestamp
;//guint64 timestamp;
1401 GstStructure
* structure
;
1404 gpointer _gst_reserved
[GST_PADDING
];
1409 * The default implementation of a GstClock that uses the system time.
1411 public struct GstSystemClock
;
1416 * Opaque GstTagSetter data structure.
1418 public struct GstTagSetter
;
1422 * GstTagSetterIFace interface.
1423 * GTypeInterfaceg_iface;
1425 public struct GstTagSetterIFace
;
1426 // GTypeInterface gIface;
1428 // /+* virtual table +/
1433 * The GstTask object.
1434 * GstTaskStatestate;
1436 public struct GstTask
;
1437 // GstTaskState state;
1439 // GStaticRecMutex *lock;
1440 // GstTaskFunction func;
1447 * Object that stores typefind callbacks. To use with GstTypeFindFactory.
1450 public struct GstTypeFind
;
1451 // /+* private to the caller of the typefind funct +/
1452 // byte * (* peek) (void* data,
1455 // void (* suggest) (void* data,
1456 // uint probability,
1460 // ulong (* getLength) (void* data);
1465 * Object that stores information about a typefind function.
1467 public struct GstTypeFindFactory
;
1474 public struct GstXML
;
1478 * Gets the list with children in a bin.
1483 // #define GST_BIN_CHILDREN(bin) (GST_BIN_CAST(bin)->children)
1486 * Gets the children cookie that watches the children list.
1491 // #define GST_BIN_CHILDREN_COOKIE(bin) (GST_BIN_CAST(bin)->children_cookie)
1494 * Gets the number of children in a bin.
1498 * The "element-added" signal
1499 * void user_function (GstBin *bin,
1500 * GstElement *element,
1501 * gpointer user_data) : Run first
1502 * Will be emitted after the element was added to the bin.
1506 * the GstElement that was added to the bin
1508 * user data set when the signal handler was connected.
1511 // #define GST_BIN_NUMCHILDREN(bin) (GST_BIN_CAST(bin)->numchildren)
1514 * A flags word containing GstBufferFlag flags set on this buffer.
1519 // #define GST_BUFFER_FLAGS(buf) GST_MINI_OBJECT_FLAGS(buf)
1522 * Gives the status of a specific flag on a buffer.
1526 * the GstBufferFlag to check.
1529 // #define GST_BUFFER_FLAG_IS_SET(buf,flag) GST_MINI_OBJECT_FLAG_IS_SET (buf, flag)
1532 * Sets a buffer flag on a buffer.
1536 * the GstBufferFlag to set.
1539 // #define GST_BUFFER_FLAG_SET(buf,flag) GST_MINI_OBJECT_FLAG_SET (buf, flag)
1542 * Clears a buffer flag.
1546 * the GstBufferFlag to clear.
1549 // #define GST_BUFFER_FLAG_UNSET(buf,flag) GST_MINI_OBJECT_FLAG_UNSET (buf, flag)
1552 * A pointer to the data element of this buffer.
1557 // #define GST_BUFFER_DATA(buf) (GST_BUFFER_CAST(buf)->data)
1560 * A pointer to any data allocated for this buffer using malloc(). If this is
1561 * non-NULL, this memory will be freed at the end of the buffer's lifecycle
1562 * (i.e. when its refcount becomes zero).
1567 // #define GST_BUFFER_MALLOCDATA(buf) (GST_BUFFER_CAST(buf)->malloc_data)
1570 * The size in bytes of the data in this buffer.
1575 // #define GST_BUFFER_SIZE(buf) (GST_BUFFER_CAST(buf)->size)
1578 * The timestamp in nanoseconds (as a GstClockTime) of the data in the buffer.
1579 * Value will be GST_CLOCK_TIME_NONE if the timestamp is unknown.
1584 // #define GST_BUFFER_TIMESTAMP(buf) (GST_BUFFER_CAST(buf)->timestamp)
1587 * The duration in nanoseconds (as a GstClockTime) of the data in the buffer.
1588 * Value will be GST_CLOCK_TIME_NONE if the duration is unknown.
1593 // #define GST_BUFFER_DURATION(buf) (GST_BUFFER_CAST(buf)->duration)
1596 * The caps for this buffer.
1601 // #define GST_BUFFER_CAPS(buf) (GST_BUFFER_CAST(buf)->caps)
1604 * The offset in the source file of the beginning of this buffer.
1609 // #define GST_BUFFER_OFFSET(buf) (GST_BUFFER_CAST(buf)->offset)
1612 * The offset in the source file of the end of this buffer.
1617 // #define GST_BUFFER_OFFSET_END(buf) (GST_BUFFER_CAST(buf)->offset_end)
1620 * Tests if the duration is known.
1625 // #define GST_BUFFER_DURATION_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (buffer)))
1628 * Tests if the timestamp is known.
1633 // #define GST_BUFFER_TIMESTAMP_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buffer)))
1636 * Tests if the start offset is known.
1641 // #define GST_BUFFER_OFFSET_IS_VALID(buffer) (GST_BUFFER_OFFSET (buffer) != GST_BUFFER_OFFSET_NONE)
1644 * Tests if the end offset is known.
1649 // #define GST_BUFFER_OFFSET_END_IS_VALID(buffer) (GST_BUFFER_OFFSET_END (buffer) != GST_BUFFER_OFFSET_NONE)
1652 * Decreases the refcount of the buffer. If the refcount reaches 0, the buffer
1653 * will be freed. If GST_BUFFER_MALLOCDATA() is non-NULL, this pointer will
1654 * also be freed at this time.
1659 // #define gst_buffer_unref(buf) gst_mini_object_unref (GST_MINI_OBJECT (buf))
1662 * A convenience function to set the data and size on a buffer.
1663 * This will replace any existing data pointer set on this buffer, but will
1664 * not change GST_BUFFER_MALLOCDATA(), if any. Callers should ensure that
1665 * GST_BUFFER_MALLOCDATA() is non-NULL, or should free that and set it to NULL.
1666 * No checks are done on the data or size arguments passed.
1670 * The data (a guint8 *) to set on the buffer.
1672 * The size (in bytes, as a guint) of the data being set.
1675 // #define gst_buffer_set_data(buf, data, size)
1678 * Create a copy of the given buffer. This will also make a newly allocated
1679 * copy of the data the source buffer contains.
1684 // #define gst_buffer_copy(buf) GST_BUFFER_CAST (gst_mini_object_copy (GST_MINI_OBJECT (buf)))
1687 * Tests if you can safely write data into a buffer's data array or validly
1688 * modify the caps and timestamp metadata. Metadata in a GstBuffer is always
1689 * writable, but it is only safe to change it when there is only one owner
1690 * of the buffer - ie, the refcount is 1.
1695 // #define gst_buffer_is_writable(buf) gst_mini_object_is_writable (GST_MINI_OBJECT (buf))
1698 * Makes a writable buffer from the given buffer. If the source buffer is
1699 * already writable, this will simply return the same buffer. A copy will
1700 * otherwise be made using gst_buffer_copy().
1705 // #define gst_buffer_make_writable(buf) GST_BUFFER_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT (buf)))
1708 * Modifies a pointer to a Gstbuffer to point to a different GstBuffer. The
1709 * modification is done atomically (so this is useful for ensuring thread safety
1710 * in some cases), and the reference counts are updated appropriately (the old
1711 * buffer is unreffed, the new is reffed).
1712 * Either nbuf or the GstBuffer pointed to by obuf may be NULL.
1714 * pointer to a pointer to a GstBuffer to be replaced.
1716 * pointer to a GstBuffer that will replace the buffer pointed to by
1720 // #define gst_buffer_replace(obuf,nbuf) gst_mini_object_replace ((GstMiniObject **)(obuf), GST_MINI_OBJECT (nbuf))
1723 * Get access to the reference count field of the caps
1728 // #define GST_CAPS_REFCOUNT(caps) ((GST_CAPS(caps))->refcount)
1731 * Get the reference count value of the caps.
1736 // #define GST_CAPS_REFCOUNT_VALUE(caps) (g_atomic_int_get ((GST_CAPS(caps))->refcount))
1739 * Convenience macro that checks if the number of structures in the given caps
1742 * the GstCaps instance to check
1745 // #define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1)
1749 * GST_DEBUG_CAPS is deprecated and should not be used in newly-written code. do not use anymore
1750 * Convenience macro for printing out the contents of caps with GST_DEBUG().
1752 * a string that should be prepended to the caps data.
1754 * the GstCaps instance to print
1757 // #define GST_DEBUG_CAPS(string, caps)
1760 * Creates a new GstCaps static caps from an input string.
1761 * This can be used in pad templates.
1763 * the string describing the caps
1766 // #define GST_STATIC_CAPS(string)
1769 * Tests if a given GstClockTime represents a valid defined time.
1771 * clock time to validate
1774 // #define GST_CLOCK_TIME_IS_VALID(time) (((GstClockTime)(time)) != GST_CLOCK_TIME_NONE)
1777 * Calculate a difference between two clock times as a GstClockTimeDiff.
1778 * The difference is calculated as e - s.
1785 // #define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((e) - (s))
1788 * Convert a GTimeVal to a GstClockTime.
1790 * the timeval to convert
1793 // #define GST_TIMEVAL_TO_TIME(tv) ((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND)
1796 * Note: on 32-bit systems, a timeval has a range of only 2^32 - 1 seconds,
1797 * which is about 68 years. Expect trouble if you want to schedule stuff
1798 * in your pipeline for 2038.
1799 * Convert a GstClockTime to a GTimeVal
1801 * The GstClockTime to convert
1803 * The target timeval
1806 // #define GST_TIME_TO_TIMEVAL(t,tv)
1809 * Convert a struct timespec (see man pselect) to a GstClockTime.
1811 * the timespec to convert
1814 // #define GST_TIMESPEC_TO_TIME(ts) ((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND)
1817 * Convert a GstClockTime to a struct timespec (see man pselect)
1819 * The GstClockTime to convert
1821 * The target timespec
1824 // #define GST_TIME_TO_TIMESPEC(t,ts)
1827 * Cast to a clock entry
1832 // #define GST_CLOCK_ENTRY(entry) ((GstClockEntry *)(entry))
1835 * Get the owner clock of the entry
1837 * the entry to query
1840 // #define GST_CLOCK_ENTRY_CLOCK(entry) ((entry)->clock)
1843 * Get the type of the clock entry
1845 * the entry to query
1848 // #define GST_CLOCK_ENTRY_TYPE(entry) ((entry)->type)
1851 * Get the requested time of this entry
1853 * the entry to query
1856 // #define GST_CLOCK_ENTRY_TIME(entry) ((entry)->time)
1859 * Get the interval of this periodic entry
1861 * the entry to query
1864 // #define GST_CLOCK_ENTRY_INTERVAL(entry) ((entry)->interval)
1867 * The status of the entry
1869 * the entry to query
1872 // #define GST_CLOCK_ENTRY_STATUS(entry) ((entry)->status)
1875 * Gets the GstClockFlags clock flags.
1877 * the clock to query
1880 // #define GST_CLOCK_FLAGS(clock) (GST_CLOCK(clock)->flags)
1883 * Signal that the entries in the clock have changed.
1885 * the clock to broadcast
1888 // #define GST_CLOCK_BROADCAST(clock) g_cond_broadcast(GST_CLOCK_COND(clock))
1891 * Gets the GCond that gets signaled when the entries of the clock
1894 * the clock to query
1897 // #define GST_CLOCK_COND(clock) (GST_CLOCK_CAST(clock)->entries_changed)
1900 * Wait on the clock until the entries changed or the specified timeout
1903 * the clock to wait on
1905 * a GTimeVal to wait.
1908 // #define GST_CLOCK_TIMED_WAIT(clock,tv) g_cond_timed_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock),tv)
1911 * Wait on the clock until the entries changed.
1913 * the clock to wait on
1916 // #define GST_CLOCK_WAIT(clock) g_cond_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock))
1919 * This macro returns the current GstState of the element.
1921 * a GstElement to return state for.
1924 // #define GST_STATE(elem) (GST_ELEMENT_CAST(elem)->current_state)
1927 * Given a current state cur and a target state pending, calculate the next (intermediate)
1930 * A starting GstState
1935 // #define GST_STATE_GET_NEXT(cur,pending) ((cur) + __GST_SIGN ((gint)(pending) - (gint)(cur)))
1938 * This macro returns the next GstState of the element.
1940 * a GstElement to return the next state for.
1943 // #define GST_STATE_NEXT(elem) (GST_ELEMENT_CAST(elem)->next_state)
1946 * This macro returns the currently pending GstState of the element.
1948 * a GstElement to return the pending state for.
1951 // #define GST_STATE_PENDING(elem) (GST_ELEMENT_CAST(elem)->pending_state)
1954 * This macro returns the last GstStateChangeReturn value.
1956 * a GstElement to return the last state result for.
1959 // #define GST_STATE_RETURN(elem) (GST_ELEMENT_CAST(elem)->last_return)
1962 * Given a current state cur and a next state next, calculate the associated
1963 * GstStateChange transition.
1970 // #define GST_STATE_TRANSITION(cur,next) (((cur)<<3)|(next))
1973 * Given a state transition trans, extract the current GstState.
1978 // #define GST_STATE_TRANSITION_CURRENT(trans) ((trans)>>3)
1981 * Given a state transition trans, extract the next GstState.
1986 // #define GST_STATE_TRANSITION_NEXT(trans) ((trans)0x7)
1989 * Get a reference to the state lock of elem.
1990 * This lock is used by the core. It is taken while getting or setting
1991 * the state, during state changes, and while finalizing.
1996 // #define GST_STATE_GET_LOCK(elem) (GST_ELEMENT_CAST(elem)->state_lock)
1999 * Get the conditional used to signal the completion of a state change.
2004 // #define GST_STATE_GET_COND(elem) (GST_ELEMENT_CAST(elem)->state_cond)
2007 * Gets the name of this element. Use only in core as this is not
2008 * ABI-compatible. Others use gst_element_get_name()
2010 * A GstElement to query
2013 // #define GST_ELEMENT_NAME(elem) (GST_OBJECT_NAME(elem))
2016 * Get the parent object of this element.
2018 * A GstElement to query
2021 // #define GST_ELEMENT_PARENT(elem) (GST_ELEMENT_CAST(GST_OBJECT_PARENT(elem)))
2024 * Get the message bus of this element.
2026 * A GstElement to query
2029 // #define GST_ELEMENT_BUS(elem) (GST_ELEMENT_CAST(elem)->bus)
2032 * Get the clock of this element
2034 * A GstElement to query
2037 // #define GST_ELEMENT_CLOCK(elem) (GST_ELEMENT_CAST(elem)->clock)
2040 * Get the pads of this elements.
2042 * A GstElement to query
2045 // #define GST_ELEMENT_PADS(elem) (GST_ELEMENT_CAST(elem)->pads)
2048 * Utility function that elements can use in case they encountered a fatal
2049 * data processing error. The pipeline will throw an error signal and the
2050 * application will be requested to stop further media processing.
2052 * the element that throws the error
2054 * like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)
2056 * error code defined for that domain (see GstGError)
2058 * the message to display (format string and args enclosed in
2061 * debugging information for the message (format string and args
2062 * enclosed in parentheses)
2065 // #define GST_ELEMENT_ERROR(el, domain, code, text, debug)
2068 * Utility function that elements can use in case they encountered a non-fatal
2069 * data processing problem. The pipeline will throw a warning signal and the
2070 * application will be informed.
2072 * the element that throws the error
2074 * like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)
2076 * error code defined for that domain (see GstGError)
2078 * the message to display (format string and args enclosed in
2081 * debugging information for the message (format string and args
2082 * enclosed in parentheses)
2085 // #define GST_ELEMENT_WARNING(el, domain, code, text, debug)
2088 * Check if the element is in the locked state and therefore will ignore state
2089 * changes from its parent object.
2091 * A GstElement to query
2094 // #define GST_ELEMENT_IS_LOCKED_STATE(elem) (GST_OBJECT_FLAG_IS_SET(elem,GST_ELEMENT_LOCKED_STATE))
2097 * Sets the name of the element, getting rid of the old name if there was one.
2099 * a GstElement to set the name of.
2104 // #define gst_element_set_name(elem,name) gst_object_set_name(GST_OBJECT_CAST(elem),name)
2107 * Gets the name of the element.
2109 * a GstElement to set the name of.
2112 // #define gst_element_get_name(elem) gst_object_get_name(GST_OBJECT_CAST(elem))
2115 * Sets the parent of an element.
2117 * a GstElement to set the parent of.
2119 * the new parent GstObject of the element.
2122 // #define gst_element_set_parent(elem,parent) gst_object_set_parent(GST_OBJECT_CAST(elem),parent)
2125 * Gets the parent of an element.
2127 * a GstElement to get the parent of.
2130 // #define gst_element_get_parent(elem) gst_object_get_parent(GST_OBJECT_CAST(elem))
2133 * Macro to initialize GstElementDetails.
2135 * long, english name
2137 * type of element, as hierarchy
2139 * what the element is about
2141 * who wrote this thing?
2144 // #define GST_ELEMENT_DETAILS(longname,klass,description,author)
2147 * Tests if element details are initialized.
2149 * the GstElementDetails to check
2152 // #define GST_IS_ELEMENT_DETAILS(details)
2155 * Get the GstEventType of the event.
2157 * the event to query
2160 // #define GST_EVENT_TYPE(event) (GST_EVENT_CAST(event)->type)
2163 * Get a constant string representation of the GstEventType of the event.
2165 * the event to query
2168 // #define GST_EVENT_TYPE_NAME(event) (gst_event_type_get_name(GST_EVENT_TYPE(event)))
2171 * Get the GstClockTime timestamp of the event. This is the time when the event
2174 * the event to query
2177 // #define GST_EVENT_TIMESTAMP(event) (GST_EVENT_CAST(event)->timestamp)
2180 * The source GstObject that generated this event.
2182 * the event to query
2185 // #define GST_EVENT_SRC(event) (GST_EVENT_CAST(event)->src)
2188 * Check if an event can travel downstream.
2190 * the event to query
2193 // #define GST_EVENT_IS_DOWNSTREAM(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_DOWNSTREAM)
2196 * Check if an event is serialized with the data stream.
2198 * the event to query
2201 // #define GST_EVENT_IS_SERIALIZED(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_SERIALIZED)
2204 * Check if an event can travel upstream.
2206 * the event to query
2209 // #define GST_EVENT_IS_UPSTREAM(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_UPSTREAM)
2212 * when making custom event types, use this macro with the num and
2215 * the event number to create
2220 // #define GST_EVENT_MAKE_TYPE(num,flags)
2222 int GST_EVENT_TYPE_SHIFT
= 4;
2225 * GST_EVENT_MAKE_TYPE:
2226 * @num: the event number to create
2227 * @flags: the event flags
2229 * when making custom event types, use this macro with the num and
2232 int GST_EVENT_MAKE_TYPE( int num
, int flags
)
2234 return (((num
) << GST_EVENT_TYPE_SHIFT
) |
(flags
));
2238 * Copy the event using the event specific copy function.
2243 // #define gst_event_copy(ev) GST_EVENT_CAST (gst_mini_object_copy (GST_MINI_OBJECT (ev)))
2246 * Decrease the refcount of an event, freeing it if the refcount reaches 0.
2248 * The event to refcount
2251 // #define gst_event_unref(ev) gst_mini_object_unref (GST_MINI_OBJECT (ev))
2254 * Modifies a pointer to a GstEvent to point to a different GstEvent. The
2255 * modification is done atomically (so this is useful for ensuring thread safety
2256 * in some cases), and the reference counts are updated appropriately (the old
2257 * event is unreffed, the new one is reffed).
2258 * Either new_event or the GstEvent pointed to by old_event may be NULL.
2260 * pointer to a pointer to a GstEvent to be replaced.
2262 * pointer to a GstEvent that will replace the event pointed to
2267 // #define gst_event_replace(old_event,new_event)
2270 * Get the number of associations in the entry.
2272 * The entry to query
2275 // #define GST_INDEX_NASSOCS(entry) ((entry)->data.assoc.nassocs)
2278 * Get the flags for this entry.
2280 * The entry to query
2283 // #define GST_INDEX_ASSOC_FLAGS(entry) ((entry)->data.assoc.flags)
2286 * Get the i-th format of the entry.
2288 * The entry to query
2293 // #define GST_INDEX_ASSOC_FORMAT(entry,i) ((entry)->data.assoc.assocs[(i)].format)
2296 * Get the i-th value of the entry.
2298 * The entry to query
2303 // #define GST_INDEX_ASSOC_VALUE(entry,i) ((entry)->data.assoc.assocs[(i)].value)
2306 * Get the format of the format entry
2308 * The entry to query
2311 // #define GST_INDEX_FORMAT_FORMAT(entry) ((entry)->data.format.format)
2314 * Get the key of the format entry
2316 * The entry to query
2319 // #define GST_INDEX_FORMAT_KEY(entry) ((entry)->data.format.key)
2322 * Get the description of the id entry
2324 * The entry to query
2327 // #define GST_INDEX_ID_DESCRIPTION(entry) ((entry)->data.id.description)
2330 * Check if the index can be read from
2332 * The index to check
2335 // #define GST_INDEX_IS_READABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_INDEX_READABLE))
2338 * Check if the index can be written to
2340 * The index to check
2343 // #define GST_INDEX_IS_WRITABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_INDEX_WRITABLE))
2346 * Macro to cast to a GstIterator
2348 * the GstIterator value
2351 // #define GST_ITERATOR(it) ((GstIterator*)(it))
2354 * Macro to get the lock protecting the datastructure being iterated.
2356 * the GstIterator to get the lock of
2359 // #define GST_ITERATOR_LOCK(it) (GST_ITERATOR(it)->lock)
2362 * Macro to get the cookie of a GstIterator. The cookie of the
2363 * iterator is the value of the master cookie when the iterator
2365 * Whenever the iterator is iterated, the value is compared to the
2366 * value of the master cookie. If they are different, a concurrent
2367 * modification happened to the iterator and a resync is needed.
2369 * the GstIterator to get the cookie of
2372 // #define GST_ITERATOR_COOKIE(it) (GST_ITERATOR(it)->cookie)
2375 * Macro to get a pointer to where the master cookie is stored. The
2376 * master cookie protects the structure being iterated and gets updated
2377 * whenever the datastructure changes.
2379 * the GstIterator to get the master cookie of
2382 // #define GST_ITERATOR_ORIG_COOKIE(it) (GST_ITERATOR(it)->master_cookie)
2385 * Get the object that posted message.
2390 // #define GST_MESSAGE_SRC(message) (GST_MESSAGE(message)->src)
2393 * Get the timestamp of message. This is the timestamp when the message
2399 // #define GST_MESSAGE_TIMESTAMP(message) (GST_MESSAGE(message)->timestamp)
2402 * Get the GstMessageType of message.
2407 // #define GST_MESSAGE_TYPE(message) (GST_MESSAGE(message)->type)
2410 * Get a constant string representation of the GstMessageType of message.
2416 // #define GST_MESSAGE_TYPE_NAME(message) gst_message_type_get_name(GST_MESSAGE_TYPE(message))
2419 * Creates a copy of the message. Returns a copy of the message.
2422 * the message to copy
2425 // #define gst_message_copy(msg) GST_MESSAGE (gst_mini_object_copy (GST_MINI_OBJECT (msg)))
2428 * Checks if a message is writable. If not, a writable copy is made and
2429 * returned. Returns a message (possibly a duplicate) that is writable.
2432 * the message to make writable
2435 // #define gst_message_make_writable(msg) GST_MESSAGE (gst_mini_object_make_writable (GST_MINI_OBJECT (msg)))
2438 * Convenience macro to decrease the reference count of the message, possibly freeing
2441 * the message to unref
2443 * GstBus, GstMiniObject, GstElement
2446 // #define gst_message_unref(msg) gst_mini_object_unref (GST_MINI_OBJECT (msg))
2449 * This macro returns the entire set of flags for the mini-object.
2451 * MiniObject to return flags for.
2454 // #define GST_MINI_OBJECT_FLAGS(obj) (GST_MINI_OBJECT(obj)->flags)
2457 * This macro checks to see if the given flag is set.
2459 * MiniObject to check for flags.
2464 // #define GST_MINI_OBJECT_FLAG_IS_SET(obj,flag) !!(GST_MINI_OBJECT_FLAGS (obj) (flag))
2467 * This macro sets the given bits.
2469 * MiniObject to set flag in.
2471 * Flag to set, can by any number of bits in guint32.
2474 // #define GST_MINI_OBJECT_FLAG_SET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) |= (flag))
2477 * This macro usets the given bits.
2479 * MiniObject to unset flag in.
2481 * Flag to set, must be a single bit in guint32.
2484 // #define GST_MINI_OBJECT_FLAG_UNSET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) = ~(flag))
2487 * Get access to the reference count field of the mini-object.
2492 // #define GST_MINI_OBJECT_REFCOUNT(obj) ((GST_MINI_OBJECT_CAST(obj))->refcount)
2495 * Get the reference count value of the mini-object.
2500 // #define GST_MINI_OBJECT_REFCOUNT_VALUE(obj) (g_atomic_int_get ((GST_MINI_OBJECT_CAST(obj))->refcount))
2503 * This macro returns the entire set of flags for the object.
2508 // #define GST_OBJECT_FLAGS(obj) (GST_OBJECT_CAST (obj)->flags)
2511 * This macro checks to see if the given flag is set.
2518 // #define GST_OBJECT_FLAG_IS_SET(obj,flag) ((GST_OBJECT_FLAGS (obj) (flag)) == (flag))
2521 * This macro sets the given bits.
2528 // #define GST_OBJECT_FLAG_SET(obj,flag) (GST_OBJECT_FLAGS (obj) |= (flag))
2531 * This macro usets the given bits.
2538 // #define GST_OBJECT_FLAG_UNSET(obj,flag) (GST_OBJECT_FLAGS (obj) = ~(flag))
2541 * Get the name of this object
2546 // #define GST_OBJECT_NAME(obj) (GST_OBJECT_CAST(obj)->name)
2549 * Get the parent of this object
2554 // #define GST_OBJECT_PARENT(obj) (GST_OBJECT_CAST(obj)->parent)
2557 * Check if the given object is beeing destroyed.
2562 // #define GST_OBJECT_IS_DISPOSING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_DISPOSING))
2565 * Check if the given object is floating (has no owner).
2570 // #define GST_OBJECT_IS_FLOATING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_FLOATING))
2573 * Get access to the reference count field of the object.
2578 // #define GST_OBJECT_REFCOUNT(obj) (((GObject*)(obj))->ref_count)
2581 * Get the reference count value of the object.
2586 // #define GST_OBJECT_REFCOUNT_VALUE(obj) g_atomic_int_get (GST_OBJECT_REFCOUNT(obj))
2589 * This macro will return the class lock used to protect deep_notify signal
2590 * emission on thread-unsafe glib versions (glib < 2.8).
2595 // #define GST_CLASS_GET_LOCK(obj) (GST_OBJECT_CLASS_CAST(obj)->lock)
2603 // #define GST_CLASS_LOCK(obj) (g_static_rec_mutex_lock(GST_CLASS_GET_LOCK(obj)))
2606 * Try to lock the class, returns TRUE if class could be locked.
2611 // #define GST_CLASS_TRYLOCK(obj) (g_static_rec_mutex_trylock(GST_CLASS_GET_LOCK(obj)))
2619 // #define GST_CLASS_UNLOCK(obj) (g_static_rec_mutex_unlock(GST_CLASS_GET_LOCK(obj)))
2622 * This macro will obtain a lock on the object, making serialization possible.
2623 * It blocks until the lock can be obtained.
2625 * a GstObject to lock
2628 // #define GST_OBJECT_LOCK(obj) g_mutex_lock(GST_OBJECT_GET_LOCK(obj))
2631 * This macro will try to obtain a lock on the object, but will return with
2632 * FALSE if it can't get it immediately.
2637 // #define GST_OBJECT_TRYLOCK(obj) g_mutex_trylock(GST_OBJECT_GET_LOCK(obj))
2640 * This macro releases a lock on the object.
2642 * a GstObject to unlock.
2645 // #define GST_OBJECT_UNLOCK(obj) g_mutex_unlock(GST_OBJECT_GET_LOCK(obj))
2648 * Acquire a reference to the mutex of this object.
2653 // #define GST_OBJECT_GET_LOCK(obj) (GST_OBJECT_CAST(obj)->lock)
2656 * Macro to test if the given GstPadLinkReturn value indicates a failed
2659 * the GstPadLinkReturn value
2662 // #define GST_PAD_LINK_FAILED(ret) ((ret) < GST_PAD_LINK_OK)
2665 * Macro to test if the given GstPadLinkReturn value indicates a successful
2668 * the GstPadLinkReturn value
2671 // #define GST_PAD_LINK_SUCCESSFUL(ret) ((ret) >= GST_PAD_LINK_OK)
2674 * Get a copy of the name of the pad. g_free() after usage.
2677 * the pad to get the name from
2680 // #define gst_pad_get_name(pad) gst_object_get_name (GST_OBJECT_CAST (pad))
2683 * Get the parent of pad. This function increases the refcount
2684 * of the parent object so you should gst_object_unref() it after usage.
2685 * Can return NULL if the pad did not have a parent.
2688 * the pad to get the parent of
2691 // #define gst_pad_get_parent(pad) gst_object_get_parent (GST_OBJECT_CAST (pad))
2694 * Get the stream lock of pad. The stream lock is protecting the
2695 * resources used in the data processing functions of pad.
2700 // #define GST_PAD_GET_STREAM_LOCK(pad) (GST_PAD_CAST(pad)->stream_rec_lock)
2703 * Lock the stream lock of pad.
2708 // #define GST_PAD_STREAM_LOCK(pad) (g_static_rec_mutex_lock(GST_PAD_GET_STREAM_LOCK(pad)))
2711 * Lock the stream lock of pad t times.
2715 * the number of times to recursively lock
2718 // #define GST_PAD_STREAM_LOCK_FULL(pad,t) (g_static_rec_mutex_lock_full(GST_PAD_GET_STREAM_LOCK(pad), t))
2721 * Try to Lock the stream lock of the pad, return TRUE if the lock could be
2727 // #define GST_PAD_STREAM_TRYLOCK(pad) (g_static_rec_mutex_trylock(GST_PAD_GET_STREAM_LOCK(pad)))
2730 * Unlock the stream lock of pad.
2735 // #define GST_PAD_STREAM_UNLOCK(pad) (g_static_rec_mutex_unlock(GST_PAD_GET_STREAM_LOCK(pad)))
2738 * Fully unlock the recursive stream lock of pad, return the number of times
2744 // #define GST_PAD_STREAM_UNLOCK_FULL(pad) (g_static_rec_mutex_unlock_full(GST_PAD_GET_STREAM_LOCK(pad)))
2747 * Macro to test if the given GstFlowReturn value indicates a fatal
2748 * error. This macro is mainly used in elements to decide when an error
2749 * message should be posted on the bus.
2751 * a GstFlowReturn value
2753 * The "caps" property
2754 * "caps" GstCaps : Read
2755 * The capabilities of the pad.
2758 // #define GST_FLOW_IS_FATAL(ret) ((ret) <= GST_FLOW_UNEXPECTED)
2761 * Convenience macro to fill the values of a GstStaticPadTemplate
2764 * the name template of pad
2766 * the GstPadDirection of the pad
2768 * the GstPadPresence of the pad
2770 * the GstStaticCaps of the pad
2773 // #define GST_STATIC_PAD_TEMPLATE(padname, dir, pres, caps)
2776 * Get the nametemplate of the padtemplate.
2778 * the template to query
2781 // #define GST_PAD_TEMPLATE_NAME_TEMPLATE(templ) (((GstPadTemplate *)(templ))->name_template)
2784 * Get the direction of the padtemplate.
2786 * the template to query
2789 // #define GST_PAD_TEMPLATE_DIRECTION(templ) (((GstPadTemplate *)(templ))->direction)
2792 * Get the presence of the padtemplate.
2794 * the template to query
2797 // #define GST_PAD_TEMPLATE_PRESENCE(templ) (((GstPadTemplate *)(templ))->presence)
2800 * Get a handle to the padtemplate GstCaps
2802 * the template to query
2805 // #define GST_PAD_TEMPLATE_CAPS(templ) (((GstPadTemplate *)(templ))->caps)
2808 * Check if the properties of the padtemplate are fixed
2810 * the template to query
2813 // #define GST_PAD_TEMPLATE_IS_FIXED(templ) (GST_OBJECT_FLAG_IS_SET(templ, GST_PAD_TEMPLATE_FIXED))
2816 * This macro needs to be used to define the entry point and meta data of a
2817 * plugin. One would use this macro to export a plugin, so that it can be used
2818 * by other applications
2820 * major version number of the gstreamer-core that plugin was compiled for
2822 * minor version number of the gstreamer-core that plugin was compiled for
2824 * short, but unique name of the plugin
2826 * information about the purpose of the plugin
2828 * function pointer to the plugin_init method with the signature of static gboolean plugin_init (GstPlugin * plugin).
2830 * full version string (e.g. VERSION from config.h)
2832 * under which licence the package has been released, e.g. GPL, LGPL.
2834 * the package-name (e.g. PACKAGE_NAME from config.h)
2836 * a description from where the package comes from (e.g. the homepage URL)
2839 // #define GST_PLUGIN_DEFINE(major,minor,name,description,init,version,license,package,origin)
2842 * This macro needs to be used to define the entry point and meta data of a
2843 * local plugin. One would use this macro to define a local plugin that can only
2844 * be used by the own application.
2846 * major version number of the gstreamer-core that plugin was compiled for
2848 * minor version number of the gstreamer-core that plugin was compiled for
2850 * short, but unique name of the plugin
2852 * information about the purpose of the plugin
2854 * function pointer to the plugin_init method with the signature of static gboolean plugin_init (GstPlugin * plugin).
2856 * full version string (e.g. VERSION from config.h)
2858 * under which licence the package has been released, e.g. GPL, LGPL.
2860 * the package-name (e.g. PACKAGE_NAME from config.h)
2862 * a description from where the package comes from (e.g. the homepage URL)
2865 // #define GST_PLUGIN_DEFINE_STATIC(major,minor,name,description,init,version,license,package,origin)
2868 * Get the name of the feature
2870 * The feature to query
2873 // #define GST_PLUGIN_FEATURE_NAME(feature) (GST_PLUGIN_FEATURE (feature)->name)
2876 * Get the GstQueryType of the query.
2878 * the query to query
2881 // #define GST_QUERY_TYPE(query) (((GstQuery*)(query))->type)
2884 * Get a constant string representation of the GstQueryType of the query.
2886 * the query to query
2890 // #define GST_QUERY_TYPE_NAME(query) (gst_query_type_get_name(GST_QUERY_TYPE(query)))
2893 * Increases the refcount of the given query by one.
2895 * a GstQuery to increase the refcount of.
2898 // #define gst_query_ref(q) GST_QUERY (gst_mini_object_ref (GST_MINI_OBJECT (q)))
2901 * Decreases the refcount of the query. If the refcount reaches 0, the query
2904 * a GstQuery to decrease the refcount of.
2907 // #define gst_query_unref(q) gst_mini_object_unref (GST_MINI_OBJECT (q))
2910 * Copies the given query using the copy function of the parent GstData
2913 * a GstQuery to copy.
2916 // #define gst_query_copy(q) GST_QUERY (gst_mini_object_copy (GST_MINI_OBJECT (q)))
2919 * Makes a writable query from the given query.
2921 * a GstQuery to make writable
2924 // #define gst_query_make_writable(q) GST_QUERY (gst_mini_object_make_writable (GST_MINI_OBJECT (q)))
2927 * Get the list of paths for the default registry.
2930 // #define gst_default_registry_get_path_list()
2933 * Add the plugin to the default registry.
2934 * The plugin-added signal will be emitted.
2939 // #define gst_default_registry_add_plugin(plugin)
2942 * Add the given path to the default registry. The syntax of the
2943 * path is specific to the registry. If the path has already been
2944 * added, do nothing.
2946 * the path to add to the registry
2949 // #define gst_default_registry_add_path(path)
2952 * Find the plugin with the given name in the default registry.
2953 * The plugin will be reffed; caller is responsible for unreffing.
2955 * the plugin name to find
2958 // #define gst_default_registry_find_plugin(name)
2961 * Find the pluginfeature with the given name and type in the default registry.
2963 * the pluginfeature name to find
2965 * the pluginfeature type to find
2968 // #define gst_default_registry_find_feature(name,type)
2971 * Get a copy of all plugins registered in the default registry.
2974 // #define gst_default_registry_get_plugin_list()
2977 * Runs a filter against all features of the plugins in the default registry
2978 * and returns a GList with the results.
2979 * If the first flag is set, only the first match is
2980 * returned (as a list with a single object).
2984 * only return first match
2986 * user data passed to the filter function
2988 * GstPlugin, GstPluginFeature
2991 // #define gst_default_registry_feature_filter(filter,first,user_data)
2994 * Send a broadcast signal to all waiting task conds
2999 // #define GST_TASK_BROADCAST(task) g_cond_breadcast(GST_TASK_GET_COND (task))
3002 * Get access to the cond of the task.
3004 * Task to get the cond of
3007 // #define GST_TASK_GET_COND(task) (GST_TASK_CAST(task)->cond)
3010 * Get access to the task lock.
3012 * Task to get the lock of
3015 // #define GST_TASK_GET_LOCK(task) (GST_TASK_CAST(task)->lock)
3018 * Signal the task cond
3023 // #define GST_TASK_SIGNAL(task) g_cond_signal(GST_TASK_GET_COND (task))
3026 * Get access to the state of the task.
3028 * Task to get the state of
3031 // #define GST_TASK_STATE(task) (GST_TASK_CAST(task)->state)
3034 * Wait for the task cond to be signalled
3039 // #define GST_TASK_WAIT(task) g_cond_wait(GST_TASK_GET_COND (task), GST_OBJECT_GET_LOCK (task))
3042 * Specifies the type of function passed to gst_bus_add_watch() or
3043 * gst_bus_add_watch_full(), which is called from the mainloop when a message
3044 * is available on the bus.
3045 * The message passed to the function will be unreffed after execution of this
3046 * function so it should not be freed in the function.
3047 * Note that this function is used as a GSourceFunc which means that returning
3048 * FALSE will remove the GSource from the mainloop.
3050 * the GstBus that sent the message
3054 * user data that has been given, when registering the handler
3056 * FALSE if the event source should be removed.
3058 // gboolean (*GstBusFunc) (GstBus *bus, GstMessage *message, gpointer data);
3059 public typedef extern(C
) int function (GstBus
*, GstMessage
*, void*) GstBusFunc
;
3062 * Handler will be invoked synchronously, when a new message has been injected
3063 * into the bus. This function is mostly used internally. Only one sync handler
3064 * can be attached to a given bus.
3065 * If the handler returns GST_BUS_DROP, it should unref the message, else the
3066 * message should not be unreffed by the sync handler.
3068 * the GstBus that sent the message
3072 * user data that has been given, when registering the handler
3074 * GstBusSyncReply stating what to do with the message
3076 // GstBusSyncReply (*GstBusSyncHandler) (GstBus *bus, GstMessage *message, gpointer data);
3077 public typedef extern(C
) GstBusSyncReply
function (GstBus
*, GstMessage
*, void*) GstBusSyncHandler
;
3080 * The function prototype of the callback.
3082 * The clock that triggered the callback
3084 * The time it was triggered
3086 * The GstClockID that expired
3088 * user data passed in the async_wait call
3090 * TRUE or FALSE (currently unused)
3092 // gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time, GstClockID id, gpointer user_data);
3093 public typedef extern(C
) int function (GstClock
*, GstClockTime
, GstClockID
, void*) GstClockCallback
;
3096 * Function to filter out entries in the index.
3098 * The index being queried
3100 * The entry to be added.
3102 * User data passed to the function.
3104 * This function should return TRUE if the entry is to be added
3105 * to the index, FALSE otherwise.
3107 // gboolean (*GstIndexFilter) (GstIndex *index, GstIndexEntry *entry, gpointer user_data);
3108 public typedef extern(C
) int function (GstIndex
*, GstIndexEntry
*, void*) GstIndexFilter
;
3111 * Function to resolve ids to writer descriptions.
3113 * the index being queried.
3115 * The object that wants to write
3117 * A description of the writer.
3119 * user_data as registered
3121 * TRUE if an id could be assigned to the writer.
3123 // gboolean (*GstIndexResolver) (GstIndex *index, GstObject *writer, gchar **writer_string, gpointer user_data);
3124 public typedef extern(C
) int function (GstIndex
*, GstObject
*, gchar
**, void*) GstIndexResolver
;
3127 * The function that will be called when a GList iterator is freed. The
3128 * owner of the GList iterator can then clean up its resources.
3130 * the owner of the iterator
3132 // void (*GstIteratorDisposeFunction) (gpointer owner);
3133 public typedef extern(C
) void function (void*) GstIteratorDisposeFunction
;
3136 * The function that will be called when the next element of the iterator
3137 * should be retrieved.
3138 * Implementors of a GstIterator should implement this
3139 * function and pass it to the constructor of the custom iterator.
3140 * The function will be called with the iterator lock held.
3144 * a pointer to hold the next item
3146 * the result of the operation.
3148 // GstIteratorResult (*GstIteratorNextFunction) (GstIterator *it, gpointer *result);
3149 public typedef extern(C
) GstIteratorResult
function (GstIterator
*, gpointer
*) GstIteratorNextFunction
;
3152 * The function that will be called after the next item of the iterator
3153 * has been retrieved. This function will typically increase the refcount
3154 * of the item or make a copy.
3155 * Implementors of a GstIterator should implement this
3156 * function and pass it to the constructor of the custom iterator.
3157 * The function will be called with the iterator lock held.
3161 * the item being retrieved.
3163 * the result of the operation.
3165 // GstIteratorItem (*GstIteratorItemFunction) (GstIterator *it, gpointer item);
3166 public typedef extern(C
) GstIteratorItem
function (GstIterator
*, void*) GstIteratorItemFunction
;
3169 * This function will be called whenever a concurrent update happened
3170 * to the iterated datastructure. The implementor of the iterator should
3171 * restart the iterator from the beginning and clean up any state it might
3173 * Implementors of a GstIterator should implement this
3174 * function and pass it to the constructor of the custom iterator.
3175 * The function will be called with the iterator lock held.
3179 // void (*GstIteratorResyncFunction) (GstIterator *it);
3180 public typedef extern(C
) void function (GstIterator
*) GstIteratorResyncFunction
;
3183 * This function will be called when the iterator is freed.
3184 * Implementors of a GstIterator should implement this
3185 * function and pass it to the constructor of the custom iterator.
3186 * The function will be called with the iterator lock held.
3190 // void (*GstIteratorFreeFunction) (GstIterator *it);
3191 public typedef extern(C
) void function (GstIterator
*) GstIteratorFreeFunction
;
3194 * A function to be passed to gst_iterator_fold().
3198 * a GValue collecting the result
3200 * data passed to gst_iterator_fold()
3202 * TRUE if the fold should continue, FALSE if it should stop.
3204 // gboolean (*GstIteratorFoldFunction) (gpointer item, GValue *ret, gpointer user_data);
3205 public typedef extern(C
) int function (void*, GValue
*, void*) GstIteratorFoldFunction
;
3208 * Virtual function prototype for methods to create copies of instances.
3210 * MiniObject to copy
3212 * reference to cloned instance.
3214 // GstMiniObject* (*GstMiniObjectCopyFunction) (const GstMiniObject *obj);
3215 public typedef extern(C
) GstMiniObject
* function (GstMiniObject
*) GstMiniObjectCopyFunction
;
3218 * Virtual function prototype for methods to free ressources used by
3219 * mini-objects. Subclasses of the mini object are allowed to revive the
3220 * passed object by doing a gst_mini_object_ref(). If the object is not
3221 * revived after the finalize function, the memory associated with the
3224 * MiniObject to finalize
3226 // void (*GstMiniObjectFinalizeFunction) (GstMiniObject *obj);
3227 public typedef extern(C
) void function (GstMiniObject
*) GstMiniObjectFinalizeFunction
;
3230 * Callback used by gst_pad_set_blocked_async(). Gets called when the blocking
3231 * operation succeeds.
3233 * the GstPad that is blockend or unblocked.
3235 * blocking state for the pad
3237 * the gpointer to optional user data.
3239 // void (*GstPadBlockCallback) (GstPad *pad, gboolean blocked, gpointer user_data);
3240 public typedef extern(C
) void function (GstPad
*, int, void*) GstPadBlockCallback
;
3243 * Ask the sinkpad pad to allocate a buffer with offset, size and caps.
3244 * The result will be stored in buf.
3245 * The purpose of this function is to allocate a buffer that is optimal to
3246 * be processed by pad. The function is mostly overridden by elements that can
3247 * provide a hardware buffer in order to avoid additional memcpy operations.
3248 * The function can return a buffer that does not have caps, in which case the
3249 * upstream element requests a format change.
3250 * When this function returns anything else than GST_FLOW_OK, the buffer allocation
3251 * failed and buf does not contain valid data.
3252 * By default this function returns a new buffer of size and with caps containing
3253 * purely malloced data.
3257 * the desired offset of the buffer
3259 * the desired size of the buffer
3261 * the desired caps of the buffer
3263 * pointer to hold the allocated buffer.
3265 * GST_FLOW_OK if buf contains a valid buffer, any other return
3266 * value means buf does not hold a valid buffer.
3268 // GstFlowReturn (*GstPadBufferAllocFunction) (GstPad *pad, guint64 offset, guint size, GstCaps *caps, GstBuffer **buf);
3269 public typedef extern(C
) GstFlowReturn
function (GstPad
*, ulong, uint, GstCaps
*, GstBuffer
**) GstPadBufferAllocFunction
;
3272 * A function that will be called on sinkpads when chaining buffers.
3274 * the GstPad that performed the chain.
3276 * the GstBuffer that is chained.
3278 * GST_FLOW_OK for success
3280 // GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstBuffer *buffer);
3281 public typedef extern(C
) GstFlowReturn
function (GstPad
*, GstBuffer
*) GstPadChainFunction
;
3284 * Check if pad can be activated in pull mode.
3285 * This function will be deprecated after 0.10; use the seeking query to check
3286 * if a pad can support random access.
3290 * TRUE if the pad can operate in pull mode.
3292 // gboolean (*GstPadCheckGetRangeFunction) (GstPad *pad);
3293 public typedef extern(C
) int function (GstPad
*) GstPadCheckGetRangeFunction
;
3296 * This function will be called on sourcepads when a peer element
3297 * request a buffer at the specified offset and length. If this function
3298 * returns GST_FLOW_OK, the result buffer will be stored in buffer. The
3299 * contents of buffer is invalid for any other return value.
3301 * the GstPad to perform the getrange on.
3303 * the offset of the range
3305 * the length of the range
3307 * a memory location to hold the result buffer
3309 * GST_FLOW_OK for success
3311 // GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, guint64 offset, guint length, GstBuffer **buffer);
3312 public typedef extern(C
) GstFlowReturn
function (GstPad
*, ulong, uint, GstBuffer
**) GstPadGetRangeFunction
;
3315 * Function signature to handle an event for the pad.
3317 * the GstPad to handle the event.
3319 * the GstEvent to handle.
3321 * TRUE if the pad could handle the event.
3323 // gboolean (*GstPadEventFunction) (GstPad *pad, GstEvent *event);
3324 public typedef extern(C
) int function (GstPad
*, GstEvent
*) GstPadEventFunction
;
3327 * Function signature to handle a new link on the pad.
3329 * the GstPad that is linked.
3331 * the peer GstPad of the link
3333 * the result of the link with the specified peer.
3335 // GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, GstPad *peer);
3336 public typedef extern(C
) GstPadLinkReturn
function (GstPad
*, GstPad
*) GstPadLinkFunction
;
3339 * Function signature to handle a unlinking the pad prom its peer.
3341 * the GstPad that is linked.
3343 // void (*GstPadUnlinkFunction) (GstPad *pad);
3344 public typedef extern(C
) void function (GstPad
*) GstPadUnlinkFunction
;
3347 * Check if pad can accept caps. By default this function will see if caps
3348 * intersect with the result from gst_pad_get_caps() by can be overridden to
3349 * perform extra checks.
3351 * the GstPad to check
3353 * the GstCaps to check
3355 * TRUE if the caps can be accepted by the pad.
3357 // gboolean (*GstPadAcceptCapsFunction) (GstPad *pad, GstCaps *caps);
3358 public typedef extern(C
) int function (GstPad
*, GstCaps
*) GstPadAcceptCapsFunction
;
3361 * Returns a copy of the capabilities of the specified pad. By default this
3362 * function will return the pad template capabilities, but can optionally
3363 * be overridden by elements.
3365 * the GstPad to get the capabilities of.
3367 * a newly allocated copy GstCaps of the pad.
3369 // GstCaps* (*GstPadGetCapsFunction) (GstPad *pad);
3370 public typedef extern(C
) GstCaps
* function (GstPad
*) GstPadGetCapsFunction
;
3373 * Set caps on pad. By default this function updates the caps of the
3374 * pad but the function can be overriden by elements to perform extra
3375 * actions or verifications.
3377 * the GstPad to set the capabilities of.
3379 * the GstCaps to set
3381 * TRUE if the caps could be set on the pad.
3383 // gboolean (*GstPadSetCapsFunction) (GstPad *pad, GstCaps *caps);
3384 public typedef extern(C
) int function (GstPad
*, GstCaps
*) GstPadSetCapsFunction
;
3387 * Given possibly unfixed caps caps, let pad use its default prefered
3388 * format to make a fixed caps. caps should be writable. By default this
3389 * function will pick the first value of any ranges or lists in the caps but
3390 * elements can override this function to perform other behaviour.
3394 * the GstCaps to fixate
3396 // void (*GstPadFixateCapsFunction) (GstPad *pad, GstCaps *caps);
3397 public typedef extern(C
) void function (GstPad
*, GstCaps
*) GstPadFixateCapsFunction
;
3400 * This function is called when the pad is activated during the element
3401 * READY to PAUSED state change. By default this function will call the
3402 * activate function that puts the pad in push mode but elements can
3403 * override this function to activate the pad in pull mode if they wish.
3407 * TRUE if the pad could be activated.
3409 // gboolean (*GstPadActivateFunction) (GstPad *pad);
3410 public typedef extern(C
) int function (GstPad
*) GstPadActivateFunction
;
3413 * The prototype of the push and pull activate functions.
3417 * activate or deactivate the pad.
3419 * TRUE if the pad could be activated or deactivated.
3421 // gboolean (*GstPadActivateModeFunction) (GstPad *pad, gboolean active);
3422 public typedef extern(C
) int function (GstPad
*, int) GstPadActivateModeFunction
;
3425 * The signature of the query function.
3427 * the GstPad to query.
3429 * the GstQuery object to execute
3431 * TRUE if the query could be performed.
3433 // gboolean (*GstPadQueryFunction) (GstPad *pad, GstQuery *query);
3434 public typedef extern(C
) int function (GstPad
*, GstQuery
*) GstPadQueryFunction
;
3437 * The signature of the query types function.
3441 * a constant array of query types
3443 // const GstQueryType* (*GstPadQueryTypeFunction) (GstPad *pad);
3444 public typedef extern(C
) GstQueryType
* function (GstPad
*) GstPadQueryTypeFunction
;
3447 * The signature of the internal pad link function.
3449 * The GstPad to query.
3451 * a newly allocated GList of pads that are linked to the given pad on
3452 * the inside of the parent element.
3453 * The caller must call g_list_free() on it after use.
3455 // GList* (*GstPadIntLinkFunction) (GstPad *pad);
3456 public typedef extern(C
) GList
* function (GstPad
*) GstPadIntLinkFunction
;
3459 * A dispatcher function is called for all internally linked pads, see
3460 * gst_pad_dispatcher().
3462 * the GstPad that is dispatched.
3464 * the gpointer to optional user data.
3466 * TRUE if the dispatching procedure has to be stopped.
3468 // gboolean (*GstPadDispatcherFunction) (GstPad *pad, gpointer data);
3469 public typedef extern(C
) int function (GstPad
*, void*) GstPadDispatcherFunction
;
3472 * A plugin should provide a pointer to a function of this type in the
3473 * plugin_desc struct.
3474 * This function will be called by the loader at startup.
3476 * The plugin object that can be used to register GstPluginFeatures for this plugin.
3478 * TRUE if plugin initialised successfully
3480 // gboolean (*GstPluginInitFunc) (GstPlugin *plugin);
3481 public typedef extern(C
) int function (GstPlugin
*) GstPluginInitFunc
;
3484 * A function that can be used with e.g. gst_registry_plugin_filter()
3485 * to get a list of plugins that match certain criteria.
3487 * the plugin to check
3489 * the user_data that has been passed on e.g. gst_registry_plugin_filter()
3491 * TRUE for a positive match, FALSE otherwise
3493 // gboolean (*GstPluginFilter) (GstPlugin *plugin, gpointer user_data);
3494 public typedef extern(C
) int function (GstPlugin
*, void*) GstPluginFilter
;
3497 * A function that can be used with e.g. gst_registry_feature_filter()
3498 * to get a list of pluginfeature that match certain criteria.
3500 * the pluginfeature to check
3502 * the user_data that has been passed on e.g.
3503 * gst_registry_feature_filter()
3505 * TRUE for a positive match, FALSE otherwise
3507 // gboolean (*GstPluginFeatureFilter) (GstPluginFeature *feature, gpointer user_data);
3508 public typedef extern(C
) int function (GstPluginFeature
*, void*) GstPluginFeatureFilter
;
3511 * A function that will be called in gst_structure_foreach(). The function may
3514 * the GQuark of the field name
3516 * the GValue of the field
3520 * TRUE if the foreach operation should continue, FALSE if
3521 * the foreach operation should stop with FALSE.
3523 // gboolean (*GstStructureForeachFunc) (GQuark field_id, const GValue *value, gpointer user_data);
3524 public typedef extern(C
) int function (GQuark
, GValue
*, void*) GstStructureForeachFunc
;
3527 * A function that will be called in gst_structure_map_in_place(). The function
3530 * the GQuark of the field name
3532 * the GValue of the field
3536 * TRUE if the map operation should continue, FALSE if
3537 * the map operation should stop with FALSE.
3539 // gboolean (*GstStructureMapFunc) (GQuark field_id, GValue *value, gpointer user_data);
3540 public typedef extern(C
) int function (GQuark
, GValue
*, void*) GstStructureMapFunc
;
3543 * A function that will be called in gst_tag_list_foreach(). The function may
3544 * not modify the tag list.
3548 * a name of a tag in list
3552 // void (*GstTagForeachFunc) (const GstTagList *list, const gchar *tag, gpointer user_data);
3553 public typedef extern(C
) void function (GstTagList
*, char[], void*) GstTagForeachFunc
;
3556 * A function for merging multiple values of a tag used when registering
3559 * the destination GValue
3563 // void (*GstTagMergeFunc) (GValue *dest, const GValue *src);
3564 public typedef extern(C
) void function (GValue
*, GValue
*) GstTagMergeFunc
;
3567 * A function that will repeadedly be called in the thread created by
3570 * user data passed to the function
3572 // void (*GstTaskFunction) (void *data);
3573 public typedef extern(C
) void function (void*) GstTaskFunction
;
3576 * A function that will be called by typefinding.
3578 * A GstTypeFind structure
3580 * optionnal data to pass to the function
3582 // void (*GstTypeFindFunction) (GstTypeFind *find, gpointer data);
3583 public typedef extern(C
) void function (GstTypeFind
*, void*) GstTypeFindFunction
;