I've no idea here...
[gtkD.git] / gtkD / srcgstreamer / gstreamerc / gstreamertypes.d
blob2b83b71a0ba0bc4bb0d4eb80bfb078f5907a2622
1 /*
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;
54 /**
55 * typedef guint64 GstClockTime;
56 * A datatype to hold a time, measured in nanoseconds.
58 public alias ulong GstClockTime;
60 /**
61 * typedef gint64 GstClockTimeDiff;
62 * A datatype to hold a timedifference, measured in nanoseconds.
64 public alias long GstClockTimeDiff;
66 /**
67 * typedef gpointer GstClockID;
68 * A datatype to hold the handle to an outstanding sync or async clock callback.
70 public alias void* GstClockID;
72 /**
73 * typedef GstStructure GstTagList;
74 * Opaque GstTagList data structure.
76 public alias GstStructure GstTagList;
78 /**
79 * The standard flags that an gstobject may have.
80 * GST_OBJECT_DISPOSING
82 public enum GstObjectFlags
84 DISPOSING = (1<<0),
85 FLOATING = (1<<1),
86 /+* padding +/
87 FLAG_LAST = (1<<4)
89 alias GstObjectFlags ObjectFlags;
92 /**
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),
101 /+* padding +/
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().
111 * GST_BIN_FLAG_LAST
113 public enum GstBinFlags
115 /+* padding +/
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
126 READONLY = (1<<0),
127 /+* padding +/
128 LAST = (1<<4)
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),
144 /+* padding +/
145 FLAG_LAST = (GstObjectFlags.FLAG_LAST << 8)
147 alias GstBufferFlag BufferFlag;
150 * The standard flags that a bus may have.
151 * GST_BUS_FLUSHING
153 public enum GstBusFlags
155 USHING = (GstObjectFlags.FLAG_LAST << 0),
156 /+* padding +/
157 AG_LAST = (GstObjectFlags.FLAG_LAST << 1)
159 alias GstBusFlags BusFlags;
162 * The result values for a GstBusSyncHandler.
163 * GST_BUS_DROP
165 public enum GstBusSyncReply
167 DROP = 0,
168 PASS = 1,
169 ASYNC = 2,
171 alias GstBusSyncReply BusSyncReply;
174 * Extra flags for a caps.
175 * GST_CAPS_FLAGS_ANY
177 public enum GstCapsFlags
179 ANY = (1 << 0)
181 alias GstCapsFlags CapsFlags;
184 * The type of the clock entry
185 * GST_CLOCK_ENTRY_SINGLE
187 public enum GstClockEntryType
189 SINGLE,
190 PERIODIC
192 alias GstClockEntryType ClockEntryType;
195 * The return value of a clock operation.
196 * GST_CLOCK_OK
198 public enum GstClockReturn
200 OK = 0,
201 EARLY = 1,
202 UNSCHEDULED = 2,
203 BUSY = 3,
204 BADTIME = 4,
205 ERROR = 5,
206 UNSUPPORTED = 6,
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),
222 /+* padding +/
223 LAST = (GstObjectFlags.FLAG_LAST << 8),
225 alias GstClockFlags ClockFlags;
228 * The posible states an element can be in.
229 * GST_STATE_VOID_PENDING
231 public enum GstState
233 VOID_PENDING = 0,
234 NULL = 1,
235 READY = 2,
236 PAUSED = 3,
237 PLAYING = 4
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
263 FAILURE = 0,
264 SUCCESS = 1,
265 ASYNC = 2,
266 NO_PREROLL = 3
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
278 UPSTREAM = 1 << 0,
279 DOWNSTREAM = 1 << 1,
280 SERIALIZED = 1 << 2,
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
289 * GstStructure.
290 * Specific custom events are distinguished by the name of the structure.
291 * GST_EVENT_UNKNOWN
294 public enum GstEventType
296 UNKNOWN = 0,
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().
348 * GST_SEEK_TYPE_NONE
350 public enum GstSeekType
352 /+* one of these +/
353 NONE = 0,
354 CUR = 1,
355 SET = 2,
356 END = 3
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.
377 * GST_SEEK_FLAG_NONE
379 public enum GstSeekFlags
381 NONE = 0,
382 FLUSH = (1 << 0),
383 ACCURATE = (1 << 1),
384 KEY_UNIT = (1 << 2),
385 SEGMENT = (1 << 3)
387 alias GstSeekFlags SeekFlags;
390 * Standard predefined formats
391 * GST_FORMAT_UNDEFINED
393 public enum GstFormat
395 UNDEFINED = 0, /+* must be first inn list +/
396 DEFAULT = 1,
397 BYTES = 2,
398 TIME = 3,
399 BUFFERS = 4,
400 PERCENT = 5
402 alias GstFormat Format;
405 * Core errors are errors inside the core GStreamer library.
406 * GST_CORE_ERROR_FAILED
408 public enum GstCoreError
410 FAILED = 1,
411 TOO_LAZY,
412 NOT_IMPLEMENTED,
413 STATE_CHANGE,
414 PAD,
415 THREAD,
416 NEGOTIATION,
417 EVENT,
418 SEEK,
419 CAPS,
420 TAG,
421 MISSING_PLUGIN,
422 CLOCK,
423 NUM_ERRORS
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
434 FAILED = 1,
435 TOO_LAZY,
436 INIT,
437 SHUTDOWN,
438 SETTINGS,
439 ENCODE,
440 NUM_ERRORS
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
452 FAILED = 1,
453 TOO_LAZY,
454 NOT_FOUND,
455 BUSY,
456 OPEN_READ,
457 OPEN_WRITE,
458 OPEN_READ_WRITE,
459 CLOSE,
460 READ,
461 WRITE,
462 SEEK,
463 SYNC,
464 SETTINGS,
465 NO_SPACE_LEFT,
466 NUM_ERRORS
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
478 FAILED = 1,
479 TOO_LAZY,
480 NOT_IMPLEMENTED,
481 TYPE_NOT_FOUND,
482 WRONG_TYPE,
483 CODEC_NOT_FOUND,
484 DECODE,
485 ENCODE,
486 DEMUX,
487 MUX,
488 FORMAT,
489 NUM_ERRORS
491 alias GstStreamError StreamError;
494 * The certainty of a group in the index.
495 * GST_INDEX_UNKNOWN
497 public enum GstIndexCertainty
499 UNKNOWN,
500 CERTAIN,
501 FUZZY
503 alias GstIndexCertainty IndexCertainty;
506 * The different types of entries in the index.
507 * GST_INDEX_ENTRY_ID
509 public enum GstIndexEntryType
512 ASSOCIATION,
513 OBJECT,
514 FORMAT
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
524 EXACT,
525 BEFORE,
526 AFTER
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
550 CUSTOM,
551 GTYPE,
552 PATH
554 alias GstIndexResolverMethod IndexResolverMethod;
557 * Flags for this index
558 * GST_INDEX_WRITABLE
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
574 SKIP = 0,
575 PASS = 1,
576 END = 2,
578 alias GstIteratorItem IteratorItem;
581 * The result of gst_iterator_next().
582 * GST_ITERATOR_DONE
584 public enum GstIteratorResult
586 DONE = 0,
587 OK = 1,
588 RESYNC = 2,
589 ERROR = 3,
591 alias GstIteratorResult IteratorResult;
594 * The different message types that are available.
595 * GST_MESSAGE_UNKNOWN
597 public enum GstMessageType
599 UNKNOWN = 0,
600 EOS = (1 << 0),
601 ERROR = (1 << 1),
602 WARNING = (1 << 2),
603 INFO = (1 << 3),
604 TAG = (1 << 4),
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),
615 ELEMENT = (1 << 15),
616 SEGMENT_START = (1 << 16),
617 SEGMENT_DONE = (1 << 17),
618 DURATION = (1 << 18),
619 ANY = 0xffffffff
621 //alias GstMessageType MessageType;
624 * The direction of a pad.
625 * GST_PAD_UNKNOWN
627 public enum GstPadDirection
629 UNKNOWN,
630 SRC,
631 SINK
633 alias GstPadDirection PadDirection;
636 * Pad state flags
637 * GST_PAD_BLOCKED
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),
645 /+* padding +/
646 FLAG_LAST = (GstObjectFlags.FLAG_LAST << 8)
648 alias GstPadFlags PadFlags;
651 * Result values from gst_pad_link and friends.
652 * GST_PAD_LINK_OK
654 public enum GstPadLinkReturn
656 OK = 0,
657 WRONG_HIERARCHY = -1,
658 WAS_LINKED = -2,
659 WRONG_DIRECTION = -3,
660 NOFORMAT = -4,
661 NOSCHED = -5,
662 REFUSED = -6,
664 alias GstPadLinkReturn PadLinkReturn;
667 * The result of passing data to a linked pad.
668 * GST_FLOW_RESEND
670 public enum GstFlowReturn
672 SEND = 1,
673 GST_FLOW_OK = 0,
674 /+* expected failures +/
675 GST_FLOW_NOT_LINKED = -1,
676 GST_FLOW_WRONG_STATE = -2,
677 /+* error cases +/
678 GST_FLOW_UNEXPECTED = -3,
679 GST_FLOW_NOT_NEGOTIATED = -4,
680 GST_FLOW_ERROR = -5,
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.
689 * GST_ACTIVATE_NONE
691 public enum GstActivateMode
693 NONE,
694 PUSH,
695 PULL,
697 alias GstActivateMode ActivateMode;
700 * Flags for the padtemplate
701 * GST_PAD_TEMPLATE_FIXED
703 public enum GstPadTemplateFlags
705 IXED = (GstObjectFlags.FLAG_LAST << 0),
706 /+* padding +/
707 LAG_LAST = (GstObjectFlags.FLAG_LAST << 4)
709 alias GstPadTemplateFlags PadTemplateFlags;
712 * Indicates when this pad will become available.
713 * GST_PAD_ALWAYS
715 public enum GstPadPresence
717 ALWAYS,
718 SOMETIMES,
719 REQUEST
721 alias GstPadPresence PadPresence;
724 * The different parsing errors that can occur.
725 * GST_PARSE_ERROR_SYNTAX
727 public enum GstParseError
729 SYNTAX,
730 NO_SUCH_ELEMENT,
731 NO_SUCH_PROPERTY,
732 LINK,
733 COULD_NOT_SET_PROPERTY,
734 EMPTY_BIN,
735 EMPTY
737 alias GstParseError ParseError;
740 * Pipeline flags
741 * GST_PIPELINE_FLAG_FIXED_CLOCK
743 public enum GstPipelineFlags
745 FIXED_CLOCK = (GstBinFlags.FLAG_LAST << 0),
746 /+* padding +/
747 LAST = (GstBinFlags.FLAG_LAST << 4)
749 alias GstPipelineFlags PipelineFlags;
752 * The plugin loading errors
753 * GST_PLUGIN_ERROR_MODULE
755 public enum GstPluginError
757 MODULE,
758 DEPENDENCIES,
759 NAME_MISMATCH
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().
770 * GST_RANK_NONE
772 public enum GstRank
774 NONE = 0,
775 MARGINAL = 64,
776 SECONDARY = 128,
777 PRIMARY = 256
779 alias GstRank Rank;
782 * Standard predefined Query types
783 * GST_QUERY_NONE
785 public enum GstQueryType
787 NONE = 0,
788 POSITION,
789 DURATION,
790 LATENCY,
791 JITTER, /+* not inn draft-query, necessary? +/
792 RATE,
793 SEEKING,
794 SEGMENT,
795 CONVERT,
796 FORMATS
798 alias GstQueryType QueryType;
801 * The different tag merging modes.
802 * GST_TAG_MERGE_UNDEFINED
804 public enum GstTagMergeMode
806 UNDEFINED,
807 REPLACE_ALL,
808 REPLACE,
809 APPEND,
810 PREPEND,
811 KEEP,
812 KEEP_ALL,
813 /+* add more +/
814 COUNT
816 alias GstTagMergeMode TagMergeMode;
819 * Extra tag flags used when registering tags.
820 * GST_TAG_FLAG_UNDEFINED
822 public enum GstTagFlag
824 FLAG_UNDEFINED,
825 FLAG_META,
826 FLAG_ENCODED,
827 FLAG_DECODED,
828 FLAG_COUNT
830 alias GstTagFlag TagFlag;
833 * The different states a task can be in
834 * GST_TASK_STARTED
836 public enum GstTaskState
838 RTED,
839 GST_TASK_STOPPED,
840 GST_TASK_PAUSED,
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
851 MINIMUM = 1,
852 POSSIBLE = 50,
853 LIKELY = 80,
854 NEARLY_CERTAIN = 99,
855 MAXIMUM = 100
857 alias GstTypeFindProbability TypeFindProbability;
861 * Main Gtk struct.
862 * The GstBin base class. Subclasses can access these fields provided
863 * the LOCK is taken.
864 * gintnumchildren;
866 public struct GstBin;
867 // /+* our children, subclass are supposed to update these
868 // * fields to reflect their state with _Iterate*() +/
869 // int numchildren;
870 // GList *children;
871 // uint childrenCookie;
872 // GstBus *childBus;
873 // GList *messages;
874 // int polling;
875 // int stateDirty;
876 // int clockDirty;
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
885 * message handling.
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);
897 * Main Gtk struct.
898 * The structure of a GstBuffer. Use the associated macros to access the public
899 * variables.
900 * GstMiniObjectmini_object;
902 align(1)
903 public struct GstBuffer
905 GstMiniObject mini_object;
907 /*< public >*/ /* with COW */
908 /* pointer to data and its size */
909 guint8 *data;
910 guint size;
912 /* timestamp */
913 GstClockTime timestamp;
914 GstClockTime duration;
916 /* the media type of this buffer */
917 GstCaps* caps;
919 /* media specific offset */
920 guint64 offset;
921 guint64 offset_end;
923 guint8 *malloc_data;
925 /*< private >*/
926 gpointer _gst_reserved[GST_PADDING];
928 // GstMiniObject miniObject;
929 // /+* pointer to data and its size +/
930 // byte *data;
931 // uint size;
932 // /+* timestamp +/
933 // GstClockTime timestamp;
934 // GstClockTime duration;
935 // /+* the media type of this buffer +/
936 // GstCaps *caps;
937 // /+* media specific offset +/
938 // ulong offset;
939 // ulong offsetEnd;
940 // byte *mallocData;
944 * Main Gtk struct.
945 * The opaque GstBus data structure.
947 public struct GstBus;
951 * Main Gtk struct.
952 * Object describing media types.
953 * GTypetype;
955 //public struct GstCaps;
956 public struct GstCaps
958 GType type;
960 /*< public >*/ /* with COW */
961 /* refcounting */
962 int refcount;//gint
964 /*< public >*/ /* read only */
965 GstCapsFlags flags;
967 /*< private >*/
968 GPtrArray* structs;
970 /*< private >*/
971 gpointer _gst_reserved[GST_PADDING];
974 // GType type;
975 // /+* refcounting +/
976 // int refcount;
977 // GstCapsFlags flags;
981 * Datastructure to initialize GstCaps from a string description usually
982 * used in conjunction with GST_STATIC_CAPS() and gst_static_caps_get() to
983 * instantiate a GstCaps.
984 * GstCapscaps;
986 public struct GstStaticCaps;
987 // GstCaps caps;
988 // char *string;
992 * Main Gtk struct.
994 public struct GstClock;
998 * All pending timeouts or periodic notifies are converted into
999 * an entry.
1000 * gintrefcount;
1002 public struct GstClockEntry
1004 int refcount;
1009 * Main Gtk struct.
1010 * GStreamer element abstract base class.
1011 * GStaticRecMutex*state_lock;
1013 public struct GstElement;
1014 // GStaticRecMutex *stateLock;
1015 // /+* element state +/
1016 // GCond *stateCond;
1017 // uint stateCookie;
1018 // GstState currentState;
1019 // GstState nextState;
1020 // GstState pendingState;
1021 // GstStateChangeReturn lastReturn;
1022 // GstBus *bus;
1023 // /+* allocated clock +/
1024 // GstClock *clock;
1025 // GstClockTimeDiff baseTime; /+* NULL/READY: 0 - PAUSED: current time - PLAYING: difference to clock +/
1026 // /+* element pads, these lists can only be iterated while holding
1027 // * the LOCK or checking the cookie after each LOCK. +/
1028 // ushort numpads;
1029 // GList *pads;
1030 // ushort numsrcpads;
1031 // GList *srcpads;
1032 // ushort numsinkpads;
1033 // GList *sinkpads;
1034 // uint padsCookie;
1038 * GStreamer element class. Override the vmethods to implement the element
1039 * functionality.
1040 * GstObjectClassparent_class;
1042 public struct GstElementClass;
1043 // GstObjectClass parentClass;
1044 // /+* the element details +/
1045 // GstElementDetails details;
1046 // /+* factory that the element was created from +/
1047 // GstElementFactory *elementfactory;
1048 // /+* templates for our pads +/
1049 // GList *padtemplates;
1050 // int numpadtemplates;
1051 // uint padTemplCookie;
1052 // /+* virtual methods for subclasses +/
1053 // /+* request/release pads +/
1054 // GstPad* (*requestNewPad) (GstElement *element, GstPadTemplate *templ, char* name);
1055 // void (*releasePad) (GstElement *element, GstPad *pad);
1056 // /+* state changes +/
1057 // GstStateChangeReturn (*getState) (GstElement * element, GstState * state,
1058 // GstState * pending, GstClockTime timeout);
1059 // GstStateChangeReturn (*setState) (GstElement *element, GstState state);
1060 // GstStateChangeReturn (*changeState) (GstElement *element, GstStateChange transition);
1061 // /+* bus +/
1062 // void (*setBus) (GstElement * element, GstBus * bus);
1063 // /+* set/get clocks +/
1064 // GstClock* (*provideClock) (GstElement *element);
1065 // int (*setClock) (GstElement *element, GstClock *clock);
1066 // /+* index +/
1067 // GstIndex* (*getIndex) (GstElement *element);
1068 // void (*setIndex) (GstElement *element, GstIndex *index);
1069 // /+* query functions +/
1070 // int (*sendEvent) (GstElement *element, GstEvent *event);
1071 // GstQueryType* (*getQueryTypes) (GstElement *element);
1072 // int (*query) (GstElement *element, GstQuery *query);
1076 * Main Gtk struct.
1077 * The opaque GstElementFactory data structure.
1079 public struct GstElementFactory;
1083 * This struct defines the public information about a GstElement. It contains
1084 * meta-data about the element that is mostly for the benefit of editors.
1085 * The klass member can be used by applications to filter elements based
1086 * on functionality.
1087 * gchar*longname;
1089 public struct GstElementDetails
1091 char *longname;
1092 char *klass;
1093 char *description;
1094 char *author;
1098 * Main Gtk struct.
1099 * A GstEvent.
1100 * GstMiniObjectmini_object;
1102 public struct GstEvent;
1104 GstMiniObject miniObject;
1105 GstEventType type;
1106 ulong timestamp;
1107 GstObject *src;
1108 GstStructure *structure;
1113 * A format definition
1114 * GstFormatvalue;
1116 public struct GstFormatDefinition;
1117 // GstFormat value;
1118 // char *nick;
1119 // char *description;
1120 // GQuark quark;
1124 * Main Gtk struct.
1125 * Opaque GstGhostPad structure.
1127 public struct GstGhostPad;
1131 * Main Gtk struct.
1132 * Opaque GstIndex structure.
1134 public struct GstIndex;
1138 * The basic element of an index.
1140 public struct GstIndexEntry;
1144 * A group of related entries in an index.
1146 public struct GstIndexGroup;
1150 * An association in an entry.
1151 * GstFormatformat;
1153 public struct GstIndexAssociation;
1154 // GstFormat format;
1155 // long value;
1159 * Main Gtk struct.
1160 * The GstIndexFactory object
1162 public struct GstIndexFactory;
1166 * Main Gtk struct.
1167 * GstIterator base structure. The values of this structure are
1168 * protected for subclasses, use the methods to use the GstIterator.
1170 public struct GstIterator;
1173 * Main Gtk struct.
1174 * Base class for refcounted lightweight objects.
1175 * GTypeInstanceinstance;
1177 public struct GstMiniObject
1179 GTypeInstance instanc;
1180 //< public >// with COW
1181 int refcount;//gint refcount;
1182 uint flags;//guint flags;
1184 //< private >
1185 gpointer _gst_reserved;
1190 * Main Gtk struct.
1191 * GStreamer base object class.
1192 * gintrefcount;
1194 public struct GstObject;
1195 // int refcount;
1196 // GMutex *lock; /+* object LOCK +/
1197 // char *name; /+* object name +/
1198 // char *namePrefix; /+* used for debugging +/
1199 // GstObject *parent; /+* this object's parent, weak ref +/
1200 // uint flags;
1204 * Main Gtk struct.
1205 * The GstPad structure. Use the functions to update the variables.
1206 * gpointerelement_private;
1208 public struct GstPad;
1209 // void* elementPrivate;
1210 // GstPadTemplate *padtemplate;
1211 // GstPadDirection direction;
1212 // /+* streaming recLock +/
1213 // GStaticRecMutex *streamRecLock;
1214 // GstTask *task;
1215 // GMutex *prerollLock;
1216 // GCond *prerollCond;
1217 // /+* block cond, mutex is from the object +/
1218 // GCond *blockCond;
1219 // GstPadBlockCallback blockCallback;
1220 // void* blockData;
1221 // /+* the pad capabilities +/
1222 // GstCaps *caps;
1223 // GstPadGetCapsFunction getcapsfunc;
1224 // GstPadSetCapsFunction setcapsfunc;
1225 // GstPadAcceptCapsFunction acceptcapsfunc;
1226 // GstPadFixateCapsFunction fixatecapsfunc;
1227 // GstPadActivateFunction activatefunc;
1228 // GstPadActivateModeFunction activatepushfunc;
1229 // GstPadActivateModeFunction activatepullfunc;
1230 // /+* pad link +/
1231 // GstPadLinkFunction linkfunc;
1232 // GstPadUnlinkFunction unlinkfunc;
1233 // GstPad *peer;
1234 // void* schedPrivate;
1235 // /+* data transport functions +/
1236 // GstPadChainFunction chainfunc;
1237 // GstPadCheckGetRangeFunction checkgetrangefunc;
1238 // GstPadGetRangeFunction getrangefunc;
1239 // GstPadEventFunction eventfunc;
1240 // GstActivateMode mode;
1241 // /+* generic query method +/
1242 // GstPadQueryTypeFunction querytypefunc;
1243 // GstPadQueryFunction queryfunc;
1244 // /+* internal links +/
1245 // GstPadIntLinkFunction intlinkfunc;
1246 // GstPadBufferAllocFunction bufferallocfunc;
1247 // /+* whether to emit signals for have-data. counts number
1248 // * of handlers attached. +/
1249 // int doBufferSignals;
1250 // int doEventSignals;
1254 * Structure describing the GstStaticPadTemplate.
1255 * gchar*name_template;
1257 public struct GstStaticPadTemplate;
1258 // char *nameTemplate;
1259 // GstPadDirection direction;
1260 // GstPadPresence presence;
1261 // GstStaticCaps staticCaps;
1265 * Main Gtk struct.
1266 * The padtemplate object.
1268 public struct GstPadTemplate;
1272 * Main Gtk struct.
1273 * The GstPipeline structure.
1274 * GstClock*fixed_clock;
1276 public struct GstPipeline;
1277 // GstClock *fixedClock; /+* fixed clock if any +/
1278 // GstClockTime streamTime;
1279 // GstClockTime delay;
1283 * Main Gtk struct.
1284 * The plugin object
1286 public struct GstPlugin;
1290 * A plugins should export a variable of this type called plugin_desc. This plugin
1291 * loaded will use this variable to initialize the plugin.
1292 * gintmajor_version;
1294 public struct GstPluginDesc;
1295 // int majorVersion;
1296 // int minorVersion;
1297 // char *name;
1298 // char *description;
1299 // GstPluginInitFunc pluginInit;
1300 // char *versio;
1301 // char *license;
1302 // char *source;
1303 // char *p;
1304 // char *origin;
1305 // void* _GstReserved[GST_PADDING];
1309 * Main Gtk struct.
1310 * Opaque GstPluginFeature structure.
1312 public struct GstPluginFeature;
1316 * Structure used for filtering based on name and type.
1317 * constgchar*name;
1319 public struct GstTypeNameData;
1320 // char *name;
1321 // GType type;
1325 * Main Gtk struct.
1326 * The GstQuery structure.
1327 * GstMiniObjectmini_object;
1329 public struct GstQuery;
1330 // GstMiniObject miniObject;
1331 // GstQueryType type;
1332 // GstStructure *structure;
1336 * A Query Type definition
1337 * GstQueryTypevalue;
1339 public struct GstQueryTypeDefinition;
1340 // GstQueryType value;
1341 // char *nick;
1342 // char *description;
1343 // GQuark quark;
1347 * Main Gtk struct.
1348 * Opaque GstRegistry structure.
1350 public struct GstRegistry;
1354 * Main Gtk struct.
1355 * A helper structure that holds the configured region of
1356 * interest in a media file.
1357 * gdoublerate;
1359 public struct GstSegment;
1360 // double rate;
1361 // double absRate;
1362 // GstFormat format;
1363 // GstSeekFlags flags;
1364 // long start;
1365 // long stop;
1366 // long time;
1367 // long accum;
1368 // long lastStop;
1369 // long duration;
1370 // /+* API added 0.10.6 +/
1371 // double appliedRate;
1375 * Main Gtk struct.
1376 * The GstStructure object. Most fields are private.
1377 * GTypetype;
1379 public struct GstStructure;
1380 // GType type;
1383 * Main Gtk struct.
1384 * A GstMessage.
1385 * GstMiniObjectmini_object;
1387 /*public struct GstMessage
1389 GstMiniObject mini_object;
1391 GstMessageType type;
1392 //int type;
1393 ulong timestamp;
1394 GstObject* src;
1396 GstStructure* structure;
1399 public struct GstMessage
1401 GstMiniObject mini_object;
1403 GstMessageType type;
1404 long timestamp;
1405 GstObject *src;
1407 GstStructure *structure;
1410 align(1)
1411 struct GstMessage
1413 GstMiniObject mini_object;
1415 /*< private > *//* with MESSAGE_LOCK */
1416 GMutex* lock; /* lock and cond for async delivery */
1417 GCond* cond;
1419 /*< public > *//* with COW */
1420 GstMessageType type;
1421 ulong timestamp;//guint64 timestamp;
1422 GstObject* src;
1424 GstStructure* structure;
1426 /*< private > */
1427 gpointer _gst_reserved[GST_PADDING];
1431 * Main Gtk struct.
1432 * The default implementation of a GstClock that uses the system time.
1434 public struct GstSystemClock;
1438 * Main Gtk struct.
1439 * Opaque GstTagSetter data structure.
1441 public struct GstTagSetter;
1445 * GstTagSetterIFace interface.
1446 * GTypeInterfaceg_iface;
1448 public struct GstTagSetterIFace;
1449 // GTypeInterface gIface;
1450 // /+* signals +/
1451 // /+* virtual table +/
1455 * Main Gtk struct.
1456 * The GstTask object.
1457 * GstTaskStatestate;
1459 public struct GstTask;
1460 // GstTaskState state;
1461 // GCond *cond;
1462 // GStaticRecMutex *lock;
1463 // GstTaskFunction func;
1464 // void* data;
1465 // int running;
1469 * Main Gtk struct.
1470 * Object that stores typefind callbacks. To use with GstTypeFindFactory.
1471 * peek()
1473 public struct GstTypeFind;
1474 // /+* private to the caller of the typefind funct +/
1475 // byte * (* peek) (void* data,
1476 // long offset,
1477 // uint size);
1478 // void (* suggest) (void* data,
1479 // uint probability,
1480 // GstCaps * caps);
1481 // void* data;
1482 // /+* optional +/
1483 // ulong (* getLength) (void* data);
1487 * Main Gtk struct.
1488 * Object that stores information about a typefind function.
1490 public struct GstTypeFindFactory;
1494 * Main Gtk struct.
1495 * XML parser object
1497 public struct GstXML;
1501 * Gets the list with children in a bin.
1502 * bin:
1503 * a GstBin
1505 // TODO
1506 // #define GST_BIN_CHILDREN(bin) (GST_BIN_CAST(bin)->children)
1509 * Gets the children cookie that watches the children list.
1510 * bin:
1511 * a GstBin
1513 // TODO
1514 // #define GST_BIN_CHILDREN_COOKIE(bin) (GST_BIN_CAST(bin)->children_cookie)
1517 * Gets the number of children in a bin.
1518 * bin:
1519 * a GstBin
1520 * Signal Details
1521 * The "element-added" signal
1522 * void user_function (GstBin *bin,
1523 * GstElement *element,
1524 * gpointer user_data) : Run first
1525 * Will be emitted after the element was added to the bin.
1526 * bin:
1527 * the GstBin
1528 * element:
1529 * the GstElement that was added to the bin
1530 * user_data:
1531 * user data set when the signal handler was connected.
1533 // TODO
1534 // #define GST_BIN_NUMCHILDREN(bin) (GST_BIN_CAST(bin)->numchildren)
1537 * A flags word containing GstBufferFlag flags set on this buffer.
1538 * buf:
1539 * a GstBuffer.
1541 // TODO
1542 // #define GST_BUFFER_FLAGS(buf) GST_MINI_OBJECT_FLAGS(buf)
1545 * Gives the status of a specific flag on a buffer.
1546 * buf:
1547 * a GstBuffer.
1548 * flag:
1549 * the GstBufferFlag to check.
1551 // TODO
1552 // #define GST_BUFFER_FLAG_IS_SET(buf,flag) GST_MINI_OBJECT_FLAG_IS_SET (buf, flag)
1555 * Sets a buffer flag on a buffer.
1556 * buf:
1557 * a GstBuffer.
1558 * flag:
1559 * the GstBufferFlag to set.
1561 // TODO
1562 // #define GST_BUFFER_FLAG_SET(buf,flag) GST_MINI_OBJECT_FLAG_SET (buf, flag)
1565 * Clears a buffer flag.
1566 * buf:
1567 * a GstBuffer.
1568 * flag:
1569 * the GstBufferFlag to clear.
1571 // TODO
1572 // #define GST_BUFFER_FLAG_UNSET(buf,flag) GST_MINI_OBJECT_FLAG_UNSET (buf, flag)
1575 * A pointer to the data element of this buffer.
1576 * buf:
1577 * a GstBuffer.
1579 // TODO
1580 // #define GST_BUFFER_DATA(buf) (GST_BUFFER_CAST(buf)->data)
1583 * A pointer to any data allocated for this buffer using malloc(). If this is
1584 * non-NULL, this memory will be freed at the end of the buffer's lifecycle
1585 * (i.e. when its refcount becomes zero).
1586 * buf:
1587 * a GstBuffer.
1589 // TODO
1590 // #define GST_BUFFER_MALLOCDATA(buf) (GST_BUFFER_CAST(buf)->malloc_data)
1593 * The size in bytes of the data in this buffer.
1594 * buf:
1595 * a GstBuffer.
1597 // TODO
1598 // #define GST_BUFFER_SIZE(buf) (GST_BUFFER_CAST(buf)->size)
1601 * The timestamp in nanoseconds (as a GstClockTime) of the data in the buffer.
1602 * Value will be GST_CLOCK_TIME_NONE if the timestamp is unknown.
1603 * buf:
1604 * a GstBuffer.:
1606 // TODO
1607 // #define GST_BUFFER_TIMESTAMP(buf) (GST_BUFFER_CAST(buf)->timestamp)
1610 * The duration in nanoseconds (as a GstClockTime) of the data in the buffer.
1611 * Value will be GST_CLOCK_TIME_NONE if the duration is unknown.
1612 * buf:
1613 * a GstBuffer.
1615 // TODO
1616 // #define GST_BUFFER_DURATION(buf) (GST_BUFFER_CAST(buf)->duration)
1619 * The caps for this buffer.
1620 * buf:
1621 * a GstBuffer.
1623 // TODO
1624 // #define GST_BUFFER_CAPS(buf) (GST_BUFFER_CAST(buf)->caps)
1627 * The offset in the source file of the beginning of this buffer.
1628 * buf:
1629 * a GstBuffer.
1631 // TODO
1632 // #define GST_BUFFER_OFFSET(buf) (GST_BUFFER_CAST(buf)->offset)
1635 * The offset in the source file of the end of this buffer.
1636 * buf:
1637 * a GstBuffer.
1639 // TODO
1640 // #define GST_BUFFER_OFFSET_END(buf) (GST_BUFFER_CAST(buf)->offset_end)
1643 * Tests if the duration is known.
1644 * buffer:
1645 * a GstBuffer
1647 // TODO
1648 // #define GST_BUFFER_DURATION_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (buffer)))
1651 * Tests if the timestamp is known.
1652 * buffer:
1653 * a GstBuffer
1655 // TODO
1656 // #define GST_BUFFER_TIMESTAMP_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buffer)))
1659 * Tests if the start offset is known.
1660 * buffer:
1661 * a GstBuffer
1663 // TODO
1664 // #define GST_BUFFER_OFFSET_IS_VALID(buffer) (GST_BUFFER_OFFSET (buffer) != GST_BUFFER_OFFSET_NONE)
1667 * Tests if the end offset is known.
1668 * buffer:
1669 * a GstBuffer
1671 // TODO
1672 // #define GST_BUFFER_OFFSET_END_IS_VALID(buffer) (GST_BUFFER_OFFSET_END (buffer) != GST_BUFFER_OFFSET_NONE)
1675 * Decreases the refcount of the buffer. If the refcount reaches 0, the buffer
1676 * will be freed. If GST_BUFFER_MALLOCDATA() is non-NULL, this pointer will
1677 * also be freed at this time.
1678 * buf:
1679 * a GstBuffer.
1681 // TODO
1682 // #define gst_buffer_unref(buf) gst_mini_object_unref (GST_MINI_OBJECT (buf))
1685 * A convenience function to set the data and size on a buffer.
1686 * This will replace any existing data pointer set on this buffer, but will
1687 * not change GST_BUFFER_MALLOCDATA(), if any. Callers should ensure that
1688 * GST_BUFFER_MALLOCDATA() is non-NULL, or should free that and set it to NULL.
1689 * No checks are done on the data or size arguments passed.
1690 * buf:
1691 * a GstBuffer
1692 * data:
1693 * The data (a guint8 *) to set on the buffer.
1694 * size:
1695 * The size (in bytes, as a guint) of the data being set.
1697 // TODO
1698 // #define gst_buffer_set_data(buf, data, size)
1701 * Create a copy of the given buffer. This will also make a newly allocated
1702 * copy of the data the source buffer contains.
1703 * buf:
1704 * a GstBuffer.
1706 // TODO
1707 // #define gst_buffer_copy(buf) GST_BUFFER_CAST (gst_mini_object_copy (GST_MINI_OBJECT (buf)))
1710 * Tests if you can safely write data into a buffer's data array or validly
1711 * modify the caps and timestamp metadata. Metadata in a GstBuffer is always
1712 * writable, but it is only safe to change it when there is only one owner
1713 * of the buffer - ie, the refcount is 1.
1714 * buf:
1715 * a GstBuffer
1717 // TODO
1718 // #define gst_buffer_is_writable(buf) gst_mini_object_is_writable (GST_MINI_OBJECT (buf))
1721 * Makes a writable buffer from the given buffer. If the source buffer is
1722 * already writable, this will simply return the same buffer. A copy will
1723 * otherwise be made using gst_buffer_copy().
1724 * buf:
1725 * a GstBuffer
1727 // TODO
1728 // #define gst_buffer_make_writable(buf) GST_BUFFER_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT (buf)))
1731 * Modifies a pointer to a Gstbuffer to point to a different GstBuffer. The
1732 * modification is done atomically (so this is useful for ensuring thread safety
1733 * in some cases), and the reference counts are updated appropriately (the old
1734 * buffer is unreffed, the new is reffed).
1735 * Either nbuf or the GstBuffer pointed to by obuf may be NULL.
1736 * obuf:
1737 * pointer to a pointer to a GstBuffer to be replaced.
1738 * nbuf:
1739 * pointer to a GstBuffer that will replace the buffer pointed to by
1740 * obuf.
1742 // TODO
1743 // #define gst_buffer_replace(obuf,nbuf) gst_mini_object_replace ((GstMiniObject **)(obuf), GST_MINI_OBJECT (nbuf))
1746 * Get access to the reference count field of the caps
1747 * caps:
1748 * a GstCaps
1750 // TODO
1751 // #define GST_CAPS_REFCOUNT(caps) ((GST_CAPS(caps))->refcount)
1754 * Get the reference count value of the caps.
1755 * caps:
1756 * a GstCaps
1758 // TODO
1759 // #define GST_CAPS_REFCOUNT_VALUE(caps) (g_atomic_int_get ((GST_CAPS(caps))->refcount))
1762 * Convenience macro that checks if the number of structures in the given caps
1763 * is exactly one.
1764 * caps:
1765 * the GstCaps instance to check
1767 // TODO
1768 // #define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1)
1771 * Warning
1772 * GST_DEBUG_CAPS is deprecated and should not be used in newly-written code. do not use anymore
1773 * Convenience macro for printing out the contents of caps with GST_DEBUG().
1774 * string:
1775 * a string that should be prepended to the caps data.
1776 * caps:
1777 * the GstCaps instance to print
1779 // TODO
1780 // #define GST_DEBUG_CAPS(string, caps)
1783 * Creates a new GstCaps static caps from an input string.
1784 * This can be used in pad templates.
1785 * string:
1786 * the string describing the caps
1788 // TODO
1789 // #define GST_STATIC_CAPS(string)
1792 * Tests if a given GstClockTime represents a valid defined time.
1793 * time:
1794 * clock time to validate
1796 // TODO
1797 // #define GST_CLOCK_TIME_IS_VALID(time) (((GstClockTime)(time)) != GST_CLOCK_TIME_NONE)
1800 * Calculate a difference between two clock times as a GstClockTimeDiff.
1801 * The difference is calculated as e - s.
1802 * s:
1803 * the first time
1804 * e:
1805 * the second time
1807 // TODO
1808 // #define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((e) - (s))
1811 * Convert a GTimeVal to a GstClockTime.
1812 * tv:
1813 * the timeval to convert
1815 // TODO
1816 // #define GST_TIMEVAL_TO_TIME(tv) ((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND)
1819 * Note: on 32-bit systems, a timeval has a range of only 2^32 - 1 seconds,
1820 * which is about 68 years. Expect trouble if you want to schedule stuff
1821 * in your pipeline for 2038.
1822 * Convert a GstClockTime to a GTimeVal
1823 * t:
1824 * The GstClockTime to convert
1825 * tv:
1826 * The target timeval
1828 // TODO
1829 // #define GST_TIME_TO_TIMEVAL(t,tv)
1832 * Convert a struct timespec (see man pselect) to a GstClockTime.
1833 * ts:
1834 * the timespec to convert
1836 // TODO
1837 // #define GST_TIMESPEC_TO_TIME(ts) ((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND)
1840 * Convert a GstClockTime to a struct timespec (see man pselect)
1841 * t:
1842 * The GstClockTime to convert
1843 * ts:
1844 * The target timespec
1846 // TODO
1847 // #define GST_TIME_TO_TIMESPEC(t,ts)
1850 * Cast to a clock entry
1851 * entry:
1852 * the entry to cast
1854 // TODO
1855 // #define GST_CLOCK_ENTRY(entry) ((GstClockEntry *)(entry))
1858 * Get the owner clock of the entry
1859 * entry:
1860 * the entry to query
1862 // TODO
1863 // #define GST_CLOCK_ENTRY_CLOCK(entry) ((entry)->clock)
1866 * Get the type of the clock entry
1867 * entry:
1868 * the entry to query
1870 // TODO
1871 // #define GST_CLOCK_ENTRY_TYPE(entry) ((entry)->type)
1874 * Get the requested time of this entry
1875 * entry:
1876 * the entry to query
1878 // TODO
1879 // #define GST_CLOCK_ENTRY_TIME(entry) ((entry)->time)
1882 * Get the interval of this periodic entry
1883 * entry:
1884 * the entry to query
1886 // TODO
1887 // #define GST_CLOCK_ENTRY_INTERVAL(entry) ((entry)->interval)
1890 * The status of the entry
1891 * entry:
1892 * the entry to query
1894 // TODO
1895 // #define GST_CLOCK_ENTRY_STATUS(entry) ((entry)->status)
1898 * Gets the GstClockFlags clock flags.
1899 * clock:
1900 * the clock to query
1902 // TODO
1903 // #define GST_CLOCK_FLAGS(clock) (GST_CLOCK(clock)->flags)
1906 * Signal that the entries in the clock have changed.
1907 * clock:
1908 * the clock to broadcast
1910 // TODO
1911 // #define GST_CLOCK_BROADCAST(clock) g_cond_broadcast(GST_CLOCK_COND(clock))
1914 * Gets the GCond that gets signaled when the entries of the clock
1915 * changed.
1916 * clock:
1917 * the clock to query
1919 // TODO
1920 // #define GST_CLOCK_COND(clock) (GST_CLOCK_CAST(clock)->entries_changed)
1923 * Wait on the clock until the entries changed or the specified timeout
1924 * occured.
1925 * clock:
1926 * the clock to wait on
1927 * tv:
1928 * a GTimeVal to wait.
1930 // TODO
1931 // #define GST_CLOCK_TIMED_WAIT(clock,tv) g_cond_timed_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock),tv)
1934 * Wait on the clock until the entries changed.
1935 * clock:
1936 * the clock to wait on
1938 // TODO
1939 // #define GST_CLOCK_WAIT(clock) g_cond_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock))
1942 * This macro returns the current GstState of the element.
1943 * elem:
1944 * a GstElement to return state for.
1946 // TODO
1947 // #define GST_STATE(elem) (GST_ELEMENT_CAST(elem)->current_state)
1950 * Given a current state cur and a target state pending, calculate the next (intermediate)
1951 * GstState.
1952 * cur:
1953 * A starting GstState
1954 * pending:
1955 * A target GstState
1957 // TODO
1958 // #define GST_STATE_GET_NEXT(cur,pending) ((cur) + __GST_SIGN ((gint)(pending) - (gint)(cur)))
1961 * This macro returns the next GstState of the element.
1962 * elem:
1963 * a GstElement to return the next state for.
1965 // TODO
1966 // #define GST_STATE_NEXT(elem) (GST_ELEMENT_CAST(elem)->next_state)
1969 * This macro returns the currently pending GstState of the element.
1970 * elem:
1971 * a GstElement to return the pending state for.
1973 // TODO
1974 // #define GST_STATE_PENDING(elem) (GST_ELEMENT_CAST(elem)->pending_state)
1977 * This macro returns the last GstStateChangeReturn value.
1978 * elem:
1979 * a GstElement to return the last state result for.
1981 // TODO
1982 // #define GST_STATE_RETURN(elem) (GST_ELEMENT_CAST(elem)->last_return)
1985 * Given a current state cur and a next state next, calculate the associated
1986 * GstStateChange transition.
1987 * cur:
1988 * A current state
1989 * next:
1990 * A next state
1992 // TODO
1993 // #define GST_STATE_TRANSITION(cur,next) (((cur)<<3)|(next))
1996 * Given a state transition trans, extract the current GstState.
1997 * trans:
1998 * A GstStateChange
2000 // TODO
2001 // #define GST_STATE_TRANSITION_CURRENT(trans) ((trans)>>3)
2004 * Given a state transition trans, extract the next GstState.
2005 * trans:
2006 * A GstStateChange
2008 // TODO
2009 // #define GST_STATE_TRANSITION_NEXT(trans) ((trans)0x7)
2012 * Get a reference to the state lock of elem.
2013 * This lock is used by the core. It is taken while getting or setting
2014 * the state, during state changes, and while finalizing.
2015 * elem:
2016 * a GstElement
2018 // TODO
2019 // #define GST_STATE_GET_LOCK(elem) (GST_ELEMENT_CAST(elem)->state_lock)
2022 * Get the conditional used to signal the completion of a state change.
2023 * elem:
2024 * a GstElement
2026 // TODO
2027 // #define GST_STATE_GET_COND(elem) (GST_ELEMENT_CAST(elem)->state_cond)
2030 * Gets the name of this element. Use only in core as this is not
2031 * ABI-compatible. Others use gst_element_get_name()
2032 * elem:
2033 * A GstElement to query
2035 // TODO
2036 // #define GST_ELEMENT_NAME(elem) (GST_OBJECT_NAME(elem))
2039 * Get the parent object of this element.
2040 * elem:
2041 * A GstElement to query
2043 // TODO
2044 // #define GST_ELEMENT_PARENT(elem) (GST_ELEMENT_CAST(GST_OBJECT_PARENT(elem)))
2047 * Get the message bus of this element.
2048 * elem:
2049 * A GstElement to query
2051 // TODO
2052 // #define GST_ELEMENT_BUS(elem) (GST_ELEMENT_CAST(elem)->bus)
2055 * Get the clock of this element
2056 * elem:
2057 * A GstElement to query
2059 // TODO
2060 // #define GST_ELEMENT_CLOCK(elem) (GST_ELEMENT_CAST(elem)->clock)
2063 * Get the pads of this elements.
2064 * elem:
2065 * A GstElement to query
2067 // TODO
2068 // #define GST_ELEMENT_PADS(elem) (GST_ELEMENT_CAST(elem)->pads)
2071 * Utility function that elements can use in case they encountered a fatal
2072 * data processing error. The pipeline will throw an error signal and the
2073 * application will be requested to stop further media processing.
2074 * el:
2075 * the element that throws the error
2076 * domain:
2077 * like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)
2078 * code:
2079 * error code defined for that domain (see GstGError)
2080 * text:
2081 * the message to display (format string and args enclosed in
2082 * parentheses)
2083 * debug:
2084 * debugging information for the message (format string and args
2085 * enclosed in parentheses)
2087 // TODO
2088 // #define GST_ELEMENT_ERROR(el, domain, code, text, debug)
2091 * Utility function that elements can use in case they encountered a non-fatal
2092 * data processing problem. The pipeline will throw a warning signal and the
2093 * application will be informed.
2094 * el:
2095 * the element that throws the error
2096 * domain:
2097 * like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)
2098 * code:
2099 * error code defined for that domain (see GstGError)
2100 * text:
2101 * the message to display (format string and args enclosed in
2102 * parentheses)
2103 * debug:
2104 * debugging information for the message (format string and args
2105 * enclosed in parentheses)
2107 // TODO
2108 // #define GST_ELEMENT_WARNING(el, domain, code, text, debug)
2111 * Check if the element is in the locked state and therefore will ignore state
2112 * changes from its parent object.
2113 * elem:
2114 * A GstElement to query
2116 // TODO
2117 // #define GST_ELEMENT_IS_LOCKED_STATE(elem) (GST_OBJECT_FLAG_IS_SET(elem,GST_ELEMENT_LOCKED_STATE))
2120 * Sets the name of the element, getting rid of the old name if there was one.
2121 * elem:
2122 * a GstElement to set the name of.
2123 * name:
2124 * the new name
2126 // TODO
2127 // #define gst_element_set_name(elem,name) gst_object_set_name(GST_OBJECT_CAST(elem),name)
2130 * Gets the name of the element.
2131 * elem:
2132 * a GstElement to set the name of.
2134 // TODO
2135 // #define gst_element_get_name(elem) gst_object_get_name(GST_OBJECT_CAST(elem))
2138 * Sets the parent of an element.
2139 * elem:
2140 * a GstElement to set the parent of.
2141 * parent:
2142 * the new parent GstObject of the element.
2144 // TODO
2145 // #define gst_element_set_parent(elem,parent) gst_object_set_parent(GST_OBJECT_CAST(elem),parent)
2148 * Gets the parent of an element.
2149 * elem:
2150 * a GstElement to get the parent of.
2152 // TODO
2153 // #define gst_element_get_parent(elem) gst_object_get_parent(GST_OBJECT_CAST(elem))
2156 * Macro to initialize GstElementDetails.
2157 * longname:
2158 * long, english name
2159 * klass:
2160 * type of element, as hierarchy
2161 * description:
2162 * what the element is about
2163 * author:
2164 * who wrote this thing?
2166 // TODO
2167 // #define GST_ELEMENT_DETAILS(longname,klass,description,author)
2170 * Tests if element details are initialized.
2171 * details:
2172 * the GstElementDetails to check
2174 // TODO
2175 // #define GST_IS_ELEMENT_DETAILS(details)
2178 * Get the GstEventType of the event.
2179 * event:
2180 * the event to query
2182 // TODO
2183 // #define GST_EVENT_TYPE(event) (GST_EVENT_CAST(event)->type)
2186 * Get a constant string representation of the GstEventType of the event.
2187 * event:
2188 * the event to query
2190 // TODO
2191 // #define GST_EVENT_TYPE_NAME(event) (gst_event_type_get_name(GST_EVENT_TYPE(event)))
2194 * Get the GstClockTime timestamp of the event. This is the time when the event
2195 * was created.
2196 * event:
2197 * the event to query
2199 // TODO
2200 // #define GST_EVENT_TIMESTAMP(event) (GST_EVENT_CAST(event)->timestamp)
2203 * The source GstObject that generated this event.
2204 * event:
2205 * the event to query
2207 // TODO
2208 // #define GST_EVENT_SRC(event) (GST_EVENT_CAST(event)->src)
2211 * Check if an event can travel downstream.
2212 * ev:
2213 * the event to query
2215 // TODO
2216 // #define GST_EVENT_IS_DOWNSTREAM(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_DOWNSTREAM)
2219 * Check if an event is serialized with the data stream.
2220 * ev:
2221 * the event to query
2223 // TODO
2224 // #define GST_EVENT_IS_SERIALIZED(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_SERIALIZED)
2227 * Check if an event can travel upstream.
2228 * ev:
2229 * the event to query
2231 // TODO
2232 // #define GST_EVENT_IS_UPSTREAM(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_UPSTREAM)
2235 * when making custom event types, use this macro with the num and
2236 * the given flags
2237 * num:
2238 * the event number to create
2239 * flags:
2240 * the event flags
2242 // TODO
2243 // #define GST_EVENT_MAKE_TYPE(num,flags)
2245 int GST_EVENT_TYPE_SHIFT = 4;
2248 * GST_EVENT_MAKE_TYPE:
2249 * @num: the event number to create
2250 * @flags: the event flags
2252 * when making custom event types, use this macro with the num and
2253 * the given flags
2255 int GST_EVENT_MAKE_TYPE( int num, int flags )
2257 return (((num) << GST_EVENT_TYPE_SHIFT) | (flags));
2261 * Copy the event using the event specific copy function.
2262 * ev:
2263 * The event to copy
2265 // TODO
2266 // #define gst_event_copy(ev) GST_EVENT_CAST (gst_mini_object_copy (GST_MINI_OBJECT (ev)))
2269 * Decrease the refcount of an event, freeing it if the refcount reaches 0.
2270 * ev:
2271 * The event to refcount
2273 // TODO
2274 // #define gst_event_unref(ev) gst_mini_object_unref (GST_MINI_OBJECT (ev))
2277 * Modifies a pointer to a GstEvent to point to a different GstEvent. The
2278 * modification is done atomically (so this is useful for ensuring thread safety
2279 * in some cases), and the reference counts are updated appropriately (the old
2280 * event is unreffed, the new one is reffed).
2281 * Either new_event or the GstEvent pointed to by old_event may be NULL.
2282 * old_event:
2283 * pointer to a pointer to a GstEvent to be replaced.
2284 * new_event:
2285 * pointer to a GstEvent that will replace the event pointed to
2286 * by old_event.
2287 * Since 0.10.3
2289 // TODO
2290 // #define gst_event_replace(old_event,new_event)
2293 * Get the number of associations in the entry.
2294 * entry:
2295 * The entry to query
2297 // TODO
2298 // #define GST_INDEX_NASSOCS(entry) ((entry)->data.assoc.nassocs)
2301 * Get the flags for this entry.
2302 * entry:
2303 * The entry to query
2305 // TODO
2306 // #define GST_INDEX_ASSOC_FLAGS(entry) ((entry)->data.assoc.flags)
2309 * Get the i-th format of the entry.
2310 * entry:
2311 * The entry to query
2312 * i:
2313 * The format index
2315 // TODO
2316 // #define GST_INDEX_ASSOC_FORMAT(entry,i) ((entry)->data.assoc.assocs[(i)].format)
2319 * Get the i-th value of the entry.
2320 * entry:
2321 * The entry to query
2322 * i:
2323 * The value index
2325 // TODO
2326 // #define GST_INDEX_ASSOC_VALUE(entry,i) ((entry)->data.assoc.assocs[(i)].value)
2329 * Get the format of the format entry
2330 * entry:
2331 * The entry to query
2333 // TODO
2334 // #define GST_INDEX_FORMAT_FORMAT(entry) ((entry)->data.format.format)
2337 * Get the key of the format entry
2338 * entry:
2339 * The entry to query
2341 // TODO
2342 // #define GST_INDEX_FORMAT_KEY(entry) ((entry)->data.format.key)
2345 * Get the description of the id entry
2346 * entry:
2347 * The entry to query
2349 // TODO
2350 // #define GST_INDEX_ID_DESCRIPTION(entry) ((entry)->data.id.description)
2353 * Check if the index can be read from
2354 * obj:
2355 * The index to check
2357 // TODO
2358 // #define GST_INDEX_IS_READABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_INDEX_READABLE))
2361 * Check if the index can be written to
2362 * obj:
2363 * The index to check
2365 // TODO
2366 // #define GST_INDEX_IS_WRITABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_INDEX_WRITABLE))
2369 * Macro to cast to a GstIterator
2370 * it:
2371 * the GstIterator value
2373 // TODO
2374 // #define GST_ITERATOR(it) ((GstIterator*)(it))
2377 * Macro to get the lock protecting the datastructure being iterated.
2378 * it:
2379 * the GstIterator to get the lock of
2381 // TODO
2382 // #define GST_ITERATOR_LOCK(it) (GST_ITERATOR(it)->lock)
2385 * Macro to get the cookie of a GstIterator. The cookie of the
2386 * iterator is the value of the master cookie when the iterator
2387 * was created.
2388 * Whenever the iterator is iterated, the value is compared to the
2389 * value of the master cookie. If they are different, a concurrent
2390 * modification happened to the iterator and a resync is needed.
2391 * it:
2392 * the GstIterator to get the cookie of
2394 // TODO
2395 // #define GST_ITERATOR_COOKIE(it) (GST_ITERATOR(it)->cookie)
2398 * Macro to get a pointer to where the master cookie is stored. The
2399 * master cookie protects the structure being iterated and gets updated
2400 * whenever the datastructure changes.
2401 * it:
2402 * the GstIterator to get the master cookie of
2404 // TODO
2405 // #define GST_ITERATOR_ORIG_COOKIE(it) (GST_ITERATOR(it)->master_cookie)
2408 * Get the object that posted message.
2409 * message:
2410 * a GstMessage
2412 // TODO
2413 // #define GST_MESSAGE_SRC(message) (GST_MESSAGE(message)->src)
2416 * Get the timestamp of message. This is the timestamp when the message
2417 * was created.
2418 * message:
2419 * a GstMessage
2421 // TODO
2422 // #define GST_MESSAGE_TIMESTAMP(message) (GST_MESSAGE(message)->timestamp)
2425 * Get the GstMessageType of message.
2426 * message:
2427 * a GstMessage
2429 // TODO
2430 // #define GST_MESSAGE_TYPE(message) (GST_MESSAGE(message)->type)
2433 * Get a constant string representation of the GstMessageType of message.
2434 * message:
2435 * a GstMessage
2436 * Since 0.10.4
2438 // TODO
2439 // #define GST_MESSAGE_TYPE_NAME(message) gst_message_type_get_name(GST_MESSAGE_TYPE(message))
2442 * Creates a copy of the message. Returns a copy of the message.
2443 * MT safe
2444 * msg:
2445 * the message to copy
2447 // TODO
2448 // #define gst_message_copy(msg) GST_MESSAGE (gst_mini_object_copy (GST_MINI_OBJECT (msg)))
2451 * Checks if a message is writable. If not, a writable copy is made and
2452 * returned. Returns a message (possibly a duplicate) that is writable.
2453 * MT safe
2454 * msg:
2455 * the message to make writable
2457 // TODO
2458 // #define gst_message_make_writable(msg) GST_MESSAGE (gst_mini_object_make_writable (GST_MINI_OBJECT (msg)))
2461 * Convenience macro to decrease the reference count of the message, possibly freeing
2462 * the it.
2463 * msg:
2464 * the message to unref
2465 * See Also
2466 * GstBus, GstMiniObject, GstElement
2468 // TODO
2469 // #define gst_message_unref(msg) gst_mini_object_unref (GST_MINI_OBJECT (msg))
2472 * This macro returns the entire set of flags for the mini-object.
2473 * obj:
2474 * MiniObject to return flags for.
2476 // TODO
2477 // #define GST_MINI_OBJECT_FLAGS(obj) (GST_MINI_OBJECT(obj)->flags)
2480 * This macro checks to see if the given flag is set.
2481 * obj:
2482 * MiniObject to check for flags.
2483 * flag:
2484 * Flag to check for
2486 // TODO
2487 // #define GST_MINI_OBJECT_FLAG_IS_SET(obj,flag) !!(GST_MINI_OBJECT_FLAGS (obj) (flag))
2490 * This macro sets the given bits.
2491 * obj:
2492 * MiniObject to set flag in.
2493 * flag:
2494 * Flag to set, can by any number of bits in guint32.
2496 // TODO
2497 // #define GST_MINI_OBJECT_FLAG_SET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) |= (flag))
2500 * This macro usets the given bits.
2501 * obj:
2502 * MiniObject to unset flag in.
2503 * flag:
2504 * Flag to set, must be a single bit in guint32.
2506 // TODO
2507 // #define GST_MINI_OBJECT_FLAG_UNSET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) = ~(flag))
2510 * Get access to the reference count field of the mini-object.
2511 * obj:
2512 * a GstMiniObject
2514 // TODO
2515 // #define GST_MINI_OBJECT_REFCOUNT(obj) ((GST_MINI_OBJECT_CAST(obj))->refcount)
2518 * Get the reference count value of the mini-object.
2519 * obj:
2520 * a GstMiniObject
2522 // TODO
2523 // #define GST_MINI_OBJECT_REFCOUNT_VALUE(obj) (g_atomic_int_get ((GST_MINI_OBJECT_CAST(obj))->refcount))
2526 * This macro returns the entire set of flags for the object.
2527 * obj:
2528 * a GstObject
2530 // TODO
2531 // #define GST_OBJECT_FLAGS(obj) (GST_OBJECT_CAST (obj)->flags)
2534 * This macro checks to see if the given flag is set.
2535 * obj:
2536 * a GstObject
2537 * flag:
2538 * Flag to check for
2540 // TODO
2541 // #define GST_OBJECT_FLAG_IS_SET(obj,flag) ((GST_OBJECT_FLAGS (obj) (flag)) == (flag))
2544 * This macro sets the given bits.
2545 * obj:
2546 * a GstObject
2547 * flag:
2548 * Flag to set
2550 // TODO
2551 // #define GST_OBJECT_FLAG_SET(obj,flag) (GST_OBJECT_FLAGS (obj) |= (flag))
2554 * This macro usets the given bits.
2555 * obj:
2556 * a GstObject
2557 * flag:
2558 * Flag to set
2560 // TODO
2561 // #define GST_OBJECT_FLAG_UNSET(obj,flag) (GST_OBJECT_FLAGS (obj) = ~(flag))
2564 * Get the name of this object
2565 * obj:
2566 * a GstObject
2568 // TODO
2569 // #define GST_OBJECT_NAME(obj) (GST_OBJECT_CAST(obj)->name)
2572 * Get the parent of this object
2573 * obj:
2574 * a GstObject
2576 // TODO
2577 // #define GST_OBJECT_PARENT(obj) (GST_OBJECT_CAST(obj)->parent)
2580 * Check if the given object is beeing destroyed.
2581 * obj:
2582 * a GstObject
2584 // TODO
2585 // #define GST_OBJECT_IS_DISPOSING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_DISPOSING))
2588 * Check if the given object is floating (has no owner).
2589 * obj:
2590 * a GstObject
2592 // TODO
2593 // #define GST_OBJECT_IS_FLOATING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_FLOATING))
2596 * Get access to the reference count field of the object.
2597 * obj:
2598 * a GstObject
2600 // TODO
2601 // #define GST_OBJECT_REFCOUNT(obj) (((GObject*)(obj))->ref_count)
2604 * Get the reference count value of the object.
2605 * obj:
2606 * a GstObject
2608 // TODO
2609 // #define GST_OBJECT_REFCOUNT_VALUE(obj) g_atomic_int_get (GST_OBJECT_REFCOUNT(obj))
2612 * This macro will return the class lock used to protect deep_notify signal
2613 * emission on thread-unsafe glib versions (glib < 2.8).
2614 * obj:
2615 * a GstObjectClass
2617 // TODO
2618 // #define GST_CLASS_GET_LOCK(obj) (GST_OBJECT_CLASS_CAST(obj)->lock)
2621 * Lock the class.
2622 * obj:
2623 * a GstObjectClass
2625 // TODO
2626 // #define GST_CLASS_LOCK(obj) (g_static_rec_mutex_lock(GST_CLASS_GET_LOCK(obj)))
2629 * Try to lock the class, returns TRUE if class could be locked.
2630 * obj:
2631 * a GstObjectClass
2633 // TODO
2634 // #define GST_CLASS_TRYLOCK(obj) (g_static_rec_mutex_trylock(GST_CLASS_GET_LOCK(obj)))
2637 * Unlock the class.
2638 * obj:
2639 * a GstObjectClass
2641 // TODO
2642 // #define GST_CLASS_UNLOCK(obj) (g_static_rec_mutex_unlock(GST_CLASS_GET_LOCK(obj)))
2645 * This macro will obtain a lock on the object, making serialization possible.
2646 * It blocks until the lock can be obtained.
2647 * obj:
2648 * a GstObject to lock
2650 // TODO
2651 // #define GST_OBJECT_LOCK(obj) g_mutex_lock(GST_OBJECT_GET_LOCK(obj))
2654 * This macro will try to obtain a lock on the object, but will return with
2655 * FALSE if it can't get it immediately.
2656 * obj:
2657 * a Object.
2659 // TODO
2660 // #define GST_OBJECT_TRYLOCK(obj) g_mutex_trylock(GST_OBJECT_GET_LOCK(obj))
2663 * This macro releases a lock on the object.
2664 * obj:
2665 * a GstObject to unlock.
2667 // TODO
2668 // #define GST_OBJECT_UNLOCK(obj) g_mutex_unlock(GST_OBJECT_GET_LOCK(obj))
2671 * Acquire a reference to the mutex of this object.
2672 * obj:
2673 * a GstObject
2675 // TODO
2676 // #define GST_OBJECT_GET_LOCK(obj) (GST_OBJECT_CAST(obj)->lock)
2679 * Macro to test if the given GstPadLinkReturn value indicates a failed
2680 * link step.
2681 * ret:
2682 * the GstPadLinkReturn value
2684 // TODO
2685 // #define GST_PAD_LINK_FAILED(ret) ((ret) < GST_PAD_LINK_OK)
2688 * Macro to test if the given GstPadLinkReturn value indicates a successful
2689 * link step.
2690 * ret:
2691 * the GstPadLinkReturn value
2693 // TODO
2694 // #define GST_PAD_LINK_SUCCESSFUL(ret) ((ret) >= GST_PAD_LINK_OK)
2697 * Get a copy of the name of the pad. g_free() after usage.
2698 * MT safe.
2699 * pad:
2700 * the pad to get the name from
2702 // TODO
2703 // #define gst_pad_get_name(pad) gst_object_get_name (GST_OBJECT_CAST (pad))
2706 * Get the parent of pad. This function increases the refcount
2707 * of the parent object so you should gst_object_unref() it after usage.
2708 * Can return NULL if the pad did not have a parent.
2709 * MT safe.
2710 * pad:
2711 * the pad to get the parent of
2713 // TODO
2714 // #define gst_pad_get_parent(pad) gst_object_get_parent (GST_OBJECT_CAST (pad))
2717 * Get the stream lock of pad. The stream lock is protecting the
2718 * resources used in the data processing functions of pad.
2719 * pad:
2720 * a GstPad
2722 // TODO
2723 // #define GST_PAD_GET_STREAM_LOCK(pad) (GST_PAD_CAST(pad)->stream_rec_lock)
2726 * Lock the stream lock of pad.
2727 * pad:
2728 * a GstPad
2730 // TODO
2731 // #define GST_PAD_STREAM_LOCK(pad) (g_static_rec_mutex_lock(GST_PAD_GET_STREAM_LOCK(pad)))
2734 * Lock the stream lock of pad t times.
2735 * pad:
2736 * a GstPad
2737 * t:
2738 * the number of times to recursively lock
2740 // TODO
2741 // #define GST_PAD_STREAM_LOCK_FULL(pad,t) (g_static_rec_mutex_lock_full(GST_PAD_GET_STREAM_LOCK(pad), t))
2744 * Try to Lock the stream lock of the pad, return TRUE if the lock could be
2745 * taken.
2746 * pad:
2747 * a GstPad
2749 // TODO
2750 // #define GST_PAD_STREAM_TRYLOCK(pad) (g_static_rec_mutex_trylock(GST_PAD_GET_STREAM_LOCK(pad)))
2753 * Unlock the stream lock of pad.
2754 * pad:
2755 * a GstPad
2757 // TODO
2758 // #define GST_PAD_STREAM_UNLOCK(pad) (g_static_rec_mutex_unlock(GST_PAD_GET_STREAM_LOCK(pad)))
2761 * Fully unlock the recursive stream lock of pad, return the number of times
2762 * pad was locked.
2763 * pad:
2764 * a GstPad
2766 // TODO
2767 // #define GST_PAD_STREAM_UNLOCK_FULL(pad) (g_static_rec_mutex_unlock_full(GST_PAD_GET_STREAM_LOCK(pad)))
2770 * Macro to test if the given GstFlowReturn value indicates a fatal
2771 * error. This macro is mainly used in elements to decide when an error
2772 * message should be posted on the bus.
2773 * ret:
2774 * a GstFlowReturn value
2775 * Property Details
2776 * The "caps" property
2777 * "caps" GstCaps : Read
2778 * The capabilities of the pad.
2780 // TODO
2781 // #define GST_FLOW_IS_FATAL(ret) ((ret) <= GST_FLOW_UNEXPECTED)
2784 * Convenience macro to fill the values of a GstStaticPadTemplate
2785 * structure.
2786 * padname:
2787 * the name template of pad
2788 * dir:
2789 * the GstPadDirection of the pad
2790 * pres:
2791 * the GstPadPresence of the pad
2792 * caps:
2793 * the GstStaticCaps of the pad
2795 // TODO
2796 // #define GST_STATIC_PAD_TEMPLATE(padname, dir, pres, caps)
2799 * Get the nametemplate of the padtemplate.
2800 * templ:
2801 * the template to query
2803 // TODO
2804 // #define GST_PAD_TEMPLATE_NAME_TEMPLATE(templ) (((GstPadTemplate *)(templ))->name_template)
2807 * Get the direction of the padtemplate.
2808 * templ:
2809 * the template to query
2811 // TODO
2812 // #define GST_PAD_TEMPLATE_DIRECTION(templ) (((GstPadTemplate *)(templ))->direction)
2815 * Get the presence of the padtemplate.
2816 * templ:
2817 * the template to query
2819 // TODO
2820 // #define GST_PAD_TEMPLATE_PRESENCE(templ) (((GstPadTemplate *)(templ))->presence)
2823 * Get a handle to the padtemplate GstCaps
2824 * templ:
2825 * the template to query
2827 // TODO
2828 // #define GST_PAD_TEMPLATE_CAPS(templ) (((GstPadTemplate *)(templ))->caps)
2831 * Check if the properties of the padtemplate are fixed
2832 * templ:
2833 * the template to query
2835 // TODO
2836 // #define GST_PAD_TEMPLATE_IS_FIXED(templ) (GST_OBJECT_FLAG_IS_SET(templ, GST_PAD_TEMPLATE_FIXED))
2839 * This macro needs to be used to define the entry point and meta data of a
2840 * plugin. One would use this macro to export a plugin, so that it can be used
2841 * by other applications
2842 * major:
2843 * major version number of the gstreamer-core that plugin was compiled for
2844 * minor:
2845 * minor version number of the gstreamer-core that plugin was compiled for
2846 * name:
2847 * short, but unique name of the plugin
2848 * description:
2849 * information about the purpose of the plugin
2850 * init:
2851 * function pointer to the plugin_init method with the signature of static gboolean plugin_init (GstPlugin * plugin).
2852 * version:
2853 * full version string (e.g. VERSION from config.h)
2854 * license:
2855 * under which licence the package has been released, e.g. GPL, LGPL.
2856 * package:
2857 * the package-name (e.g. PACKAGE_NAME from config.h)
2858 * origin:
2859 * a description from where the package comes from (e.g. the homepage URL)
2861 // TODO
2862 // #define GST_PLUGIN_DEFINE(major,minor,name,description,init,version,license,package,origin)
2865 * This macro needs to be used to define the entry point and meta data of a
2866 * local plugin. One would use this macro to define a local plugin that can only
2867 * be used by the own application.
2868 * major:
2869 * major version number of the gstreamer-core that plugin was compiled for
2870 * minor:
2871 * minor version number of the gstreamer-core that plugin was compiled for
2872 * name:
2873 * short, but unique name of the plugin
2874 * description:
2875 * information about the purpose of the plugin
2876 * init:
2877 * function pointer to the plugin_init method with the signature of static gboolean plugin_init (GstPlugin * plugin).
2878 * version:
2879 * full version string (e.g. VERSION from config.h)
2880 * license:
2881 * under which licence the package has been released, e.g. GPL, LGPL.
2882 * package:
2883 * the package-name (e.g. PACKAGE_NAME from config.h)
2884 * origin:
2885 * a description from where the package comes from (e.g. the homepage URL)
2887 // TODO
2888 // #define GST_PLUGIN_DEFINE_STATIC(major,minor,name,description,init,version,license,package,origin)
2891 * Get the name of the feature
2892 * feature:
2893 * The feature to query
2895 // TODO
2896 // #define GST_PLUGIN_FEATURE_NAME(feature) (GST_PLUGIN_FEATURE (feature)->name)
2899 * Get the GstQueryType of the query.
2900 * query:
2901 * the query to query
2903 // TODO
2904 // #define GST_QUERY_TYPE(query) (((GstQuery*)(query))->type)
2907 * Get a constant string representation of the GstQueryType of the query.
2908 * query:
2909 * the query to query
2910 * Since 0.10.4
2912 // TODO
2913 // #define GST_QUERY_TYPE_NAME(query) (gst_query_type_get_name(GST_QUERY_TYPE(query)))
2916 * Increases the refcount of the given query by one.
2917 * q:
2918 * a GstQuery to increase the refcount of.
2920 // TODO
2921 // #define gst_query_ref(q) GST_QUERY (gst_mini_object_ref (GST_MINI_OBJECT (q)))
2924 * Decreases the refcount of the query. If the refcount reaches 0, the query
2925 * will be freed.
2926 * q:
2927 * a GstQuery to decrease the refcount of.
2929 // TODO
2930 // #define gst_query_unref(q) gst_mini_object_unref (GST_MINI_OBJECT (q))
2933 * Copies the given query using the copy function of the parent GstData
2934 * structure.
2935 * q:
2936 * a GstQuery to copy.
2938 // TODO
2939 // #define gst_query_copy(q) GST_QUERY (gst_mini_object_copy (GST_MINI_OBJECT (q)))
2942 * Makes a writable query from the given query.
2943 * q:
2944 * a GstQuery to make writable
2946 // TODO
2947 // #define gst_query_make_writable(q) GST_QUERY (gst_mini_object_make_writable (GST_MINI_OBJECT (q)))
2950 * Get the list of paths for the default registry.
2952 // TODO
2953 // #define gst_default_registry_get_path_list()
2956 * Add the plugin to the default registry.
2957 * The plugin-added signal will be emitted.
2958 * plugin:
2959 * the plugin to add
2961 // TODO
2962 // #define gst_default_registry_add_plugin(plugin)
2965 * Add the given path to the default registry. The syntax of the
2966 * path is specific to the registry. If the path has already been
2967 * added, do nothing.
2968 * path:
2969 * the path to add to the registry
2971 // TODO
2972 // #define gst_default_registry_add_path(path)
2975 * Find the plugin with the given name in the default registry.
2976 * The plugin will be reffed; caller is responsible for unreffing.
2977 * name:
2978 * the plugin name to find
2980 // TODO
2981 // #define gst_default_registry_find_plugin(name)
2984 * Find the pluginfeature with the given name and type in the default registry.
2985 * name:
2986 * the pluginfeature name to find
2987 * type:
2988 * the pluginfeature type to find
2990 // TODO
2991 // #define gst_default_registry_find_feature(name,type)
2994 * Get a copy of all plugins registered in the default registry.
2996 // TODO
2997 // #define gst_default_registry_get_plugin_list()
3000 * Runs a filter against all features of the plugins in the default registry
3001 * and returns a GList with the results.
3002 * If the first flag is set, only the first match is
3003 * returned (as a list with a single object).
3004 * filter:
3005 * the filter to use
3006 * first:
3007 * only return first match
3008 * user_data:
3009 * user data passed to the filter function
3010 * See Also
3011 * GstPlugin, GstPluginFeature
3013 // TODO
3014 // #define gst_default_registry_feature_filter(filter,first,user_data)
3017 * Send a broadcast signal to all waiting task conds
3018 * task:
3019 * Task to broadcast
3021 // TODO
3022 // #define GST_TASK_BROADCAST(task) g_cond_breadcast(GST_TASK_GET_COND (task))
3025 * Get access to the cond of the task.
3026 * task:
3027 * Task to get the cond of
3029 // TODO
3030 // #define GST_TASK_GET_COND(task) (GST_TASK_CAST(task)->cond)
3033 * Get access to the task lock.
3034 * task:
3035 * Task to get the lock of
3037 // TODO
3038 // #define GST_TASK_GET_LOCK(task) (GST_TASK_CAST(task)->lock)
3041 * Signal the task cond
3042 * task:
3043 * Task to signal
3045 // TODO
3046 // #define GST_TASK_SIGNAL(task) g_cond_signal(GST_TASK_GET_COND (task))
3049 * Get access to the state of the task.
3050 * task:
3051 * Task to get the state of
3053 // TODO
3054 // #define GST_TASK_STATE(task) (GST_TASK_CAST(task)->state)
3057 * Wait for the task cond to be signalled
3058 * task:
3059 * Task to wait for
3061 // TODO
3062 // #define GST_TASK_WAIT(task) g_cond_wait(GST_TASK_GET_COND (task), GST_OBJECT_GET_LOCK (task))
3065 * Specifies the type of function passed to gst_bus_add_watch() or
3066 * gst_bus_add_watch_full(), which is called from the mainloop when a message
3067 * is available on the bus.
3068 * The message passed to the function will be unreffed after execution of this
3069 * function so it should not be freed in the function.
3070 * Note that this function is used as a GSourceFunc which means that returning
3071 * FALSE will remove the GSource from the mainloop.
3072 * bus:
3073 * the GstBus that sent the message
3074 * message:
3075 * the GstMessage
3076 * data:
3077 * user data that has been given, when registering the handler
3078 * Returns:
3079 * FALSE if the event source should be removed.
3081 // gboolean (*GstBusFunc) (GstBus *bus, GstMessage *message, gpointer data);
3082 public typedef extern(C) int function (GstBus*, GstMessage*, void*) GstBusFunc;
3085 * Handler will be invoked synchronously, when a new message has been injected
3086 * into the bus. This function is mostly used internally. Only one sync handler
3087 * can be attached to a given bus.
3088 * If the handler returns GST_BUS_DROP, it should unref the message, else the
3089 * message should not be unreffed by the sync handler.
3090 * bus:
3091 * the GstBus that sent the message
3092 * message:
3093 * the GstMessage
3094 * data:
3095 * user data that has been given, when registering the handler
3096 * Returns:
3097 * GstBusSyncReply stating what to do with the message
3099 // GstBusSyncReply (*GstBusSyncHandler) (GstBus *bus, GstMessage *message, gpointer data);
3100 public typedef extern(C) GstBusSyncReply function (GstBus*, GstMessage*, void*) GstBusSyncHandler;
3103 * The function prototype of the callback.
3104 * clock:
3105 * The clock that triggered the callback
3106 * time:
3107 * The time it was triggered
3108 * id:
3109 * The GstClockID that expired
3110 * user_data:
3111 * user data passed in the async_wait call
3112 * Returns:
3113 * TRUE or FALSE (currently unused)
3115 // gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time, GstClockID id, gpointer user_data);
3116 public typedef extern(C) int function (GstClock*, GstClockTime, GstClockID, void*) GstClockCallback;
3119 * Function to filter out entries in the index.
3120 * index:
3121 * The index being queried
3122 * entry:
3123 * The entry to be added.
3124 * user_data:
3125 * User data passed to the function.
3126 * Returns:
3127 * This function should return TRUE if the entry is to be added
3128 * to the index, FALSE otherwise.
3130 // gboolean (*GstIndexFilter) (GstIndex *index, GstIndexEntry *entry, gpointer user_data);
3131 public typedef extern(C) int function (GstIndex*, GstIndexEntry*, void*) GstIndexFilter;
3134 * Function to resolve ids to writer descriptions.
3135 * index:
3136 * the index being queried.
3137 * writer:
3138 * The object that wants to write
3139 * writer_string:
3140 * A description of the writer.
3141 * user_data:
3142 * user_data as registered
3143 * Returns:
3144 * TRUE if an id could be assigned to the writer.
3146 // gboolean (*GstIndexResolver) (GstIndex *index, GstObject *writer, gchar **writer_string, gpointer user_data);
3147 public typedef extern(C) int function (GstIndex*, GstObject*, gchar**, void*) GstIndexResolver;
3150 * The function that will be called when a GList iterator is freed. The
3151 * owner of the GList iterator can then clean up its resources.
3152 * owner:
3153 * the owner of the iterator
3155 // void (*GstIteratorDisposeFunction) (gpointer owner);
3156 public typedef extern(C) void function (void*) GstIteratorDisposeFunction;
3159 * The function that will be called when the next element of the iterator
3160 * should be retrieved.
3161 * Implementors of a GstIterator should implement this
3162 * function and pass it to the constructor of the custom iterator.
3163 * The function will be called with the iterator lock held.
3164 * it:
3165 * the iterator
3166 * result:
3167 * a pointer to hold the next item
3168 * Returns:
3169 * the result of the operation.
3171 // GstIteratorResult (*GstIteratorNextFunction) (GstIterator *it, gpointer *result);
3172 public typedef extern(C) GstIteratorResult function (GstIterator*, gpointer*) GstIteratorNextFunction;
3175 * The function that will be called after the next item of the iterator
3176 * has been retrieved. This function will typically increase the refcount
3177 * of the item or make a copy.
3178 * Implementors of a GstIterator should implement this
3179 * function and pass it to the constructor of the custom iterator.
3180 * The function will be called with the iterator lock held.
3181 * it:
3182 * the iterator
3183 * item:
3184 * the item being retrieved.
3185 * Returns:
3186 * the result of the operation.
3188 // GstIteratorItem (*GstIteratorItemFunction) (GstIterator *it, gpointer item);
3189 public typedef extern(C) GstIteratorItem function (GstIterator*, void*) GstIteratorItemFunction;
3192 * This function will be called whenever a concurrent update happened
3193 * to the iterated datastructure. The implementor of the iterator should
3194 * restart the iterator from the beginning and clean up any state it might
3195 * have.
3196 * Implementors of a GstIterator should implement this
3197 * function and pass it to the constructor of the custom iterator.
3198 * The function will be called with the iterator lock held.
3199 * it:
3200 * the iterator
3202 // void (*GstIteratorResyncFunction) (GstIterator *it);
3203 public typedef extern(C) void function (GstIterator*) GstIteratorResyncFunction;
3206 * This function will be called when the iterator is freed.
3207 * Implementors of a GstIterator should implement this
3208 * function and pass it to the constructor of the custom iterator.
3209 * The function will be called with the iterator lock held.
3210 * it:
3211 * the iterator
3213 // void (*GstIteratorFreeFunction) (GstIterator *it);
3214 public typedef extern(C) void function (GstIterator*) GstIteratorFreeFunction;
3217 * A function to be passed to gst_iterator_fold().
3218 * item:
3219 * the item to fold
3220 * ret:
3221 * a GValue collecting the result
3222 * user_data:
3223 * data passed to gst_iterator_fold()
3224 * Returns:
3225 * TRUE if the fold should continue, FALSE if it should stop.
3227 // gboolean (*GstIteratorFoldFunction) (gpointer item, GValue *ret, gpointer user_data);
3228 public typedef extern(C) int function (void*, GValue*, void*) GstIteratorFoldFunction;
3231 * Virtual function prototype for methods to create copies of instances.
3232 * obj:
3233 * MiniObject to copy
3234 * Returns:
3235 * reference to cloned instance.
3237 // GstMiniObject* (*GstMiniObjectCopyFunction) (const GstMiniObject *obj);
3238 public typedef extern(C) GstMiniObject* function (GstMiniObject*) GstMiniObjectCopyFunction;
3241 * Virtual function prototype for methods to free ressources used by
3242 * mini-objects. Subclasses of the mini object are allowed to revive the
3243 * passed object by doing a gst_mini_object_ref(). If the object is not
3244 * revived after the finalize function, the memory associated with the
3245 * object is freed.
3246 * obj:
3247 * MiniObject to finalize
3249 // void (*GstMiniObjectFinalizeFunction) (GstMiniObject *obj);
3250 public typedef extern(C) void function (GstMiniObject*) GstMiniObjectFinalizeFunction;
3253 * Callback used by gst_pad_set_blocked_async(). Gets called when the blocking
3254 * operation succeeds.
3255 * pad:
3256 * the GstPad that is blockend or unblocked.
3257 * blocked:
3258 * blocking state for the pad
3259 * user_data:
3260 * the gpointer to optional user data.
3262 // void (*GstPadBlockCallback) (GstPad *pad, gboolean blocked, gpointer user_data);
3263 public typedef extern(C) void function (GstPad*, int, void*) GstPadBlockCallback;
3266 * Ask the sinkpad pad to allocate a buffer with offset, size and caps.
3267 * The result will be stored in buf.
3268 * The purpose of this function is to allocate a buffer that is optimal to
3269 * be processed by pad. The function is mostly overridden by elements that can
3270 * provide a hardware buffer in order to avoid additional memcpy operations.
3271 * The function can return a buffer that does not have caps, in which case the
3272 * upstream element requests a format change.
3273 * When this function returns anything else than GST_FLOW_OK, the buffer allocation
3274 * failed and buf does not contain valid data.
3275 * By default this function returns a new buffer of size and with caps containing
3276 * purely malloced data.
3277 * pad:
3278 * a sink GstPad
3279 * offset:
3280 * the desired offset of the buffer
3281 * size:
3282 * the desired size of the buffer
3283 * caps:
3284 * the desired caps of the buffer
3285 * buf:
3286 * pointer to hold the allocated buffer.
3287 * Returns:
3288 * GST_FLOW_OK if buf contains a valid buffer, any other return
3289 * value means buf does not hold a valid buffer.
3291 // GstFlowReturn (*GstPadBufferAllocFunction) (GstPad *pad, guint64 offset, guint size, GstCaps *caps, GstBuffer **buf);
3292 public typedef extern(C) GstFlowReturn function (GstPad*, ulong, uint, GstCaps*, GstBuffer**) GstPadBufferAllocFunction;
3295 * A function that will be called on sinkpads when chaining buffers.
3296 * pad:
3297 * the GstPad that performed the chain.
3298 * buffer:
3299 * the GstBuffer that is chained.
3300 * Returns:
3301 * GST_FLOW_OK for success
3303 // GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstBuffer *buffer);
3304 public typedef extern(C) GstFlowReturn function (GstPad*, GstBuffer*) GstPadChainFunction;
3307 * Check if pad can be activated in pull mode.
3308 * This function will be deprecated after 0.10; use the seeking query to check
3309 * if a pad can support random access.
3310 * pad:
3311 * a GstPad
3312 * Returns:
3313 * TRUE if the pad can operate in pull mode.
3315 // gboolean (*GstPadCheckGetRangeFunction) (GstPad *pad);
3316 public typedef extern(C) int function (GstPad*) GstPadCheckGetRangeFunction;
3319 * This function will be called on sourcepads when a peer element
3320 * request a buffer at the specified offset and length. If this function
3321 * returns GST_FLOW_OK, the result buffer will be stored in buffer. The
3322 * contents of buffer is invalid for any other return value.
3323 * pad:
3324 * the GstPad to perform the getrange on.
3325 * offset:
3326 * the offset of the range
3327 * length:
3328 * the length of the range
3329 * buffer:
3330 * a memory location to hold the result buffer
3331 * Returns:
3332 * GST_FLOW_OK for success
3334 // GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, guint64 offset, guint length, GstBuffer **buffer);
3335 public typedef extern(C) GstFlowReturn function (GstPad*, ulong, uint, GstBuffer**) GstPadGetRangeFunction;
3338 * Function signature to handle an event for the pad.
3339 * pad:
3340 * the GstPad to handle the event.
3341 * event:
3342 * the GstEvent to handle.
3343 * Returns:
3344 * TRUE if the pad could handle the event.
3346 // gboolean (*GstPadEventFunction) (GstPad *pad, GstEvent *event);
3347 public typedef extern(C) int function (GstPad*, GstEvent*) GstPadEventFunction;
3350 * Function signature to handle a new link on the pad.
3351 * pad:
3352 * the GstPad that is linked.
3353 * peer:
3354 * the peer GstPad of the link
3355 * Returns:
3356 * the result of the link with the specified peer.
3358 // GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, GstPad *peer);
3359 public typedef extern(C) GstPadLinkReturn function (GstPad*, GstPad*) GstPadLinkFunction;
3362 * Function signature to handle a unlinking the pad prom its peer.
3363 * pad:
3364 * the GstPad that is linked.
3366 // void (*GstPadUnlinkFunction) (GstPad *pad);
3367 public typedef extern(C) void function (GstPad*) GstPadUnlinkFunction;
3370 * Check if pad can accept caps. By default this function will see if caps
3371 * intersect with the result from gst_pad_get_caps() by can be overridden to
3372 * perform extra checks.
3373 * pad:
3374 * the GstPad to check
3375 * caps:
3376 * the GstCaps to check
3377 * Returns:
3378 * TRUE if the caps can be accepted by the pad.
3380 // gboolean (*GstPadAcceptCapsFunction) (GstPad *pad, GstCaps *caps);
3381 public typedef extern(C) int function (GstPad*, GstCaps*) GstPadAcceptCapsFunction;
3384 * Returns a copy of the capabilities of the specified pad. By default this
3385 * function will return the pad template capabilities, but can optionally
3386 * be overridden by elements.
3387 * pad:
3388 * the GstPad to get the capabilities of.
3389 * Returns:
3390 * a newly allocated copy GstCaps of the pad.
3392 // GstCaps* (*GstPadGetCapsFunction) (GstPad *pad);
3393 public typedef extern(C) GstCaps* function (GstPad*) GstPadGetCapsFunction;
3396 * Set caps on pad. By default this function updates the caps of the
3397 * pad but the function can be overriden by elements to perform extra
3398 * actions or verifications.
3399 * pad:
3400 * the GstPad to set the capabilities of.
3401 * caps:
3402 * the GstCaps to set
3403 * Returns:
3404 * TRUE if the caps could be set on the pad.
3406 // gboolean (*GstPadSetCapsFunction) (GstPad *pad, GstCaps *caps);
3407 public typedef extern(C) int function (GstPad*, GstCaps*) GstPadSetCapsFunction;
3410 * Given possibly unfixed caps caps, let pad use its default prefered
3411 * format to make a fixed caps. caps should be writable. By default this
3412 * function will pick the first value of any ranges or lists in the caps but
3413 * elements can override this function to perform other behaviour.
3414 * pad:
3415 * a GstPad
3416 * caps:
3417 * the GstCaps to fixate
3419 // void (*GstPadFixateCapsFunction) (GstPad *pad, GstCaps *caps);
3420 public typedef extern(C) void function (GstPad*, GstCaps*) GstPadFixateCapsFunction;
3423 * This function is called when the pad is activated during the element
3424 * READY to PAUSED state change. By default this function will call the
3425 * activate function that puts the pad in push mode but elements can
3426 * override this function to activate the pad in pull mode if they wish.
3427 * pad:
3428 * a GstPad
3429 * Returns:
3430 * TRUE if the pad could be activated.
3432 // gboolean (*GstPadActivateFunction) (GstPad *pad);
3433 public typedef extern(C) int function (GstPad*) GstPadActivateFunction;
3436 * The prototype of the push and pull activate functions.
3437 * pad:
3438 * a GstPad
3439 * active:
3440 * activate or deactivate the pad.
3441 * Returns:
3442 * TRUE if the pad could be activated or deactivated.
3444 // gboolean (*GstPadActivateModeFunction) (GstPad *pad, gboolean active);
3445 public typedef extern(C) int function (GstPad*, int) GstPadActivateModeFunction;
3448 * The signature of the query function.
3449 * pad:
3450 * the GstPad to query.
3451 * query:
3452 * the GstQuery object to execute
3453 * Returns:
3454 * TRUE if the query could be performed.
3456 // gboolean (*GstPadQueryFunction) (GstPad *pad, GstQuery *query);
3457 public typedef extern(C) int function (GstPad*, GstQuery*) GstPadQueryFunction;
3460 * The signature of the query types function.
3461 * pad:
3462 * a GstPad to query
3463 * Returns:
3464 * a constant array of query types
3466 // const GstQueryType* (*GstPadQueryTypeFunction) (GstPad *pad);
3467 public typedef extern(C) GstQueryType* function (GstPad*) GstPadQueryTypeFunction;
3470 * The signature of the internal pad link function.
3471 * pad:
3472 * The GstPad to query.
3473 * Returns:
3474 * a newly allocated GList of pads that are linked to the given pad on
3475 * the inside of the parent element.
3476 * The caller must call g_list_free() on it after use.
3478 // GList* (*GstPadIntLinkFunction) (GstPad *pad);
3479 public typedef extern(C) GList* function (GstPad*) GstPadIntLinkFunction;
3482 * A dispatcher function is called for all internally linked pads, see
3483 * gst_pad_dispatcher().
3484 * pad:
3485 * the GstPad that is dispatched.
3486 * data:
3487 * the gpointer to optional user data.
3488 * Returns:
3489 * TRUE if the dispatching procedure has to be stopped.
3491 // gboolean (*GstPadDispatcherFunction) (GstPad *pad, gpointer data);
3492 public typedef extern(C) int function (GstPad*, void*) GstPadDispatcherFunction;
3495 * A plugin should provide a pointer to a function of this type in the
3496 * plugin_desc struct.
3497 * This function will be called by the loader at startup.
3498 * plugin:
3499 * The plugin object that can be used to register GstPluginFeatures for this plugin.
3500 * Returns:
3501 * TRUE if plugin initialised successfully
3503 // gboolean (*GstPluginInitFunc) (GstPlugin *plugin);
3504 public typedef extern(C) int function (GstPlugin*) GstPluginInitFunc;
3507 * A function that can be used with e.g. gst_registry_plugin_filter()
3508 * to get a list of plugins that match certain criteria.
3509 * plugin:
3510 * the plugin to check
3511 * user_data:
3512 * the user_data that has been passed on e.g. gst_registry_plugin_filter()
3513 * Returns:
3514 * TRUE for a positive match, FALSE otherwise
3516 // gboolean (*GstPluginFilter) (GstPlugin *plugin, gpointer user_data);
3517 public typedef extern(C) int function (GstPlugin*, void*) GstPluginFilter;
3520 * A function that can be used with e.g. gst_registry_feature_filter()
3521 * to get a list of pluginfeature that match certain criteria.
3522 * feature:
3523 * the pluginfeature to check
3524 * user_data:
3525 * the user_data that has been passed on e.g.
3526 * gst_registry_feature_filter()
3527 * Returns:
3528 * TRUE for a positive match, FALSE otherwise
3530 // gboolean (*GstPluginFeatureFilter) (GstPluginFeature *feature, gpointer user_data);
3531 public typedef extern(C) int function (GstPluginFeature*, void*) GstPluginFeatureFilter;
3534 * A function that will be called in gst_structure_foreach(). The function may
3535 * not modify value.
3536 * field_id:
3537 * the GQuark of the field name
3538 * value:
3539 * the GValue of the field
3540 * user_data:
3541 * user data
3542 * Returns:
3543 * TRUE if the foreach operation should continue, FALSE if
3544 * the foreach operation should stop with FALSE.
3546 // gboolean (*GstStructureForeachFunc) (GQuark field_id, const GValue *value, gpointer user_data);
3547 public typedef extern(C) int function (GQuark, GValue*, void*) GstStructureForeachFunc;
3550 * A function that will be called in gst_structure_map_in_place(). The function
3551 * may modify value.
3552 * field_id:
3553 * the GQuark of the field name
3554 * value:
3555 * the GValue of the field
3556 * user_data:
3557 * user data
3558 * Returns:
3559 * TRUE if the map operation should continue, FALSE if
3560 * the map operation should stop with FALSE.
3562 // gboolean (*GstStructureMapFunc) (GQuark field_id, GValue *value, gpointer user_data);
3563 public typedef extern(C) int function (GQuark, GValue*, void*) GstStructureMapFunc;
3566 * A function that will be called in gst_tag_list_foreach(). The function may
3567 * not modify the tag list.
3568 * list:
3569 * the GstTagList
3570 * tag:
3571 * a name of a tag in list
3572 * user_data:
3573 * user data
3575 // void (*GstTagForeachFunc) (const GstTagList *list, const gchar *tag, gpointer user_data);
3576 public typedef extern(C) void function (GstTagList*, char[], void*) GstTagForeachFunc;
3579 * A function for merging multiple values of a tag used when registering
3580 * tags.
3581 * dest:
3582 * the destination GValue
3583 * src:
3584 * the source GValue
3586 // void (*GstTagMergeFunc) (GValue *dest, const GValue *src);
3587 public typedef extern(C) void function (GValue*, GValue*) GstTagMergeFunc;
3590 * A function that will repeadedly be called in the thread created by
3591 * a GstTask.
3592 * data:
3593 * user data passed to the function
3595 // void (*GstTaskFunction) (void *data);
3596 public typedef extern(C) void function (void*) GstTaskFunction;
3599 * A function that will be called by typefinding.
3600 * find:
3601 * A GstTypeFind structure
3602 * data:
3603 * optionnal data to pass to the function
3605 // void (*GstTypeFindFunction) (GstTypeFind *find, gpointer data);
3606 public typedef extern(C) void function (GstTypeFind*, void*) GstTypeFindFunction;