alternative to assert
[gtkD.git] / gtkD / wrap / gstreamertypes.d
blob8fb0d1d09fba0184d695ef652138e05dd0722dab
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 //Hand added, these might be clean to define as GstClockTimes:
32 //#define G_USEC_PER_SEC 1000000 //This should be in glib...
33 const ulong G_USEC_PER_SEC = 1000000uL;
34 //#define GST_SECOND (G_USEC_PER_SEC * G_GINT64_CONSTANT (1000))
35 const ulong GST_SECOND = (G_USEC_PER_SEC * 1000uL);
37 public alias GST_SECOND SECOND;
39 //This one is an undefined GstClockTime. How can this be ulong???
40 //I guess it should be long...???
41 //#define GST_CLOCK_TIME_NONE ((GstClockTime) -1)
42 const long GST_CLOCK_TIME_NONE = -1L;
43 public alias GST_CLOCK_TIME_NONE CLOCK_TIME_NONE;
47 /**
48 * typedef guint64 GstClockTime;
49 * A datatype to hold a time, measured in nanoseconds.
51 public alias ulong GstClockTime;
53 /**
54 * typedef gint64 GstClockTimeDiff;
55 * A datatype to hold a timedifference, measured in nanoseconds.
57 public alias long GstClockTimeDiff;
59 /**
60 * typedef gpointer GstClockID;
61 * A datatype to hold the handle to an outstanding sync or async clock callback.
63 public alias void* GstClockID;
65 /**
66 * typedef GstStructure GstTagList;
67 * Opaque GstTagList data structure.
69 public alias GstStructure GstTagList;
71 /**
72 * The standard flags that an gstobject may have.
73 * GST_OBJECT_DISPOSING
75 public enum GstObjectFlags
77 DISPOSING = (1<<0),
78 FLOATING = (1<<1),
79 /+* padding +/
80 FLAG_LAST = (1<<4)
82 alias GstObjectFlags ObjectFlags;
85 /**
86 * The standard flags that an element may have.
87 * GST_ELEMENT_LOCKED_STATE
89 public enum GstElementFlags
91 LOCKED_STATE = (GstObjectFlags.FLAG_LAST << 0),
92 IS_SINK = (GstObjectFlags.FLAG_LAST << 1),
93 UNPARENTING = (GstObjectFlags.FLAG_LAST << 2),
94 /+* padding +/
95 FLAG_LAST = (GstObjectFlags.FLAG_LAST << 16)
97 alias GstElementFlags ElementFlags;
101 * GstBinFlags are a set of flags specific to bins. Most are set/used
102 * internally. They can be checked using the GST_OBJECT_FLAG_IS_SET() macro,
103 * and (un)set using GST_OBJECT_FLAG_SET() and GST_OBJECT_FLAG_UNSET().
104 * GST_BIN_FLAG_LAST
106 public enum GstBinFlags
108 /+* padding +/
109 FLAG_LAST = (GstElementFlags.FLAG_LAST << 5)
111 alias GstBinFlags BinFlags;
114 * Flags for the padtemplate
115 * GST_MINI_OBJECT_FLAG_READONLY
117 public enum GstMiniObjectFlags
119 READONLY = (1<<0),
120 /+* padding +/
121 LAST = (1<<4)
123 alias GstMiniObjectFlags MiniObjectFlags;
126 * A set of buffer flags used to describe properties of a GstBuffer.
127 * GST_BUFFER_FLAG_READONLY
129 public enum GstBufferFlag
131 FLAG_READONLY = GstMiniObjectFlags.READONLY,
132 FLAG_PREROLL = (GstObjectFlags.FLAG_LAST << 0),
133 FLAG_DISCONT = (GstObjectFlags.FLAG_LAST << 1),
134 FLAG_IN_CAPS = (GstObjectFlags.FLAG_LAST << 2),
135 FLAG_GAP = (GstObjectFlags.FLAG_LAST << 3),
136 FLAG_DELTA_UNIT = (GstObjectFlags.FLAG_LAST << 4),
137 /+* padding +/
138 FLAG_LAST = (GstObjectFlags.FLAG_LAST << 8)
140 alias GstBufferFlag BufferFlag;
143 * The standard flags that a bus may have.
144 * GST_BUS_FLUSHING
146 public enum GstBusFlags
148 USHING = (GstObjectFlags.FLAG_LAST << 0),
149 /+* padding +/
150 AG_LAST = (GstObjectFlags.FLAG_LAST << 1)
152 alias GstBusFlags BusFlags;
155 * The result values for a GstBusSyncHandler.
156 * GST_BUS_DROP
158 public enum GstBusSyncReply
160 DROP = 0,
161 PASS = 1,
162 ASYNC = 2,
164 alias GstBusSyncReply BusSyncReply;
167 * Extra flags for a caps.
168 * GST_CAPS_FLAGS_ANY
170 public enum GstCapsFlags
172 ANY = (1 << 0)
174 alias GstCapsFlags CapsFlags;
177 * The type of the clock entry
178 * GST_CLOCK_ENTRY_SINGLE
180 public enum GstClockEntryType
182 SINGLE,
183 PERIODIC
185 alias GstClockEntryType ClockEntryType;
188 * The return value of a clock operation.
189 * GST_CLOCK_OK
191 public enum GstClockReturn
193 OK = 0,
194 EARLY = 1,
195 UNSCHEDULED = 2,
196 BUSY = 3,
197 BADTIME = 4,
198 ERROR = 5,
199 UNSUPPORTED = 6,
201 alias GstClockReturn ClockReturn;
204 * The capabilities of this clock
205 * GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC
207 public enum GstClockFlags
209 CAN_DO_SINGLE_SYNC = (GstObjectFlags.FLAG_LAST << 0),
210 CAN_DO_SINGLE_ASYNC = (GstObjectFlags.FLAG_LAST << 1),
211 CAN_DO_PERIODIC_SYNC = (GstObjectFlags.FLAG_LAST << 2),
212 CAN_DO_PERIODIC_ASYNC = (GstObjectFlags.FLAG_LAST << 3),
213 CAN_SET_RESOLUTION = (GstObjectFlags.FLAG_LAST << 4),
214 CAN_SET_MASTER = (GstObjectFlags.FLAG_LAST << 5),
215 /+* padding +/
216 LAST = (GstObjectFlags.FLAG_LAST << 8),
218 alias GstClockFlags ClockFlags;
221 * The posible states an element can be in.
222 * GST_STATE_VOID_PENDING
224 public enum GstState
226 VOID_PENDING = 0,
227 NULL = 1,
228 READY = 2,
229 PAUSED = 3,
230 PLAYING = 4
232 alias GstState State;
235 * The different (interesting) state changes that are passed to the
236 * state change functions of elements.
237 * GST_STATE_CHANGE_NULL_TO_READY
239 public enum GstStateChange
241 NULL_TO_READY = (GstState.NULL<<3) | GstState.READY,
242 READY_TO_PAUSED = (GstState.READY<<3) | GstState.PAUSED,
243 PAUSED_TO_PLAYING = (GstState.PAUSED<<3) | GstState.PLAYING,
244 PLAYING_TO_PAUSED = (GstState.PLAYING<<3) | GstState.PAUSED,
245 PAUSED_TO_READY = (GstState.PAUSED<<3) | GstState.READY,
246 READY_TO_NULL = (GstState.READY<<3) | GstState.NULL
248 alias GstStateChange StateChange;
251 * the possible return values from a state change function.
252 * GST_STATE_CHANGE_FAILURE
254 public enum GstStateChangeReturn
256 FAILURE = 0,
257 SUCCESS = 1,
258 ASYNC = 2,
259 NO_PREROLL = 3
261 alias GstStateChangeReturn StateChangeReturn;
264 * GstEventTypeFlags indicate the aspects of the different GstEventType
265 * values. You can get the type flags of a GstEventType with the
266 * gst_event_type_get_flags() function.
267 * GST_EVENT_TYPE_UPSTREAM
269 public enum GstEventTypeFlags
271 UPSTREAM = 1 << 0,
272 DOWNSTREAM = 1 << 1,
273 SERIALIZED = 1 << 2,
275 alias GstEventTypeFlags EventTypeFlags;
278 * GstEventType lists the standard event types that can be sent in a pipeline.
279 * The custom event types can be used for private messages between elements
280 * that can't be expressed using normal
281 * GStreamer buffer passing semantics. Custom events carry an arbitrary
282 * GstStructure.
283 * Specific custom events are distinguished by the name of the structure.
284 * GST_EVENT_UNKNOWN
287 public enum GstEventType
289 UNKNOWN = 0,
290 /+* bidirectional events +/
291 FLUSH_START = 16 | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM,
292 FLUSH_STOP = 32 | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
293 /+* downstream serialized events +/
294 EOS = 80 | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
295 NEWSEGMENT = 96 | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
296 TAG = 112 | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
297 BUFFERSIZE = 128 | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
298 /+* upstream events +/
299 QOS = 240 | GstEventTypeFlags.UPSTREAM,
300 SEEK = 256 | GstEventTypeFlags.UPSTREAM,
301 NAVIGATION = 272 | GstEventTypeFlags.UPSTREAM,
302 /+* custom events start here +/
303 CUSTOM_UPSTREAM = 512 | GstEventTypeFlags.UPSTREAM,
304 CUSTOM_DOWNSTREAM = 512 | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
305 CUSTOM_DOWNSTREAM_OOB = 512 | GstEventTypeFlags.DOWNSTREAM,
306 CUSTOM_BOTH = 512 | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
307 CUSTOM_BOTH_OOB = 512 | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM
309 alias GstEventType EventType;
311 /*public enum GstEventType
313 UNKNOWN = GST_EVENT_MAKE_TYPE (0, 0),
314 /+* bidirectional events +/
315 FLUSH_START = GST_EVENT_MAKE_TYPE (1, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM),
316 FLUSH_STOP = GST_EVENT_MAKE_TYPE (2, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
317 /+* downstream serialized events +/
318 EOS = GST_EVENT_MAKE_TYPE (5, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
319 NEWSEGMENT = GST_EVENT_MAKE_TYPE (6, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
320 TAG = GST_EVENT_MAKE_TYPE (7, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
321 BUFFERSIZE = GST_EVENT_MAKE_TYPE (8, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
322 /+* upstream events +/
323 QOS = GST_EVENT_MAKE_TYPE (15, GstEventTypeFlags.UPSTREAM),
324 SEEK = GST_EVENT_MAKE_TYPE (16, GstEventTypeFlags.UPSTREAM),
325 NAVIGATION = GST_EVENT_MAKE_TYPE (17, GstEventTypeFlags.UPSTREAM),
326 /+* custom events start here +/
327 CUSTOM_UPSTREAM = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.UPSTREAM),
328 CUSTOM_DOWNSTREAM = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
329 CUSTOM_DOWNSTREAM_OOB = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.DOWNSTREAM),
330 CUSTOM_BOTH = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED),
331 CUSTOM_BOTH_OOB = GST_EVENT_MAKE_TYPE (32, GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM)
333 alias GstEventType EventType;
337 * The different types of seek events. When constructing a seek event, a format,
338 * a seek method and optional flags are to be provided. The seek event is then
339 * inserted into the graph with gst_pad_send_event() or
340 * gst_element_send_event().
341 * GST_SEEK_TYPE_NONE
343 public enum GstSeekType
345 /+* one of these +/
346 NONE = 0,
347 CUR = 1,
348 SET = 2,
349 END = 3
350 /*GST_SEEK_TYPE_NONE = 0,
351 GST_SEEK_TYPE_CUR = 1,
352 GST_SEEK_TYPE_SET = 2,
353 GST_SEEK_TYPE_END = 3*/
355 alias GstSeekType SeekType;
358 * Flags to be used with gst_element_seek() or gst_event_new_seek()
359 * A non flushing seek might take some time to perform as the currently
360 * playing data in the pipeline will not be cleared.
361 * An accurate seek might be slower for formats that don't have any indexes
362 * or timestamp markers in the stream. Specifying this flag might require a
363 * complete scan of the file in those cases.
364 * When performing a segment seek: after the playback of the segment completes,
365 * no EOS will be emmited by the element that performed the seek, but a
366 * SEGMENT_DONE message will be posted on the bus by the element. When this
367 * message is posted, it is possible to send a new seek event to continue
368 * playback. With this seek method it is possible to perform seemless looping
369 * or simple linear editing.
370 * GST_SEEK_FLAG_NONE
372 public enum GstSeekFlags
374 NONE = 0,
375 FLUSH = (1 << 0),
376 ACCURATE = (1 << 1),
377 KEY_UNIT = (1 << 2),
378 SEGMENT = (1 << 3)
380 alias GstSeekFlags SeekFlags;
383 * Standard predefined formats
384 * GST_FORMAT_UNDEFINED
386 public enum GstFormat
388 UNDEFINED = 0, /+* must be first inn list +/
389 DEFAULT = 1,
390 BYTES = 2,
391 TIME = 3,
392 BUFFERS = 4,
393 PERCENT = 5
395 alias GstFormat Format;
398 * Core errors are errors inside the core GStreamer library.
399 * GST_CORE_ERROR_FAILED
401 public enum GstCoreError
403 FAILED = 1,
404 TOO_LAZY,
405 NOT_IMPLEMENTED,
406 STATE_CHANGE,
407 PAD,
408 THREAD,
409 NEGOTIATION,
410 EVENT,
411 SEEK,
412 CAPS,
413 TAG,
414 MISSING_PLUGIN,
415 CLOCK,
416 NUM_ERRORS
418 alias GstCoreError CoreError;
421 * Library errors are for errors from the library being used by elements
422 * (initializing, finalizing, settings, ...)
423 * GST_LIBRARY_ERROR_FAILED
425 public enum GstLibraryError
427 FAILED = 1,
428 TOO_LAZY,
429 INIT,
430 SHUTDOWN,
431 SETTINGS,
432 ENCODE,
433 NUM_ERRORS
435 alias GstLibraryError LibraryError;
438 * Resource errors are for any resource used by an element:
439 * memory, files, network connections, process space, ...
440 * They're typically used by source and sink elements.
441 * GST_RESOURCE_ERROR_FAILED
443 public enum GstResourceError
445 FAILED = 1,
446 TOO_LAZY,
447 NOT_FOUND,
448 BUSY,
449 OPEN_READ,
450 OPEN_WRITE,
451 OPEN_READ_WRITE,
452 CLOSE,
453 READ,
454 WRITE,
455 SEEK,
456 SYNC,
457 SETTINGS,
458 NO_SPACE_LEFT,
459 NUM_ERRORS
461 alias GstResourceError ResourceError;
464 * Stream errors are for anything related to the stream being processed:
465 * format errors, media type errors, ...
466 * They're typically used by decoders, demuxers, converters, ...
467 * GST_STREAM_ERROR_FAILED
469 public enum GstStreamError
471 FAILED = 1,
472 TOO_LAZY,
473 NOT_IMPLEMENTED,
474 TYPE_NOT_FOUND,
475 WRONG_TYPE,
476 CODEC_NOT_FOUND,
477 DECODE,
478 ENCODE,
479 DEMUX,
480 MUX,
481 FORMAT,
482 NUM_ERRORS
484 alias GstStreamError StreamError;
487 * The certainty of a group in the index.
488 * GST_INDEX_UNKNOWN
490 public enum GstIndexCertainty
492 UNKNOWN,
493 CERTAIN,
494 FUZZY
496 alias GstIndexCertainty IndexCertainty;
499 * The different types of entries in the index.
500 * GST_INDEX_ENTRY_ID
502 public enum GstIndexEntryType
505 ASSOCIATION,
506 OBJECT,
507 FORMAT
509 alias GstIndexEntryType IndexEntryType;
512 * Specify the method to find an index entry in the index.
513 * GST_INDEX_LOOKUP_EXACT
515 public enum GstIndexLookupMethod
517 EXACT,
518 BEFORE,
519 AFTER
521 alias GstIndexLookupMethod IndexLookupMethod;
524 * Flags for an association entry.
525 * GST_ASSOCIATION_FLAG_NONE
527 public enum GstAssocFlags
529 IATION_FLAG_NONE = 0,
530 IATION_FLAG_KEY_UNIT = (1 << 0),
531 IATION_FLAG_DELTA_UNIT = (1 << 1),
532 /+* new flags should start here +/
533 IATION_FLAG_LAST = (1 << 8)
535 alias GstAssocFlags AssocFlags;
538 * The method used to resolve index writers
539 * GST_INDEX_RESOLVER_CUSTOM
541 public enum GstIndexResolverMethod
543 CUSTOM,
544 GTYPE,
545 PATH
547 alias GstIndexResolverMethod IndexResolverMethod;
550 * Flags for this index
551 * GST_INDEX_WRITABLE
553 public enum GstIndexFlags
555 WRITABLE = (GstObjectFlags.FLAG_LAST << 0),
556 READABLE = (GstObjectFlags.FLAG_LAST << 1),
557 FLAG_LAST = (GstObjectFlags.FLAG_LAST << 8)
559 alias GstIndexFlags IndexFlags;
562 * The result of a GstIteratorItemFunction.
563 * GST_ITERATOR_ITEM_SKIP
565 public enum GstIteratorItem
567 SKIP = 0,
568 PASS = 1,
569 END = 2,
571 alias GstIteratorItem IteratorItem;
574 * The result of gst_iterator_next().
575 * GST_ITERATOR_DONE
577 public enum GstIteratorResult
579 DONE = 0,
580 OK = 1,
581 RESYNC = 2,
582 ERROR = 3,
584 alias GstIteratorResult IteratorResult;
587 * The different message types that are available.
588 * GST_MESSAGE_UNKNOWN
590 public enum GstMessageType
592 UNKNOWN = 0,
593 EOS = (1 << 0),
594 ERROR = (1 << 1),
595 WARNING = (1 << 2),
596 INFO = (1 << 3),
597 TAG = (1 << 4),
598 BUFFERING = (1 << 5),
599 STATE_CHANGED = (1 << 6),
600 STATE_DIRTY = (1 << 7),
601 STEP_DONE = (1 << 8),
602 CLOCK_PROVIDE = (1 << 9),
603 CLOCK_LOST = (1 << 10),
604 NEW_CLOCK = (1 << 11),
605 STRUCTURE_CHANGE = (1 << 12),
606 STREAM_STATUS = (1 << 13),
607 APPLICATION = (1 << 14),
608 ELEMENT = (1 << 15),
609 SEGMENT_START = (1 << 16),
610 SEGMENT_DONE = (1 << 17),
611 DURATION = (1 << 18),
612 ANY = 0xffffffff
614 alias GstMessageType MessageType;
617 * The direction of a pad.
618 * GST_PAD_UNKNOWN
620 public enum GstPadDirection
622 UNKNOWN,
623 SRC,
624 SINK
626 alias GstPadDirection PadDirection;
629 * Pad state flags
630 * GST_PAD_BLOCKED
632 public enum GstPadFlags
634 BLOCKED = (GstObjectFlags.FLAG_LAST << 0),
635 FLUSHING = (GstObjectFlags.FLAG_LAST << 1),
636 IN_GETCAPS = (GstObjectFlags.FLAG_LAST << 2),
637 IN_SETCAPS = (GstObjectFlags.FLAG_LAST << 3),
638 /+* padding +/
639 FLAG_LAST = (GstObjectFlags.FLAG_LAST << 8)
641 alias GstPadFlags PadFlags;
644 * Result values from gst_pad_link and friends.
645 * GST_PAD_LINK_OK
647 public enum GstPadLinkReturn
649 OK = 0,
650 WRONG_HIERARCHY = -1,
651 WAS_LINKED = -2,
652 WRONG_DIRECTION = -3,
653 NOFORMAT = -4,
654 NOSCHED = -5,
655 REFUSED = -6,
657 alias GstPadLinkReturn PadLinkReturn;
660 * The result of passing data to a linked pad.
661 * GST_FLOW_RESEND
663 public enum GstFlowReturn
665 SEND = 1,
666 GST_FLOW_OK = 0,
667 /+* expected failures +/
668 GST_FLOW_NOT_LINKED = -1,
669 GST_FLOW_WRONG_STATE = -2,
670 /+* error cases +/
671 GST_FLOW_UNEXPECTED = -3,
672 GST_FLOW_NOT_NEGOTIATED = -4,
673 GST_FLOW_ERROR = -5,
674 GST_FLOW_NOT_SUPPORTED = -6
676 alias GstFlowReturn FlowReturn;
679 * The status of a GstPad. After activating a pad, which usually happens when the
680 * parent element goes from READY to PAUSED, the GstActivateMode defines if the
681 * pad operates in push or pull mode.
682 * GST_ACTIVATE_NONE
684 public enum GstActivateMode
686 NONE,
687 PUSH,
688 PULL,
690 alias GstActivateMode ActivateMode;
693 * Flags for the padtemplate
694 * GST_PAD_TEMPLATE_FIXED
696 public enum GstPadTemplateFlags
698 IXED = (GstObjectFlags.FLAG_LAST << 0),
699 /+* padding +/
700 LAG_LAST = (GstObjectFlags.FLAG_LAST << 4)
702 alias GstPadTemplateFlags PadTemplateFlags;
705 * Indicates when this pad will become available.
706 * GST_PAD_ALWAYS
708 public enum GstPadPresence
710 ALWAYS,
711 SOMETIMES,
712 REQUEST
714 alias GstPadPresence PadPresence;
717 * The different parsing errors that can occur.
718 * GST_PARSE_ERROR_SYNTAX
720 public enum GstParseError
722 SYNTAX,
723 NO_SUCH_ELEMENT,
724 NO_SUCH_PROPERTY,
725 LINK,
726 COULD_NOT_SET_PROPERTY,
727 EMPTY_BIN,
728 EMPTY
730 alias GstParseError ParseError;
733 * Pipeline flags
734 * GST_PIPELINE_FLAG_FIXED_CLOCK
736 public enum GstPipelineFlags
738 FIXED_CLOCK = (GstBinFlags.FLAG_LAST << 0),
739 /+* padding +/
740 LAST = (GstBinFlags.FLAG_LAST << 4)
742 alias GstPipelineFlags PipelineFlags;
745 * The plugin loading errors
746 * GST_PLUGIN_ERROR_MODULE
748 public enum GstPluginError
750 MODULE,
751 DEPENDENCIES,
752 NAME_MISMATCH
754 alias GstPluginError PluginError;
757 * Element priority ranks. Defines the order in which the autoplugger (or
758 * similar rank-picking mechanisms) will choose this element over an alternative
759 * one with the same function.
760 * The rank is a unsigned integer ranging from 0 (GST_RANK_NONE) to 256
761 * (GST_RANK_PRIMARY). These constants serve as a rough guidiance for defining
762 * the rank of a GstPlugin using gst_plugin_feature_set_rank().
763 * GST_RANK_NONE
765 public enum GstRank
767 NONE = 0,
768 MARGINAL = 64,
769 SECONDARY = 128,
770 PRIMARY = 256
772 alias GstRank Rank;
775 * Standard predefined Query types
776 * GST_QUERY_NONE
778 public enum GstQueryType
780 NONE = 0,
781 POSITION,
782 DURATION,
783 LATENCY,
784 JITTER, /+* not inn draft-query, necessary? +/
785 RATE,
786 SEEKING,
787 SEGMENT,
788 CONVERT,
789 FORMATS
791 alias GstQueryType QueryType;
794 * The different tag merging modes.
795 * GST_TAG_MERGE_UNDEFINED
797 public enum GstTagMergeMode
799 UNDEFINED,
800 REPLACE_ALL,
801 REPLACE,
802 APPEND,
803 PREPEND,
804 KEEP,
805 KEEP_ALL,
806 /+* add more +/
807 COUNT
809 alias GstTagMergeMode TagMergeMode;
812 * Extra tag flags used when registering tags.
813 * GST_TAG_FLAG_UNDEFINED
815 public enum GstTagFlag
817 FLAG_UNDEFINED,
818 FLAG_META,
819 FLAG_ENCODED,
820 FLAG_DECODED,
821 FLAG_COUNT
823 alias GstTagFlag TagFlag;
826 * The different states a task can be in
827 * GST_TASK_STARTED
829 public enum GstTaskState
831 RTED,
832 GST_TASK_STOPPED,
833 GST_TASK_PAUSED,
835 alias GstTaskState TaskState;
838 * The probability of the typefind function. Higher values have more certainty
839 * in doing a reliable typefind.
840 * GST_TYPE_FIND_MINIMUM
842 public enum GstTypeFindProbability
844 MINIMUM = 1,
845 POSSIBLE = 50,
846 LIKELY = 80,
847 NEARLY_CERTAIN = 99,
848 MAXIMUM = 100
850 alias GstTypeFindProbability TypeFindProbability;
854 * Main Gtk struct.
855 * The GstBin base class. Subclasses can access these fields provided
856 * the LOCK is taken.
857 * gintnumchildren;
859 public struct GstBin;
860 // /+* our children, subclass are supposed to update these
861 // * fields to reflect their state with _Iterate*() +/
862 // int numchildren;
863 // GList *children;
864 // uint childrenCookie;
865 // GstBus *childBus;
866 // GList *messages;
867 // int polling;
868 // int stateDirty;
869 // int clockDirty;
870 // GstClock *providedClock;
871 // GstElement *clockProvider;
875 * Subclasses can override the add_element and remove_element to
876 * update the list of children in the bin.
877 * The handle_message method can be overriden to implement custom
878 * message handling.
879 * GstElementClassparent_class;
881 public struct GstBinClass;
882 // GstElementClass parentClass;
883 // /+* virtual methods for subclasses +/
884 // int (*addElement) (GstBin *bin, GstElement *element);
885 // int (*removeElement) (GstBin *bin, GstElement *element);
886 // void (*handleMessage) (GstBin *bin, GstMessage *message);
890 * Main Gtk struct.
891 * The structure of a GstBuffer. Use the associated macros to access the public
892 * variables.
893 * GstMiniObjectmini_object;
895 public struct GstBuffer;
896 // GstMiniObject miniObject;
897 // /+* pointer to data and its size +/
898 // byte *data;
899 // uint size;
900 // /+* timestamp +/
901 // GstClockTime timestamp;
902 // GstClockTime duration;
903 // /+* the media type of this buffer +/
904 // GstCaps *caps;
905 // /+* media specific offset +/
906 // ulong offset;
907 // ulong offsetEnd;
908 // byte *mallocData;
912 * Main Gtk struct.
913 * The opaque GstBus data structure.
915 public struct GstBus;
919 * Main Gtk struct.
920 * Object describing media types.
921 * GTypetype;
923 public struct GstCaps;
924 // GType type;
925 // /+* refcounting +/
926 // int refcount;
927 // GstCapsFlags flags;
931 * Datastructure to initialize GstCaps from a string description usually
932 * used in conjunction with GST_STATIC_CAPS() and gst_static_caps_get() to
933 * instantiate a GstCaps.
934 * GstCapscaps;
936 public struct GstStaticCaps;
937 // GstCaps caps;
938 // char *string;
942 * Main Gtk struct.
944 public struct GstClock;
948 * All pending timeouts or periodic notifies are converted into
949 * an entry.
950 * gintrefcount;
952 public struct GstClockEntry
954 int refcount;
959 * Main Gtk struct.
960 * GStreamer element abstract base class.
961 * GStaticRecMutex*state_lock;
963 public struct GstElement;
964 // GStaticRecMutex *stateLock;
965 // /+* element state +/
966 // GCond *stateCond;
967 // uint stateCookie;
968 // GstState currentState;
969 // GstState nextState;
970 // GstState pendingState;
971 // GstStateChangeReturn lastReturn;
972 // GstBus *bus;
973 // /+* allocated clock +/
974 // GstClock *clock;
975 // GstClockTimeDiff baseTime; /+* NULL/READY: 0 - PAUSED: current time - PLAYING: difference to clock +/
976 // /+* element pads, these lists can only be iterated while holding
977 // * the LOCK or checking the cookie after each LOCK. +/
978 // ushort numpads;
979 // GList *pads;
980 // ushort numsrcpads;
981 // GList *srcpads;
982 // ushort numsinkpads;
983 // GList *sinkpads;
984 // uint padsCookie;
988 * GStreamer element class. Override the vmethods to implement the element
989 * functionality.
990 * GstObjectClassparent_class;
992 public struct GstElementClass;
993 // GstObjectClass parentClass;
994 // /+* the element details +/
995 // GstElementDetails details;
996 // /+* factory that the element was created from +/
997 // GstElementFactory *elementfactory;
998 // /+* templates for our pads +/
999 // GList *padtemplates;
1000 // int numpadtemplates;
1001 // uint padTemplCookie;
1002 // /+* virtual methods for subclasses +/
1003 // /+* request/release pads +/
1004 // GstPad* (*requestNewPad) (GstElement *element, GstPadTemplate *templ, char* name);
1005 // void (*releasePad) (GstElement *element, GstPad *pad);
1006 // /+* state changes +/
1007 // GstStateChangeReturn (*getState) (GstElement * element, GstState * state,
1008 // GstState * pending, GstClockTime timeout);
1009 // GstStateChangeReturn (*setState) (GstElement *element, GstState state);
1010 // GstStateChangeReturn (*changeState) (GstElement *element, GstStateChange transition);
1011 // /+* bus +/
1012 // void (*setBus) (GstElement * element, GstBus * bus);
1013 // /+* set/get clocks +/
1014 // GstClock* (*provideClock) (GstElement *element);
1015 // int (*setClock) (GstElement *element, GstClock *clock);
1016 // /+* index +/
1017 // GstIndex* (*getIndex) (GstElement *element);
1018 // void (*setIndex) (GstElement *element, GstIndex *index);
1019 // /+* query functions +/
1020 // int (*sendEvent) (GstElement *element, GstEvent *event);
1021 // GstQueryType* (*getQueryTypes) (GstElement *element);
1022 // int (*query) (GstElement *element, GstQuery *query);
1026 * Main Gtk struct.
1027 * The opaque GstElementFactory data structure.
1029 public struct GstElementFactory;
1033 * This struct defines the public information about a GstElement. It contains
1034 * meta-data about the element that is mostly for the benefit of editors.
1035 * The klass member can be used by applications to filter elements based
1036 * on functionality.
1037 * gchar*longname;
1039 public struct GstElementDetails
1041 char *longname;
1042 char *klass;
1043 char *description;
1044 char *author;
1048 * Main Gtk struct.
1049 * A GstEvent.
1050 * GstMiniObjectmini_object;
1052 public struct GstEvent;
1054 GstMiniObject miniObject;
1055 GstEventType type;
1056 ulong timestamp;
1057 GstObject *src;
1058 GstStructure *structure;
1063 * A format definition
1064 * GstFormatvalue;
1066 public struct GstFormatDefinition;
1067 // GstFormat value;
1068 // char *nick;
1069 // char *description;
1070 // GQuark quark;
1074 * Main Gtk struct.
1075 * Opaque GstGhostPad structure.
1077 public struct GstGhostPad;
1081 * Main Gtk struct.
1082 * Opaque GstIndex structure.
1084 public struct GstIndex;
1088 * The basic element of an index.
1090 public struct GstIndexEntry;
1094 * A group of related entries in an index.
1096 public struct GstIndexGroup;
1100 * An association in an entry.
1101 * GstFormatformat;
1103 public struct GstIndexAssociation;
1104 // GstFormat format;
1105 // long value;
1109 * Main Gtk struct.
1110 * The GstIndexFactory object
1112 public struct GstIndexFactory;
1116 * Main Gtk struct.
1117 * GstIterator base structure. The values of this structure are
1118 * protected for subclasses, use the methods to use the GstIterator.
1120 public struct GstIterator;
1123 * Main Gtk struct.
1124 * Base class for refcounted lightweight objects.
1125 * GTypeInstanceinstance;
1127 public struct GstMiniObject
1129 GTypeInstance instanc;
1130 //< public >// with COW
1131 int refcount;//gint refcount;
1132 uint flags;//guint flags;
1134 //< private >
1135 gpointer _gst_reserved;
1140 * Main Gtk struct.
1141 * GStreamer base object class.
1142 * gintrefcount;
1144 public struct GstObject;
1145 // int refcount;
1146 // GMutex *lock; /+* object LOCK +/
1147 // char *name; /+* object name +/
1148 // char *namePrefix; /+* used for debugging +/
1149 // GstObject *parent; /+* this object's parent, weak ref +/
1150 // uint flags;
1154 * Main Gtk struct.
1155 * The GstPad structure. Use the functions to update the variables.
1156 * gpointerelement_private;
1158 public struct GstPad;
1159 // void* elementPrivate;
1160 // GstPadTemplate *padtemplate;
1161 // GstPadDirection direction;
1162 // /+* streaming recLock +/
1163 // GStaticRecMutex *streamRecLock;
1164 // GstTask *task;
1165 // GMutex *prerollLock;
1166 // GCond *prerollCond;
1167 // /+* block cond, mutex is from the object +/
1168 // GCond *blockCond;
1169 // GstPadBlockCallback blockCallback;
1170 // void* blockData;
1171 // /+* the pad capabilities +/
1172 // GstCaps *caps;
1173 // GstPadGetCapsFunction getcapsfunc;
1174 // GstPadSetCapsFunction setcapsfunc;
1175 // GstPadAcceptCapsFunction acceptcapsfunc;
1176 // GstPadFixateCapsFunction fixatecapsfunc;
1177 // GstPadActivateFunction activatefunc;
1178 // GstPadActivateModeFunction activatepushfunc;
1179 // GstPadActivateModeFunction activatepullfunc;
1180 // /+* pad link +/
1181 // GstPadLinkFunction linkfunc;
1182 // GstPadUnlinkFunction unlinkfunc;
1183 // GstPad *peer;
1184 // void* schedPrivate;
1185 // /+* data transport functions +/
1186 // GstPadChainFunction chainfunc;
1187 // GstPadCheckGetRangeFunction checkgetrangefunc;
1188 // GstPadGetRangeFunction getrangefunc;
1189 // GstPadEventFunction eventfunc;
1190 // GstActivateMode mode;
1191 // /+* generic query method +/
1192 // GstPadQueryTypeFunction querytypefunc;
1193 // GstPadQueryFunction queryfunc;
1194 // /+* internal links +/
1195 // GstPadIntLinkFunction intlinkfunc;
1196 // GstPadBufferAllocFunction bufferallocfunc;
1197 // /+* whether to emit signals for have-data. counts number
1198 // * of handlers attached. +/
1199 // int doBufferSignals;
1200 // int doEventSignals;
1204 * Structure describing the GstStaticPadTemplate.
1205 * gchar*name_template;
1207 public struct GstStaticPadTemplate;
1208 // char *nameTemplate;
1209 // GstPadDirection direction;
1210 // GstPadPresence presence;
1211 // GstStaticCaps staticCaps;
1215 * Main Gtk struct.
1216 * The padtemplate object.
1218 public struct GstPadTemplate;
1222 * Main Gtk struct.
1223 * The GstPipeline structure.
1224 * GstClock*fixed_clock;
1226 public struct GstPipeline;
1227 // GstClock *fixedClock; /+* fixed clock if any +/
1228 // GstClockTime streamTime;
1229 // GstClockTime delay;
1233 * Main Gtk struct.
1234 * The plugin object
1236 public struct GstPlugin;
1240 * A plugins should export a variable of this type called plugin_desc. This plugin
1241 * loaded will use this variable to initialize the plugin.
1242 * gintmajor_version;
1244 public struct GstPluginDesc;
1245 // int majorVersion;
1246 // int minorVersion;
1247 // char *name;
1248 // char *description;
1249 // GstPluginInitFunc pluginInit;
1250 // char *versio;
1251 // char *license;
1252 // char *source;
1253 // char *p;
1254 // char *origin;
1255 // void* _GstReserved[GST_PADDING];
1259 * Main Gtk struct.
1260 * Opaque GstPluginFeature structure.
1262 public struct GstPluginFeature;
1266 * Structure used for filtering based on name and type.
1267 * constgchar*name;
1269 public struct GstTypeNameData;
1270 // char *name;
1271 // GType type;
1275 * Main Gtk struct.
1276 * The GstQuery structure.
1277 * GstMiniObjectmini_object;
1279 public struct GstQuery;
1280 // GstMiniObject miniObject;
1281 // GstQueryType type;
1282 // GstStructure *structure;
1286 * A Query Type definition
1287 * GstQueryTypevalue;
1289 public struct GstQueryTypeDefinition;
1290 // GstQueryType value;
1291 // char *nick;
1292 // char *description;
1293 // GQuark quark;
1297 * Main Gtk struct.
1298 * Opaque GstRegistry structure.
1300 public struct GstRegistry;
1304 * Main Gtk struct.
1305 * A helper structure that holds the configured region of
1306 * interest in a media file.
1307 * gdoublerate;
1309 public struct GstSegment;
1310 // double rate;
1311 // double absRate;
1312 // GstFormat format;
1313 // GstSeekFlags flags;
1314 // long start;
1315 // long stop;
1316 // long time;
1317 // long accum;
1318 // long lastStop;
1319 // long duration;
1320 // /+* API added 0.10.6 +/
1321 // double appliedRate;
1325 * Main Gtk struct.
1326 * The GstStructure object. Most fields are private.
1327 * GTypetype;
1329 public struct GstStructure;
1330 // GType type;
1333 * Main Gtk struct.
1334 * A GstMessage.
1335 * GstMiniObjectmini_object;
1337 /*public struct GstMessage
1339 GstMiniObject mini_object;
1341 GstMessageType type;
1342 //int type;
1343 ulong timestamp;
1344 GstObject* src;
1346 GstStructure* structure;
1349 public struct GstMessage
1351 GstMiniObject mini_object;
1353 GstMessageType type;
1354 long timestamp;
1355 GstObject *src;
1357 GstStructure *structure;
1360 /***** default padding of structures *****/
1361 const long GST_PADDING = 4;
1362 //#define GST_PADDING_INIT {0}
1364 /***** padding for very extensible base classes *****/
1365 const long GST_PADDING_LARGE = 20;
1367 struct GstMessage
1369 GstMiniObject mini_object;
1371 /*< private > *//* with MESSAGE_LOCK */
1372 GMutex* lock; /* lock and cond for async delivery */
1373 GCond* cond;
1375 /*< public > *//* with COW */
1376 GstMessageType type;
1377 ulong timestamp;//guint64 timestamp;
1378 GstObject* src;
1380 GstStructure* structure;
1382 /*< private > */
1383 gpointer _gst_reserved[GST_PADDING];
1387 * Main Gtk struct.
1388 * The default implementation of a GstClock that uses the system time.
1390 public struct GstSystemClock;
1394 * Main Gtk struct.
1395 * Opaque GstTagSetter data structure.
1397 public struct GstTagSetter;
1401 * GstTagSetterIFace interface.
1402 * GTypeInterfaceg_iface;
1404 public struct GstTagSetterIFace;
1405 // GTypeInterface gIface;
1406 // /+* signals +/
1407 // /+* virtual table +/
1411 * Main Gtk struct.
1412 * The GstTask object.
1413 * GstTaskStatestate;
1415 public struct GstTask;
1416 // GstTaskState state;
1417 // GCond *cond;
1418 // GStaticRecMutex *lock;
1419 // GstTaskFunction func;
1420 // void* data;
1421 // int running;
1425 * Main Gtk struct.
1426 * Object that stores typefind callbacks. To use with GstTypeFindFactory.
1427 * peek()
1429 public struct GstTypeFind;
1430 // /+* private to the caller of the typefind funct +/
1431 // byte * (* peek) (void* data,
1432 // long offset,
1433 // uint size);
1434 // void (* suggest) (void* data,
1435 // uint probability,
1436 // GstCaps * caps);
1437 // void* data;
1438 // /+* optional +/
1439 // ulong (* getLength) (void* data);
1443 * Main Gtk struct.
1444 * Object that stores information about a typefind function.
1446 public struct GstTypeFindFactory;
1450 * Main Gtk struct.
1451 * XML parser object
1453 public struct GstXML;
1457 * Gets the list with children in a bin.
1458 * bin:
1459 * a GstBin
1461 // TODO
1462 // #define GST_BIN_CHILDREN(bin) (GST_BIN_CAST(bin)->children)
1465 * Gets the children cookie that watches the children list.
1466 * bin:
1467 * a GstBin
1469 // TODO
1470 // #define GST_BIN_CHILDREN_COOKIE(bin) (GST_BIN_CAST(bin)->children_cookie)
1473 * Gets the number of children in a bin.
1474 * bin:
1475 * a GstBin
1476 * Signal Details
1477 * The "element-added" signal
1478 * void user_function (GstBin *bin,
1479 * GstElement *element,
1480 * gpointer user_data) : Run first
1481 * Will be emitted after the element was added to the bin.
1482 * bin:
1483 * the GstBin
1484 * element:
1485 * the GstElement that was added to the bin
1486 * user_data:
1487 * user data set when the signal handler was connected.
1489 // TODO
1490 // #define GST_BIN_NUMCHILDREN(bin) (GST_BIN_CAST(bin)->numchildren)
1493 * A flags word containing GstBufferFlag flags set on this buffer.
1494 * buf:
1495 * a GstBuffer.
1497 // TODO
1498 // #define GST_BUFFER_FLAGS(buf) GST_MINI_OBJECT_FLAGS(buf)
1501 * Gives the status of a specific flag on a buffer.
1502 * buf:
1503 * a GstBuffer.
1504 * flag:
1505 * the GstBufferFlag to check.
1507 // TODO
1508 // #define GST_BUFFER_FLAG_IS_SET(buf,flag) GST_MINI_OBJECT_FLAG_IS_SET (buf, flag)
1511 * Sets a buffer flag on a buffer.
1512 * buf:
1513 * a GstBuffer.
1514 * flag:
1515 * the GstBufferFlag to set.
1517 // TODO
1518 // #define GST_BUFFER_FLAG_SET(buf,flag) GST_MINI_OBJECT_FLAG_SET (buf, flag)
1521 * Clears a buffer flag.
1522 * buf:
1523 * a GstBuffer.
1524 * flag:
1525 * the GstBufferFlag to clear.
1527 // TODO
1528 // #define GST_BUFFER_FLAG_UNSET(buf,flag) GST_MINI_OBJECT_FLAG_UNSET (buf, flag)
1531 * A pointer to the data element of this buffer.
1532 * buf:
1533 * a GstBuffer.
1535 // TODO
1536 // #define GST_BUFFER_DATA(buf) (GST_BUFFER_CAST(buf)->data)
1539 * A pointer to any data allocated for this buffer using malloc(). If this is
1540 * non-NULL, this memory will be freed at the end of the buffer's lifecycle
1541 * (i.e. when its refcount becomes zero).
1542 * buf:
1543 * a GstBuffer.
1545 // TODO
1546 // #define GST_BUFFER_MALLOCDATA(buf) (GST_BUFFER_CAST(buf)->malloc_data)
1549 * The size in bytes of the data in this buffer.
1550 * buf:
1551 * a GstBuffer.
1553 // TODO
1554 // #define GST_BUFFER_SIZE(buf) (GST_BUFFER_CAST(buf)->size)
1557 * The timestamp in nanoseconds (as a GstClockTime) of the data in the buffer.
1558 * Value will be GST_CLOCK_TIME_NONE if the timestamp is unknown.
1559 * buf:
1560 * a GstBuffer.:
1562 // TODO
1563 // #define GST_BUFFER_TIMESTAMP(buf) (GST_BUFFER_CAST(buf)->timestamp)
1566 * The duration in nanoseconds (as a GstClockTime) of the data in the buffer.
1567 * Value will be GST_CLOCK_TIME_NONE if the duration is unknown.
1568 * buf:
1569 * a GstBuffer.
1571 // TODO
1572 // #define GST_BUFFER_DURATION(buf) (GST_BUFFER_CAST(buf)->duration)
1575 * The caps for this buffer.
1576 * buf:
1577 * a GstBuffer.
1579 // TODO
1580 // #define GST_BUFFER_CAPS(buf) (GST_BUFFER_CAST(buf)->caps)
1583 * The offset in the source file of the beginning of this buffer.
1584 * buf:
1585 * a GstBuffer.
1587 // TODO
1588 // #define GST_BUFFER_OFFSET(buf) (GST_BUFFER_CAST(buf)->offset)
1591 * The offset in the source file of the end of this buffer.
1592 * buf:
1593 * a GstBuffer.
1595 // TODO
1596 // #define GST_BUFFER_OFFSET_END(buf) (GST_BUFFER_CAST(buf)->offset_end)
1599 * Tests if the duration is known.
1600 * buffer:
1601 * a GstBuffer
1603 // TODO
1604 // #define GST_BUFFER_DURATION_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (buffer)))
1607 * Tests if the timestamp is known.
1608 * buffer:
1609 * a GstBuffer
1611 // TODO
1612 // #define GST_BUFFER_TIMESTAMP_IS_VALID(buffer) (GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buffer)))
1615 * Tests if the start offset is known.
1616 * buffer:
1617 * a GstBuffer
1619 // TODO
1620 // #define GST_BUFFER_OFFSET_IS_VALID(buffer) (GST_BUFFER_OFFSET (buffer) != GST_BUFFER_OFFSET_NONE)
1623 * Tests if the end offset is known.
1624 * buffer:
1625 * a GstBuffer
1627 // TODO
1628 // #define GST_BUFFER_OFFSET_END_IS_VALID(buffer) (GST_BUFFER_OFFSET_END (buffer) != GST_BUFFER_OFFSET_NONE)
1631 * Decreases the refcount of the buffer. If the refcount reaches 0, the buffer
1632 * will be freed. If GST_BUFFER_MALLOCDATA() is non-NULL, this pointer will
1633 * also be freed at this time.
1634 * buf:
1635 * a GstBuffer.
1637 // TODO
1638 // #define gst_buffer_unref(buf) gst_mini_object_unref (GST_MINI_OBJECT (buf))
1641 * A convenience function to set the data and size on a buffer.
1642 * This will replace any existing data pointer set on this buffer, but will
1643 * not change GST_BUFFER_MALLOCDATA(), if any. Callers should ensure that
1644 * GST_BUFFER_MALLOCDATA() is non-NULL, or should free that and set it to NULL.
1645 * No checks are done on the data or size arguments passed.
1646 * buf:
1647 * a GstBuffer
1648 * data:
1649 * The data (a guint8 *) to set on the buffer.
1650 * size:
1651 * The size (in bytes, as a guint) of the data being set.
1653 // TODO
1654 // #define gst_buffer_set_data(buf, data, size)
1657 * Create a copy of the given buffer. This will also make a newly allocated
1658 * copy of the data the source buffer contains.
1659 * buf:
1660 * a GstBuffer.
1662 // TODO
1663 // #define gst_buffer_copy(buf) GST_BUFFER_CAST (gst_mini_object_copy (GST_MINI_OBJECT (buf)))
1666 * Tests if you can safely write data into a buffer's data array or validly
1667 * modify the caps and timestamp metadata. Metadata in a GstBuffer is always
1668 * writable, but it is only safe to change it when there is only one owner
1669 * of the buffer - ie, the refcount is 1.
1670 * buf:
1671 * a GstBuffer
1673 // TODO
1674 // #define gst_buffer_is_writable(buf) gst_mini_object_is_writable (GST_MINI_OBJECT (buf))
1677 * Makes a writable buffer from the given buffer. If the source buffer is
1678 * already writable, this will simply return the same buffer. A copy will
1679 * otherwise be made using gst_buffer_copy().
1680 * buf:
1681 * a GstBuffer
1683 // TODO
1684 // #define gst_buffer_make_writable(buf) GST_BUFFER_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT (buf)))
1687 * Modifies a pointer to a Gstbuffer to point to a different GstBuffer. The
1688 * modification is done atomically (so this is useful for ensuring thread safety
1689 * in some cases), and the reference counts are updated appropriately (the old
1690 * buffer is unreffed, the new is reffed).
1691 * Either nbuf or the GstBuffer pointed to by obuf may be NULL.
1692 * obuf:
1693 * pointer to a pointer to a GstBuffer to be replaced.
1694 * nbuf:
1695 * pointer to a GstBuffer that will replace the buffer pointed to by
1696 * obuf.
1698 // TODO
1699 // #define gst_buffer_replace(obuf,nbuf) gst_mini_object_replace ((GstMiniObject **)(obuf), GST_MINI_OBJECT (nbuf))
1702 * Get access to the reference count field of the caps
1703 * caps:
1704 * a GstCaps
1706 // TODO
1707 // #define GST_CAPS_REFCOUNT(caps) ((GST_CAPS(caps))->refcount)
1710 * Get the reference count value of the caps.
1711 * caps:
1712 * a GstCaps
1714 // TODO
1715 // #define GST_CAPS_REFCOUNT_VALUE(caps) (g_atomic_int_get ((GST_CAPS(caps))->refcount))
1718 * Convenience macro that checks if the number of structures in the given caps
1719 * is exactly one.
1720 * caps:
1721 * the GstCaps instance to check
1723 // TODO
1724 // #define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1)
1727 * Warning
1728 * GST_DEBUG_CAPS is deprecated and should not be used in newly-written code. do not use anymore
1729 * Convenience macro for printing out the contents of caps with GST_DEBUG().
1730 * string:
1731 * a string that should be prepended to the caps data.
1732 * caps:
1733 * the GstCaps instance to print
1735 // TODO
1736 // #define GST_DEBUG_CAPS(string, caps)
1739 * Creates a new GstCaps static caps from an input string.
1740 * This can be used in pad templates.
1741 * string:
1742 * the string describing the caps
1744 // TODO
1745 // #define GST_STATIC_CAPS(string)
1748 * Tests if a given GstClockTime represents a valid defined time.
1749 * time:
1750 * clock time to validate
1752 // TODO
1753 // #define GST_CLOCK_TIME_IS_VALID(time) (((GstClockTime)(time)) != GST_CLOCK_TIME_NONE)
1756 * Calculate a difference between two clock times as a GstClockTimeDiff.
1757 * The difference is calculated as e - s.
1758 * s:
1759 * the first time
1760 * e:
1761 * the second time
1763 // TODO
1764 // #define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((e) - (s))
1767 * Convert a GTimeVal to a GstClockTime.
1768 * tv:
1769 * the timeval to convert
1771 // TODO
1772 // #define GST_TIMEVAL_TO_TIME(tv) ((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND)
1775 * Note: on 32-bit systems, a timeval has a range of only 2^32 - 1 seconds,
1776 * which is about 68 years. Expect trouble if you want to schedule stuff
1777 * in your pipeline for 2038.
1778 * Convert a GstClockTime to a GTimeVal
1779 * t:
1780 * The GstClockTime to convert
1781 * tv:
1782 * The target timeval
1784 // TODO
1785 // #define GST_TIME_TO_TIMEVAL(t,tv)
1788 * Convert a struct timespec (see man pselect) to a GstClockTime.
1789 * ts:
1790 * the timespec to convert
1792 // TODO
1793 // #define GST_TIMESPEC_TO_TIME(ts) ((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND)
1796 * Convert a GstClockTime to a struct timespec (see man pselect)
1797 * t:
1798 * The GstClockTime to convert
1799 * ts:
1800 * The target timespec
1802 // TODO
1803 // #define GST_TIME_TO_TIMESPEC(t,ts)
1806 * Cast to a clock entry
1807 * entry:
1808 * the entry to cast
1810 // TODO
1811 // #define GST_CLOCK_ENTRY(entry) ((GstClockEntry *)(entry))
1814 * Get the owner clock of the entry
1815 * entry:
1816 * the entry to query
1818 // TODO
1819 // #define GST_CLOCK_ENTRY_CLOCK(entry) ((entry)->clock)
1822 * Get the type of the clock entry
1823 * entry:
1824 * the entry to query
1826 // TODO
1827 // #define GST_CLOCK_ENTRY_TYPE(entry) ((entry)->type)
1830 * Get the requested time of this entry
1831 * entry:
1832 * the entry to query
1834 // TODO
1835 // #define GST_CLOCK_ENTRY_TIME(entry) ((entry)->time)
1838 * Get the interval of this periodic entry
1839 * entry:
1840 * the entry to query
1842 // TODO
1843 // #define GST_CLOCK_ENTRY_INTERVAL(entry) ((entry)->interval)
1846 * The status of the entry
1847 * entry:
1848 * the entry to query
1850 // TODO
1851 // #define GST_CLOCK_ENTRY_STATUS(entry) ((entry)->status)
1854 * Gets the GstClockFlags clock flags.
1855 * clock:
1856 * the clock to query
1858 // TODO
1859 // #define GST_CLOCK_FLAGS(clock) (GST_CLOCK(clock)->flags)
1862 * Signal that the entries in the clock have changed.
1863 * clock:
1864 * the clock to broadcast
1866 // TODO
1867 // #define GST_CLOCK_BROADCAST(clock) g_cond_broadcast(GST_CLOCK_COND(clock))
1870 * Gets the GCond that gets signaled when the entries of the clock
1871 * changed.
1872 * clock:
1873 * the clock to query
1875 // TODO
1876 // #define GST_CLOCK_COND(clock) (GST_CLOCK_CAST(clock)->entries_changed)
1879 * Wait on the clock until the entries changed or the specified timeout
1880 * occured.
1881 * clock:
1882 * the clock to wait on
1883 * tv:
1884 * a GTimeVal to wait.
1886 // TODO
1887 // #define GST_CLOCK_TIMED_WAIT(clock,tv) g_cond_timed_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock),tv)
1890 * Wait on the clock until the entries changed.
1891 * clock:
1892 * the clock to wait on
1894 // TODO
1895 // #define GST_CLOCK_WAIT(clock) g_cond_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock))
1898 * This macro returns the current GstState of the element.
1899 * elem:
1900 * a GstElement to return state for.
1902 // TODO
1903 // #define GST_STATE(elem) (GST_ELEMENT_CAST(elem)->current_state)
1906 * Given a current state cur and a target state pending, calculate the next (intermediate)
1907 * GstState.
1908 * cur:
1909 * A starting GstState
1910 * pending:
1911 * A target GstState
1913 // TODO
1914 // #define GST_STATE_GET_NEXT(cur,pending) ((cur) + __GST_SIGN ((gint)(pending) - (gint)(cur)))
1917 * This macro returns the next GstState of the element.
1918 * elem:
1919 * a GstElement to return the next state for.
1921 // TODO
1922 // #define GST_STATE_NEXT(elem) (GST_ELEMENT_CAST(elem)->next_state)
1925 * This macro returns the currently pending GstState of the element.
1926 * elem:
1927 * a GstElement to return the pending state for.
1929 // TODO
1930 // #define GST_STATE_PENDING(elem) (GST_ELEMENT_CAST(elem)->pending_state)
1933 * This macro returns the last GstStateChangeReturn value.
1934 * elem:
1935 * a GstElement to return the last state result for.
1937 // TODO
1938 // #define GST_STATE_RETURN(elem) (GST_ELEMENT_CAST(elem)->last_return)
1941 * Given a current state cur and a next state next, calculate the associated
1942 * GstStateChange transition.
1943 * cur:
1944 * A current state
1945 * next:
1946 * A next state
1948 // TODO
1949 // #define GST_STATE_TRANSITION(cur,next) (((cur)<<3)|(next))
1952 * Given a state transition trans, extract the current GstState.
1953 * trans:
1954 * A GstStateChange
1956 // TODO
1957 // #define GST_STATE_TRANSITION_CURRENT(trans) ((trans)>>3)
1960 * Given a state transition trans, extract the next GstState.
1961 * trans:
1962 * A GstStateChange
1964 // TODO
1965 // #define GST_STATE_TRANSITION_NEXT(trans) ((trans)0x7)
1968 * Get a reference to the state lock of elem.
1969 * This lock is used by the core. It is taken while getting or setting
1970 * the state, during state changes, and while finalizing.
1971 * elem:
1972 * a GstElement
1974 // TODO
1975 // #define GST_STATE_GET_LOCK(elem) (GST_ELEMENT_CAST(elem)->state_lock)
1978 * Get the conditional used to signal the completion of a state change.
1979 * elem:
1980 * a GstElement
1982 // TODO
1983 // #define GST_STATE_GET_COND(elem) (GST_ELEMENT_CAST(elem)->state_cond)
1986 * Gets the name of this element. Use only in core as this is not
1987 * ABI-compatible. Others use gst_element_get_name()
1988 * elem:
1989 * A GstElement to query
1991 // TODO
1992 // #define GST_ELEMENT_NAME(elem) (GST_OBJECT_NAME(elem))
1995 * Get the parent object of this element.
1996 * elem:
1997 * A GstElement to query
1999 // TODO
2000 // #define GST_ELEMENT_PARENT(elem) (GST_ELEMENT_CAST(GST_OBJECT_PARENT(elem)))
2003 * Get the message bus of this element.
2004 * elem:
2005 * A GstElement to query
2007 // TODO
2008 // #define GST_ELEMENT_BUS(elem) (GST_ELEMENT_CAST(elem)->bus)
2011 * Get the clock of this element
2012 * elem:
2013 * A GstElement to query
2015 // TODO
2016 // #define GST_ELEMENT_CLOCK(elem) (GST_ELEMENT_CAST(elem)->clock)
2019 * Get the pads of this elements.
2020 * elem:
2021 * A GstElement to query
2023 // TODO
2024 // #define GST_ELEMENT_PADS(elem) (GST_ELEMENT_CAST(elem)->pads)
2027 * Utility function that elements can use in case they encountered a fatal
2028 * data processing error. The pipeline will throw an error signal and the
2029 * application will be requested to stop further media processing.
2030 * el:
2031 * the element that throws the error
2032 * domain:
2033 * like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)
2034 * code:
2035 * error code defined for that domain (see GstGError)
2036 * text:
2037 * the message to display (format string and args enclosed in
2038 * parentheses)
2039 * debug:
2040 * debugging information for the message (format string and args
2041 * enclosed in parentheses)
2043 // TODO
2044 // #define GST_ELEMENT_ERROR(el, domain, code, text, debug)
2047 * Utility function that elements can use in case they encountered a non-fatal
2048 * data processing problem. The pipeline will throw a warning signal and the
2049 * application will be informed.
2050 * el:
2051 * the element that throws the error
2052 * domain:
2053 * like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)
2054 * code:
2055 * error code defined for that domain (see GstGError)
2056 * text:
2057 * the message to display (format string and args enclosed in
2058 * parentheses)
2059 * debug:
2060 * debugging information for the message (format string and args
2061 * enclosed in parentheses)
2063 // TODO
2064 // #define GST_ELEMENT_WARNING(el, domain, code, text, debug)
2067 * Check if the element is in the locked state and therefore will ignore state
2068 * changes from its parent object.
2069 * elem:
2070 * A GstElement to query
2072 // TODO
2073 // #define GST_ELEMENT_IS_LOCKED_STATE(elem) (GST_OBJECT_FLAG_IS_SET(elem,GST_ELEMENT_LOCKED_STATE))
2076 * Sets the name of the element, getting rid of the old name if there was one.
2077 * elem:
2078 * a GstElement to set the name of.
2079 * name:
2080 * the new name
2082 // TODO
2083 // #define gst_element_set_name(elem,name) gst_object_set_name(GST_OBJECT_CAST(elem),name)
2086 * Gets the name of the element.
2087 * elem:
2088 * a GstElement to set the name of.
2090 // TODO
2091 // #define gst_element_get_name(elem) gst_object_get_name(GST_OBJECT_CAST(elem))
2094 * Sets the parent of an element.
2095 * elem:
2096 * a GstElement to set the parent of.
2097 * parent:
2098 * the new parent GstObject of the element.
2100 // TODO
2101 // #define gst_element_set_parent(elem,parent) gst_object_set_parent(GST_OBJECT_CAST(elem),parent)
2104 * Gets the parent of an element.
2105 * elem:
2106 * a GstElement to get the parent of.
2108 // TODO
2109 // #define gst_element_get_parent(elem) gst_object_get_parent(GST_OBJECT_CAST(elem))
2112 * Macro to initialize GstElementDetails.
2113 * longname:
2114 * long, english name
2115 * klass:
2116 * type of element, as hierarchy
2117 * description:
2118 * what the element is about
2119 * author:
2120 * who wrote this thing?
2122 // TODO
2123 // #define GST_ELEMENT_DETAILS(longname,klass,description,author)
2126 * Tests if element details are initialized.
2127 * details:
2128 * the GstElementDetails to check
2130 // TODO
2131 // #define GST_IS_ELEMENT_DETAILS(details)
2134 * Get the GstEventType of the event.
2135 * event:
2136 * the event to query
2138 // TODO
2139 // #define GST_EVENT_TYPE(event) (GST_EVENT_CAST(event)->type)
2142 * Get a constant string representation of the GstEventType of the event.
2143 * event:
2144 * the event to query
2146 // TODO
2147 // #define GST_EVENT_TYPE_NAME(event) (gst_event_type_get_name(GST_EVENT_TYPE(event)))
2150 * Get the GstClockTime timestamp of the event. This is the time when the event
2151 * was created.
2152 * event:
2153 * the event to query
2155 // TODO
2156 // #define GST_EVENT_TIMESTAMP(event) (GST_EVENT_CAST(event)->timestamp)
2159 * The source GstObject that generated this event.
2160 * event:
2161 * the event to query
2163 // TODO
2164 // #define GST_EVENT_SRC(event) (GST_EVENT_CAST(event)->src)
2167 * Check if an event can travel downstream.
2168 * ev:
2169 * the event to query
2171 // TODO
2172 // #define GST_EVENT_IS_DOWNSTREAM(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_DOWNSTREAM)
2175 * Check if an event is serialized with the data stream.
2176 * ev:
2177 * the event to query
2179 // TODO
2180 // #define GST_EVENT_IS_SERIALIZED(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_SERIALIZED)
2183 * Check if an event can travel upstream.
2184 * ev:
2185 * the event to query
2187 // TODO
2188 // #define GST_EVENT_IS_UPSTREAM(ev) !!(GST_EVENT_TYPE (ev) GST_EVENT_TYPE_UPSTREAM)
2191 * when making custom event types, use this macro with the num and
2192 * the given flags
2193 * num:
2194 * the event number to create
2195 * flags:
2196 * the event flags
2198 // TODO
2199 // #define GST_EVENT_MAKE_TYPE(num,flags)
2201 int GST_EVENT_TYPE_SHIFT = 4;
2204 * GST_EVENT_MAKE_TYPE:
2205 * @num: the event number to create
2206 * @flags: the event flags
2208 * when making custom event types, use this macro with the num and
2209 * the given flags
2211 int GST_EVENT_MAKE_TYPE( int num, int flags )
2213 return (((num) << GST_EVENT_TYPE_SHIFT) | (flags));
2217 * Copy the event using the event specific copy function.
2218 * ev:
2219 * The event to copy
2221 // TODO
2222 // #define gst_event_copy(ev) GST_EVENT_CAST (gst_mini_object_copy (GST_MINI_OBJECT (ev)))
2225 * Decrease the refcount of an event, freeing it if the refcount reaches 0.
2226 * ev:
2227 * The event to refcount
2229 // TODO
2230 // #define gst_event_unref(ev) gst_mini_object_unref (GST_MINI_OBJECT (ev))
2233 * Modifies a pointer to a GstEvent to point to a different GstEvent. The
2234 * modification is done atomically (so this is useful for ensuring thread safety
2235 * in some cases), and the reference counts are updated appropriately (the old
2236 * event is unreffed, the new one is reffed).
2237 * Either new_event or the GstEvent pointed to by old_event may be NULL.
2238 * old_event:
2239 * pointer to a pointer to a GstEvent to be replaced.
2240 * new_event:
2241 * pointer to a GstEvent that will replace the event pointed to
2242 * by old_event.
2243 * Since 0.10.3
2245 // TODO
2246 // #define gst_event_replace(old_event,new_event)
2249 * Get the number of associations in the entry.
2250 * entry:
2251 * The entry to query
2253 // TODO
2254 // #define GST_INDEX_NASSOCS(entry) ((entry)->data.assoc.nassocs)
2257 * Get the flags for this entry.
2258 * entry:
2259 * The entry to query
2261 // TODO
2262 // #define GST_INDEX_ASSOC_FLAGS(entry) ((entry)->data.assoc.flags)
2265 * Get the i-th format of the entry.
2266 * entry:
2267 * The entry to query
2268 * i:
2269 * The format index
2271 // TODO
2272 // #define GST_INDEX_ASSOC_FORMAT(entry,i) ((entry)->data.assoc.assocs[(i)].format)
2275 * Get the i-th value of the entry.
2276 * entry:
2277 * The entry to query
2278 * i:
2279 * The value index
2281 // TODO
2282 // #define GST_INDEX_ASSOC_VALUE(entry,i) ((entry)->data.assoc.assocs[(i)].value)
2285 * Get the format of the format entry
2286 * entry:
2287 * The entry to query
2289 // TODO
2290 // #define GST_INDEX_FORMAT_FORMAT(entry) ((entry)->data.format.format)
2293 * Get the key of the format entry
2294 * entry:
2295 * The entry to query
2297 // TODO
2298 // #define GST_INDEX_FORMAT_KEY(entry) ((entry)->data.format.key)
2301 * Get the description of the id entry
2302 * entry:
2303 * The entry to query
2305 // TODO
2306 // #define GST_INDEX_ID_DESCRIPTION(entry) ((entry)->data.id.description)
2309 * Check if the index can be read from
2310 * obj:
2311 * The index to check
2313 // TODO
2314 // #define GST_INDEX_IS_READABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_INDEX_READABLE))
2317 * Check if the index can be written to
2318 * obj:
2319 * The index to check
2321 // TODO
2322 // #define GST_INDEX_IS_WRITABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_INDEX_WRITABLE))
2325 * Macro to cast to a GstIterator
2326 * it:
2327 * the GstIterator value
2329 // TODO
2330 // #define GST_ITERATOR(it) ((GstIterator*)(it))
2333 * Macro to get the lock protecting the datastructure being iterated.
2334 * it:
2335 * the GstIterator to get the lock of
2337 // TODO
2338 // #define GST_ITERATOR_LOCK(it) (GST_ITERATOR(it)->lock)
2341 * Macro to get the cookie of a GstIterator. The cookie of the
2342 * iterator is the value of the master cookie when the iterator
2343 * was created.
2344 * Whenever the iterator is iterated, the value is compared to the
2345 * value of the master cookie. If they are different, a concurrent
2346 * modification happened to the iterator and a resync is needed.
2347 * it:
2348 * the GstIterator to get the cookie of
2350 // TODO
2351 // #define GST_ITERATOR_COOKIE(it) (GST_ITERATOR(it)->cookie)
2354 * Macro to get a pointer to where the master cookie is stored. The
2355 * master cookie protects the structure being iterated and gets updated
2356 * whenever the datastructure changes.
2357 * it:
2358 * the GstIterator to get the master cookie of
2360 // TODO
2361 // #define GST_ITERATOR_ORIG_COOKIE(it) (GST_ITERATOR(it)->master_cookie)
2364 * Get the object that posted message.
2365 * message:
2366 * a GstMessage
2368 // TODO
2369 // #define GST_MESSAGE_SRC(message) (GST_MESSAGE(message)->src)
2372 * Get the timestamp of message. This is the timestamp when the message
2373 * was created.
2374 * message:
2375 * a GstMessage
2377 // TODO
2378 // #define GST_MESSAGE_TIMESTAMP(message) (GST_MESSAGE(message)->timestamp)
2381 * Get the GstMessageType of message.
2382 * message:
2383 * a GstMessage
2385 // TODO
2386 // #define GST_MESSAGE_TYPE(message) (GST_MESSAGE(message)->type)
2389 * Get a constant string representation of the GstMessageType of message.
2390 * message:
2391 * a GstMessage
2392 * Since 0.10.4
2394 // TODO
2395 // #define GST_MESSAGE_TYPE_NAME(message) gst_message_type_get_name(GST_MESSAGE_TYPE(message))
2398 * Creates a copy of the message. Returns a copy of the message.
2399 * MT safe
2400 * msg:
2401 * the message to copy
2403 // TODO
2404 // #define gst_message_copy(msg) GST_MESSAGE (gst_mini_object_copy (GST_MINI_OBJECT (msg)))
2407 * Checks if a message is writable. If not, a writable copy is made and
2408 * returned. Returns a message (possibly a duplicate) that is writable.
2409 * MT safe
2410 * msg:
2411 * the message to make writable
2413 // TODO
2414 // #define gst_message_make_writable(msg) GST_MESSAGE (gst_mini_object_make_writable (GST_MINI_OBJECT (msg)))
2417 * Convenience macro to decrease the reference count of the message, possibly freeing
2418 * the it.
2419 * msg:
2420 * the message to unref
2421 * See Also
2422 * GstBus, GstMiniObject, GstElement
2424 // TODO
2425 // #define gst_message_unref(msg) gst_mini_object_unref (GST_MINI_OBJECT (msg))
2428 * This macro returns the entire set of flags for the mini-object.
2429 * obj:
2430 * MiniObject to return flags for.
2432 // TODO
2433 // #define GST_MINI_OBJECT_FLAGS(obj) (GST_MINI_OBJECT(obj)->flags)
2436 * This macro checks to see if the given flag is set.
2437 * obj:
2438 * MiniObject to check for flags.
2439 * flag:
2440 * Flag to check for
2442 // TODO
2443 // #define GST_MINI_OBJECT_FLAG_IS_SET(obj,flag) !!(GST_MINI_OBJECT_FLAGS (obj) (flag))
2446 * This macro sets the given bits.
2447 * obj:
2448 * MiniObject to set flag in.
2449 * flag:
2450 * Flag to set, can by any number of bits in guint32.
2452 // TODO
2453 // #define GST_MINI_OBJECT_FLAG_SET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) |= (flag))
2456 * This macro usets the given bits.
2457 * obj:
2458 * MiniObject to unset flag in.
2459 * flag:
2460 * Flag to set, must be a single bit in guint32.
2462 // TODO
2463 // #define GST_MINI_OBJECT_FLAG_UNSET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) = ~(flag))
2466 * Get access to the reference count field of the mini-object.
2467 * obj:
2468 * a GstMiniObject
2470 // TODO
2471 // #define GST_MINI_OBJECT_REFCOUNT(obj) ((GST_MINI_OBJECT_CAST(obj))->refcount)
2474 * Get the reference count value of the mini-object.
2475 * obj:
2476 * a GstMiniObject
2478 // TODO
2479 // #define GST_MINI_OBJECT_REFCOUNT_VALUE(obj) (g_atomic_int_get ((GST_MINI_OBJECT_CAST(obj))->refcount))
2482 * This macro returns the entire set of flags for the object.
2483 * obj:
2484 * a GstObject
2486 // TODO
2487 // #define GST_OBJECT_FLAGS(obj) (GST_OBJECT_CAST (obj)->flags)
2490 * This macro checks to see if the given flag is set.
2491 * obj:
2492 * a GstObject
2493 * flag:
2494 * Flag to check for
2496 // TODO
2497 // #define GST_OBJECT_FLAG_IS_SET(obj,flag) ((GST_OBJECT_FLAGS (obj) (flag)) == (flag))
2500 * This macro sets the given bits.
2501 * obj:
2502 * a GstObject
2503 * flag:
2504 * Flag to set
2506 // TODO
2507 // #define GST_OBJECT_FLAG_SET(obj,flag) (GST_OBJECT_FLAGS (obj) |= (flag))
2510 * This macro usets the given bits.
2511 * obj:
2512 * a GstObject
2513 * flag:
2514 * Flag to set
2516 // TODO
2517 // #define GST_OBJECT_FLAG_UNSET(obj,flag) (GST_OBJECT_FLAGS (obj) = ~(flag))
2520 * Get the name of this object
2521 * obj:
2522 * a GstObject
2524 // TODO
2525 // #define GST_OBJECT_NAME(obj) (GST_OBJECT_CAST(obj)->name)
2528 * Get the parent of this object
2529 * obj:
2530 * a GstObject
2532 // TODO
2533 // #define GST_OBJECT_PARENT(obj) (GST_OBJECT_CAST(obj)->parent)
2536 * Check if the given object is beeing destroyed.
2537 * obj:
2538 * a GstObject
2540 // TODO
2541 // #define GST_OBJECT_IS_DISPOSING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_DISPOSING))
2544 * Check if the given object is floating (has no owner).
2545 * obj:
2546 * a GstObject
2548 // TODO
2549 // #define GST_OBJECT_IS_FLOATING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_FLOATING))
2552 * Get access to the reference count field of the object.
2553 * obj:
2554 * a GstObject
2556 // TODO
2557 // #define GST_OBJECT_REFCOUNT(obj) (((GObject*)(obj))->ref_count)
2560 * Get the reference count value of the object.
2561 * obj:
2562 * a GstObject
2564 // TODO
2565 // #define GST_OBJECT_REFCOUNT_VALUE(obj) g_atomic_int_get (GST_OBJECT_REFCOUNT(obj))
2568 * This macro will return the class lock used to protect deep_notify signal
2569 * emission on thread-unsafe glib versions (glib < 2.8).
2570 * obj:
2571 * a GstObjectClass
2573 // TODO
2574 // #define GST_CLASS_GET_LOCK(obj) (GST_OBJECT_CLASS_CAST(obj)->lock)
2577 * Lock the class.
2578 * obj:
2579 * a GstObjectClass
2581 // TODO
2582 // #define GST_CLASS_LOCK(obj) (g_static_rec_mutex_lock(GST_CLASS_GET_LOCK(obj)))
2585 * Try to lock the class, returns TRUE if class could be locked.
2586 * obj:
2587 * a GstObjectClass
2589 // TODO
2590 // #define GST_CLASS_TRYLOCK(obj) (g_static_rec_mutex_trylock(GST_CLASS_GET_LOCK(obj)))
2593 * Unlock the class.
2594 * obj:
2595 * a GstObjectClass
2597 // TODO
2598 // #define GST_CLASS_UNLOCK(obj) (g_static_rec_mutex_unlock(GST_CLASS_GET_LOCK(obj)))
2601 * This macro will obtain a lock on the object, making serialization possible.
2602 * It blocks until the lock can be obtained.
2603 * obj:
2604 * a GstObject to lock
2606 // TODO
2607 // #define GST_OBJECT_LOCK(obj) g_mutex_lock(GST_OBJECT_GET_LOCK(obj))
2610 * This macro will try to obtain a lock on the object, but will return with
2611 * FALSE if it can't get it immediately.
2612 * obj:
2613 * a Object.
2615 // TODO
2616 // #define GST_OBJECT_TRYLOCK(obj) g_mutex_trylock(GST_OBJECT_GET_LOCK(obj))
2619 * This macro releases a lock on the object.
2620 * obj:
2621 * a GstObject to unlock.
2623 // TODO
2624 // #define GST_OBJECT_UNLOCK(obj) g_mutex_unlock(GST_OBJECT_GET_LOCK(obj))
2627 * Acquire a reference to the mutex of this object.
2628 * obj:
2629 * a GstObject
2631 // TODO
2632 // #define GST_OBJECT_GET_LOCK(obj) (GST_OBJECT_CAST(obj)->lock)
2635 * Macro to test if the given GstPadLinkReturn value indicates a failed
2636 * link step.
2637 * ret:
2638 * the GstPadLinkReturn value
2640 // TODO
2641 // #define GST_PAD_LINK_FAILED(ret) ((ret) < GST_PAD_LINK_OK)
2644 * Macro to test if the given GstPadLinkReturn value indicates a successful
2645 * link step.
2646 * ret:
2647 * the GstPadLinkReturn value
2649 // TODO
2650 // #define GST_PAD_LINK_SUCCESSFUL(ret) ((ret) >= GST_PAD_LINK_OK)
2653 * Get a copy of the name of the pad. g_free() after usage.
2654 * MT safe.
2655 * pad:
2656 * the pad to get the name from
2658 // TODO
2659 // #define gst_pad_get_name(pad) gst_object_get_name (GST_OBJECT_CAST (pad))
2662 * Get the parent of pad. This function increases the refcount
2663 * of the parent object so you should gst_object_unref() it after usage.
2664 * Can return NULL if the pad did not have a parent.
2665 * MT safe.
2666 * pad:
2667 * the pad to get the parent of
2669 // TODO
2670 // #define gst_pad_get_parent(pad) gst_object_get_parent (GST_OBJECT_CAST (pad))
2673 * Get the stream lock of pad. The stream lock is protecting the
2674 * resources used in the data processing functions of pad.
2675 * pad:
2676 * a GstPad
2678 // TODO
2679 // #define GST_PAD_GET_STREAM_LOCK(pad) (GST_PAD_CAST(pad)->stream_rec_lock)
2682 * Lock the stream lock of pad.
2683 * pad:
2684 * a GstPad
2686 // TODO
2687 // #define GST_PAD_STREAM_LOCK(pad) (g_static_rec_mutex_lock(GST_PAD_GET_STREAM_LOCK(pad)))
2690 * Lock the stream lock of pad t times.
2691 * pad:
2692 * a GstPad
2693 * t:
2694 * the number of times to recursively lock
2696 // TODO
2697 // #define GST_PAD_STREAM_LOCK_FULL(pad,t) (g_static_rec_mutex_lock_full(GST_PAD_GET_STREAM_LOCK(pad), t))
2700 * Try to Lock the stream lock of the pad, return TRUE if the lock could be
2701 * taken.
2702 * pad:
2703 * a GstPad
2705 // TODO
2706 // #define GST_PAD_STREAM_TRYLOCK(pad) (g_static_rec_mutex_trylock(GST_PAD_GET_STREAM_LOCK(pad)))
2709 * Unlock the stream lock of pad.
2710 * pad:
2711 * a GstPad
2713 // TODO
2714 // #define GST_PAD_STREAM_UNLOCK(pad) (g_static_rec_mutex_unlock(GST_PAD_GET_STREAM_LOCK(pad)))
2717 * Fully unlock the recursive stream lock of pad, return the number of times
2718 * pad was locked.
2719 * pad:
2720 * a GstPad
2722 // TODO
2723 // #define GST_PAD_STREAM_UNLOCK_FULL(pad) (g_static_rec_mutex_unlock_full(GST_PAD_GET_STREAM_LOCK(pad)))
2726 * Macro to test if the given GstFlowReturn value indicates a fatal
2727 * error. This macro is mainly used in elements to decide when an error
2728 * message should be posted on the bus.
2729 * ret:
2730 * a GstFlowReturn value
2731 * Property Details
2732 * The "caps" property
2733 * "caps" GstCaps : Read
2734 * The capabilities of the pad.
2736 // TODO
2737 // #define GST_FLOW_IS_FATAL(ret) ((ret) <= GST_FLOW_UNEXPECTED)
2740 * Convenience macro to fill the values of a GstStaticPadTemplate
2741 * structure.
2742 * padname:
2743 * the name template of pad
2744 * dir:
2745 * the GstPadDirection of the pad
2746 * pres:
2747 * the GstPadPresence of the pad
2748 * caps:
2749 * the GstStaticCaps of the pad
2751 // TODO
2752 // #define GST_STATIC_PAD_TEMPLATE(padname, dir, pres, caps)
2755 * Get the nametemplate of the padtemplate.
2756 * templ:
2757 * the template to query
2759 // TODO
2760 // #define GST_PAD_TEMPLATE_NAME_TEMPLATE(templ) (((GstPadTemplate *)(templ))->name_template)
2763 * Get the direction of the padtemplate.
2764 * templ:
2765 * the template to query
2767 // TODO
2768 // #define GST_PAD_TEMPLATE_DIRECTION(templ) (((GstPadTemplate *)(templ))->direction)
2771 * Get the presence of the padtemplate.
2772 * templ:
2773 * the template to query
2775 // TODO
2776 // #define GST_PAD_TEMPLATE_PRESENCE(templ) (((GstPadTemplate *)(templ))->presence)
2779 * Get a handle to the padtemplate GstCaps
2780 * templ:
2781 * the template to query
2783 // TODO
2784 // #define GST_PAD_TEMPLATE_CAPS(templ) (((GstPadTemplate *)(templ))->caps)
2787 * Check if the properties of the padtemplate are fixed
2788 * templ:
2789 * the template to query
2791 // TODO
2792 // #define GST_PAD_TEMPLATE_IS_FIXED(templ) (GST_OBJECT_FLAG_IS_SET(templ, GST_PAD_TEMPLATE_FIXED))
2795 * This macro needs to be used to define the entry point and meta data of a
2796 * plugin. One would use this macro to export a plugin, so that it can be used
2797 * by other applications
2798 * major:
2799 * major version number of the gstreamer-core that plugin was compiled for
2800 * minor:
2801 * minor version number of the gstreamer-core that plugin was compiled for
2802 * name:
2803 * short, but unique name of the plugin
2804 * description:
2805 * information about the purpose of the plugin
2806 * init:
2807 * function pointer to the plugin_init method with the signature of static gboolean plugin_init (GstPlugin * plugin).
2808 * version:
2809 * full version string (e.g. VERSION from config.h)
2810 * license:
2811 * under which licence the package has been released, e.g. GPL, LGPL.
2812 * package:
2813 * the package-name (e.g. PACKAGE_NAME from config.h)
2814 * origin:
2815 * a description from where the package comes from (e.g. the homepage URL)
2817 // TODO
2818 // #define GST_PLUGIN_DEFINE(major,minor,name,description,init,version,license,package,origin)
2821 * This macro needs to be used to define the entry point and meta data of a
2822 * local plugin. One would use this macro to define a local plugin that can only
2823 * be used by the own application.
2824 * major:
2825 * major version number of the gstreamer-core that plugin was compiled for
2826 * minor:
2827 * minor version number of the gstreamer-core that plugin was compiled for
2828 * name:
2829 * short, but unique name of the plugin
2830 * description:
2831 * information about the purpose of the plugin
2832 * init:
2833 * function pointer to the plugin_init method with the signature of static gboolean plugin_init (GstPlugin * plugin).
2834 * version:
2835 * full version string (e.g. VERSION from config.h)
2836 * license:
2837 * under which licence the package has been released, e.g. GPL, LGPL.
2838 * package:
2839 * the package-name (e.g. PACKAGE_NAME from config.h)
2840 * origin:
2841 * a description from where the package comes from (e.g. the homepage URL)
2843 // TODO
2844 // #define GST_PLUGIN_DEFINE_STATIC(major,minor,name,description,init,version,license,package,origin)
2847 * Get the name of the feature
2848 * feature:
2849 * The feature to query
2851 // TODO
2852 // #define GST_PLUGIN_FEATURE_NAME(feature) (GST_PLUGIN_FEATURE (feature)->name)
2855 * Get the GstQueryType of the query.
2856 * query:
2857 * the query to query
2859 // TODO
2860 // #define GST_QUERY_TYPE(query) (((GstQuery*)(query))->type)
2863 * Get a constant string representation of the GstQueryType of the query.
2864 * query:
2865 * the query to query
2866 * Since 0.10.4
2868 // TODO
2869 // #define GST_QUERY_TYPE_NAME(query) (gst_query_type_get_name(GST_QUERY_TYPE(query)))
2872 * Increases the refcount of the given query by one.
2873 * q:
2874 * a GstQuery to increase the refcount of.
2876 // TODO
2877 // #define gst_query_ref(q) GST_QUERY (gst_mini_object_ref (GST_MINI_OBJECT (q)))
2880 * Decreases the refcount of the query. If the refcount reaches 0, the query
2881 * will be freed.
2882 * q:
2883 * a GstQuery to decrease the refcount of.
2885 // TODO
2886 // #define gst_query_unref(q) gst_mini_object_unref (GST_MINI_OBJECT (q))
2889 * Copies the given query using the copy function of the parent GstData
2890 * structure.
2891 * q:
2892 * a GstQuery to copy.
2894 // TODO
2895 // #define gst_query_copy(q) GST_QUERY (gst_mini_object_copy (GST_MINI_OBJECT (q)))
2898 * Makes a writable query from the given query.
2899 * q:
2900 * a GstQuery to make writable
2902 // TODO
2903 // #define gst_query_make_writable(q) GST_QUERY (gst_mini_object_make_writable (GST_MINI_OBJECT (q)))
2906 * Get the list of paths for the default registry.
2908 // TODO
2909 // #define gst_default_registry_get_path_list()
2912 * Add the plugin to the default registry.
2913 * The plugin-added signal will be emitted.
2914 * plugin:
2915 * the plugin to add
2917 // TODO
2918 // #define gst_default_registry_add_plugin(plugin)
2921 * Add the given path to the default registry. The syntax of the
2922 * path is specific to the registry. If the path has already been
2923 * added, do nothing.
2924 * path:
2925 * the path to add to the registry
2927 // TODO
2928 // #define gst_default_registry_add_path(path)
2931 * Find the plugin with the given name in the default registry.
2932 * The plugin will be reffed; caller is responsible for unreffing.
2933 * name:
2934 * the plugin name to find
2936 // TODO
2937 // #define gst_default_registry_find_plugin(name)
2940 * Find the pluginfeature with the given name and type in the default registry.
2941 * name:
2942 * the pluginfeature name to find
2943 * type:
2944 * the pluginfeature type to find
2946 // TODO
2947 // #define gst_default_registry_find_feature(name,type)
2950 * Get a copy of all plugins registered in the default registry.
2952 // TODO
2953 // #define gst_default_registry_get_plugin_list()
2956 * Runs a filter against all features of the plugins in the default registry
2957 * and returns a GList with the results.
2958 * If the first flag is set, only the first match is
2959 * returned (as a list with a single object).
2960 * filter:
2961 * the filter to use
2962 * first:
2963 * only return first match
2964 * user_data:
2965 * user data passed to the filter function
2966 * See Also
2967 * GstPlugin, GstPluginFeature
2969 // TODO
2970 // #define gst_default_registry_feature_filter(filter,first,user_data)
2973 * Send a broadcast signal to all waiting task conds
2974 * task:
2975 * Task to broadcast
2977 // TODO
2978 // #define GST_TASK_BROADCAST(task) g_cond_breadcast(GST_TASK_GET_COND (task))
2981 * Get access to the cond of the task.
2982 * task:
2983 * Task to get the cond of
2985 // TODO
2986 // #define GST_TASK_GET_COND(task) (GST_TASK_CAST(task)->cond)
2989 * Get access to the task lock.
2990 * task:
2991 * Task to get the lock of
2993 // TODO
2994 // #define GST_TASK_GET_LOCK(task) (GST_TASK_CAST(task)->lock)
2997 * Signal the task cond
2998 * task:
2999 * Task to signal
3001 // TODO
3002 // #define GST_TASK_SIGNAL(task) g_cond_signal(GST_TASK_GET_COND (task))
3005 * Get access to the state of the task.
3006 * task:
3007 * Task to get the state of
3009 // TODO
3010 // #define GST_TASK_STATE(task) (GST_TASK_CAST(task)->state)
3013 * Wait for the task cond to be signalled
3014 * task:
3015 * Task to wait for
3017 // TODO
3018 // #define GST_TASK_WAIT(task) g_cond_wait(GST_TASK_GET_COND (task), GST_OBJECT_GET_LOCK (task))
3021 * Specifies the type of function passed to gst_bus_add_watch() or
3022 * gst_bus_add_watch_full(), which is called from the mainloop when a message
3023 * is available on the bus.
3024 * The message passed to the function will be unreffed after execution of this
3025 * function so it should not be freed in the function.
3026 * Note that this function is used as a GSourceFunc which means that returning
3027 * FALSE will remove the GSource from the mainloop.
3028 * bus:
3029 * the GstBus that sent the message
3030 * message:
3031 * the GstMessage
3032 * data:
3033 * user data that has been given, when registering the handler
3034 * Returns:
3035 * FALSE if the event source should be removed.
3037 // gboolean (*GstBusFunc) (GstBus *bus, GstMessage *message, gpointer data);
3038 public typedef extern(C) int function (GstBus*, GstMessage*, void*) GstBusFunc;
3041 * Handler will be invoked synchronously, when a new message has been injected
3042 * into the bus. This function is mostly used internally. Only one sync handler
3043 * can be attached to a given bus.
3044 * If the handler returns GST_BUS_DROP, it should unref the message, else the
3045 * message should not be unreffed by the sync handler.
3046 * bus:
3047 * the GstBus that sent the message
3048 * message:
3049 * the GstMessage
3050 * data:
3051 * user data that has been given, when registering the handler
3052 * Returns:
3053 * GstBusSyncReply stating what to do with the message
3055 // GstBusSyncReply (*GstBusSyncHandler) (GstBus *bus, GstMessage *message, gpointer data);
3056 public typedef extern(C) GstBusSyncReply function (GstBus*, GstMessage*, void*) GstBusSyncHandler;
3059 * The function prototype of the callback.
3060 * clock:
3061 * The clock that triggered the callback
3062 * time:
3063 * The time it was triggered
3064 * id:
3065 * The GstClockID that expired
3066 * user_data:
3067 * user data passed in the async_wait call
3068 * Returns:
3069 * TRUE or FALSE (currently unused)
3071 // gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time, GstClockID id, gpointer user_data);
3072 public typedef extern(C) int function (GstClock*, GstClockTime, GstClockID, void*) GstClockCallback;
3075 * Function to filter out entries in the index.
3076 * index:
3077 * The index being queried
3078 * entry:
3079 * The entry to be added.
3080 * user_data:
3081 * User data passed to the function.
3082 * Returns:
3083 * This function should return TRUE if the entry is to be added
3084 * to the index, FALSE otherwise.
3086 // gboolean (*GstIndexFilter) (GstIndex *index, GstIndexEntry *entry, gpointer user_data);
3087 public typedef extern(C) int function (GstIndex*, GstIndexEntry*, void*) GstIndexFilter;
3090 * Function to resolve ids to writer descriptions.
3091 * index:
3092 * the index being queried.
3093 * writer:
3094 * The object that wants to write
3095 * writer_string:
3096 * A description of the writer.
3097 * user_data:
3098 * user_data as registered
3099 * Returns:
3100 * TRUE if an id could be assigned to the writer.
3102 // gboolean (*GstIndexResolver) (GstIndex *index, GstObject *writer, gchar **writer_string, gpointer user_data);
3103 public typedef extern(C) int function (GstIndex*, GstObject*, gchar**, void*) GstIndexResolver;
3106 * The function that will be called when a GList iterator is freed. The
3107 * owner of the GList iterator can then clean up its resources.
3108 * owner:
3109 * the owner of the iterator
3111 // void (*GstIteratorDisposeFunction) (gpointer owner);
3112 public typedef extern(C) void function (void*) GstIteratorDisposeFunction;
3115 * The function that will be called when the next element of the iterator
3116 * should be retrieved.
3117 * Implementors of a GstIterator should implement this
3118 * function and pass it to the constructor of the custom iterator.
3119 * The function will be called with the iterator lock held.
3120 * it:
3121 * the iterator
3122 * result:
3123 * a pointer to hold the next item
3124 * Returns:
3125 * the result of the operation.
3127 // GstIteratorResult (*GstIteratorNextFunction) (GstIterator *it, gpointer *result);
3128 public typedef extern(C) GstIteratorResult function (GstIterator*, gpointer*) GstIteratorNextFunction;
3131 * The function that will be called after the next item of the iterator
3132 * has been retrieved. This function will typically increase the refcount
3133 * of the item or make a copy.
3134 * Implementors of a GstIterator should implement this
3135 * function and pass it to the constructor of the custom iterator.
3136 * The function will be called with the iterator lock held.
3137 * it:
3138 * the iterator
3139 * item:
3140 * the item being retrieved.
3141 * Returns:
3142 * the result of the operation.
3144 // GstIteratorItem (*GstIteratorItemFunction) (GstIterator *it, gpointer item);
3145 public typedef extern(C) GstIteratorItem function (GstIterator*, void*) GstIteratorItemFunction;
3148 * This function will be called whenever a concurrent update happened
3149 * to the iterated datastructure. The implementor of the iterator should
3150 * restart the iterator from the beginning and clean up any state it might
3151 * have.
3152 * Implementors of a GstIterator should implement this
3153 * function and pass it to the constructor of the custom iterator.
3154 * The function will be called with the iterator lock held.
3155 * it:
3156 * the iterator
3158 // void (*GstIteratorResyncFunction) (GstIterator *it);
3159 public typedef extern(C) void function (GstIterator*) GstIteratorResyncFunction;
3162 * This function will be called when the iterator is freed.
3163 * Implementors of a GstIterator should implement this
3164 * function and pass it to the constructor of the custom iterator.
3165 * The function will be called with the iterator lock held.
3166 * it:
3167 * the iterator
3169 // void (*GstIteratorFreeFunction) (GstIterator *it);
3170 public typedef extern(C) void function (GstIterator*) GstIteratorFreeFunction;
3173 * A function to be passed to gst_iterator_fold().
3174 * item:
3175 * the item to fold
3176 * ret:
3177 * a GValue collecting the result
3178 * user_data:
3179 * data passed to gst_iterator_fold()
3180 * Returns:
3181 * TRUE if the fold should continue, FALSE if it should stop.
3183 // gboolean (*GstIteratorFoldFunction) (gpointer item, GValue *ret, gpointer user_data);
3184 public typedef extern(C) int function (void*, GValue*, void*) GstIteratorFoldFunction;
3187 * Virtual function prototype for methods to create copies of instances.
3188 * obj:
3189 * MiniObject to copy
3190 * Returns:
3191 * reference to cloned instance.
3193 // GstMiniObject* (*GstMiniObjectCopyFunction) (const GstMiniObject *obj);
3194 public typedef extern(C) GstMiniObject* function (GstMiniObject*) GstMiniObjectCopyFunction;
3197 * Virtual function prototype for methods to free ressources used by
3198 * mini-objects. Subclasses of the mini object are allowed to revive the
3199 * passed object by doing a gst_mini_object_ref(). If the object is not
3200 * revived after the finalize function, the memory associated with the
3201 * object is freed.
3202 * obj:
3203 * MiniObject to finalize
3205 // void (*GstMiniObjectFinalizeFunction) (GstMiniObject *obj);
3206 public typedef extern(C) void function (GstMiniObject*) GstMiniObjectFinalizeFunction;
3209 * Callback used by gst_pad_set_blocked_async(). Gets called when the blocking
3210 * operation succeeds.
3211 * pad:
3212 * the GstPad that is blockend or unblocked.
3213 * blocked:
3214 * blocking state for the pad
3215 * user_data:
3216 * the gpointer to optional user data.
3218 // void (*GstPadBlockCallback) (GstPad *pad, gboolean blocked, gpointer user_data);
3219 public typedef extern(C) void function (GstPad*, int, void*) GstPadBlockCallback;
3222 * Ask the sinkpad pad to allocate a buffer with offset, size and caps.
3223 * The result will be stored in buf.
3224 * The purpose of this function is to allocate a buffer that is optimal to
3225 * be processed by pad. The function is mostly overridden by elements that can
3226 * provide a hardware buffer in order to avoid additional memcpy operations.
3227 * The function can return a buffer that does not have caps, in which case the
3228 * upstream element requests a format change.
3229 * When this function returns anything else than GST_FLOW_OK, the buffer allocation
3230 * failed and buf does not contain valid data.
3231 * By default this function returns a new buffer of size and with caps containing
3232 * purely malloced data.
3233 * pad:
3234 * a sink GstPad
3235 * offset:
3236 * the desired offset of the buffer
3237 * size:
3238 * the desired size of the buffer
3239 * caps:
3240 * the desired caps of the buffer
3241 * buf:
3242 * pointer to hold the allocated buffer.
3243 * Returns:
3244 * GST_FLOW_OK if buf contains a valid buffer, any other return
3245 * value means buf does not hold a valid buffer.
3247 // GstFlowReturn (*GstPadBufferAllocFunction) (GstPad *pad, guint64 offset, guint size, GstCaps *caps, GstBuffer **buf);
3248 public typedef extern(C) GstFlowReturn function (GstPad*, ulong, uint, GstCaps*, GstBuffer**) GstPadBufferAllocFunction;
3251 * A function that will be called on sinkpads when chaining buffers.
3252 * pad:
3253 * the GstPad that performed the chain.
3254 * buffer:
3255 * the GstBuffer that is chained.
3256 * Returns:
3257 * GST_FLOW_OK for success
3259 // GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstBuffer *buffer);
3260 public typedef extern(C) GstFlowReturn function (GstPad*, GstBuffer*) GstPadChainFunction;
3263 * Check if pad can be activated in pull mode.
3264 * This function will be deprecated after 0.10; use the seeking query to check
3265 * if a pad can support random access.
3266 * pad:
3267 * a GstPad
3268 * Returns:
3269 * TRUE if the pad can operate in pull mode.
3271 // gboolean (*GstPadCheckGetRangeFunction) (GstPad *pad);
3272 public typedef extern(C) int function (GstPad*) GstPadCheckGetRangeFunction;
3275 * This function will be called on sourcepads when a peer element
3276 * request a buffer at the specified offset and length. If this function
3277 * returns GST_FLOW_OK, the result buffer will be stored in buffer. The
3278 * contents of buffer is invalid for any other return value.
3279 * pad:
3280 * the GstPad to perform the getrange on.
3281 * offset:
3282 * the offset of the range
3283 * length:
3284 * the length of the range
3285 * buffer:
3286 * a memory location to hold the result buffer
3287 * Returns:
3288 * GST_FLOW_OK for success
3290 // GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, guint64 offset, guint length, GstBuffer **buffer);
3291 public typedef extern(C) GstFlowReturn function (GstPad*, ulong, uint, GstBuffer**) GstPadGetRangeFunction;
3294 * Function signature to handle an event for the pad.
3295 * pad:
3296 * the GstPad to handle the event.
3297 * event:
3298 * the GstEvent to handle.
3299 * Returns:
3300 * TRUE if the pad could handle the event.
3302 // gboolean (*GstPadEventFunction) (GstPad *pad, GstEvent *event);
3303 public typedef extern(C) int function (GstPad*, GstEvent*) GstPadEventFunction;
3306 * Function signature to handle a new link on the pad.
3307 * pad:
3308 * the GstPad that is linked.
3309 * peer:
3310 * the peer GstPad of the link
3311 * Returns:
3312 * the result of the link with the specified peer.
3314 // GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad, GstPad *peer);
3315 public typedef extern(C) GstPadLinkReturn function (GstPad*, GstPad*) GstPadLinkFunction;
3318 * Function signature to handle a unlinking the pad prom its peer.
3319 * pad:
3320 * the GstPad that is linked.
3322 // void (*GstPadUnlinkFunction) (GstPad *pad);
3323 public typedef extern(C) void function (GstPad*) GstPadUnlinkFunction;
3326 * Check if pad can accept caps. By default this function will see if caps
3327 * intersect with the result from gst_pad_get_caps() by can be overridden to
3328 * perform extra checks.
3329 * pad:
3330 * the GstPad to check
3331 * caps:
3332 * the GstCaps to check
3333 * Returns:
3334 * TRUE if the caps can be accepted by the pad.
3336 // gboolean (*GstPadAcceptCapsFunction) (GstPad *pad, GstCaps *caps);
3337 public typedef extern(C) int function (GstPad*, GstCaps*) GstPadAcceptCapsFunction;
3340 * Returns a copy of the capabilities of the specified pad. By default this
3341 * function will return the pad template capabilities, but can optionally
3342 * be overridden by elements.
3343 * pad:
3344 * the GstPad to get the capabilities of.
3345 * Returns:
3346 * a newly allocated copy GstCaps of the pad.
3348 // GstCaps* (*GstPadGetCapsFunction) (GstPad *pad);
3349 public typedef extern(C) GstCaps* function (GstPad*) GstPadGetCapsFunction;
3352 * Set caps on pad. By default this function updates the caps of the
3353 * pad but the function can be overriden by elements to perform extra
3354 * actions or verifications.
3355 * pad:
3356 * the GstPad to set the capabilities of.
3357 * caps:
3358 * the GstCaps to set
3359 * Returns:
3360 * TRUE if the caps could be set on the pad.
3362 // gboolean (*GstPadSetCapsFunction) (GstPad *pad, GstCaps *caps);
3363 public typedef extern(C) int function (GstPad*, GstCaps*) GstPadSetCapsFunction;
3366 * Given possibly unfixed caps caps, let pad use its default prefered
3367 * format to make a fixed caps. caps should be writable. By default this
3368 * function will pick the first value of any ranges or lists in the caps but
3369 * elements can override this function to perform other behaviour.
3370 * pad:
3371 * a GstPad
3372 * caps:
3373 * the GstCaps to fixate
3375 // void (*GstPadFixateCapsFunction) (GstPad *pad, GstCaps *caps);
3376 public typedef extern(C) void function (GstPad*, GstCaps*) GstPadFixateCapsFunction;
3379 * This function is called when the pad is activated during the element
3380 * READY to PAUSED state change. By default this function will call the
3381 * activate function that puts the pad in push mode but elements can
3382 * override this function to activate the pad in pull mode if they wish.
3383 * pad:
3384 * a GstPad
3385 * Returns:
3386 * TRUE if the pad could be activated.
3388 // gboolean (*GstPadActivateFunction) (GstPad *pad);
3389 public typedef extern(C) int function (GstPad*) GstPadActivateFunction;
3392 * The prototype of the push and pull activate functions.
3393 * pad:
3394 * a GstPad
3395 * active:
3396 * activate or deactivate the pad.
3397 * Returns:
3398 * TRUE if the pad could be activated or deactivated.
3400 // gboolean (*GstPadActivateModeFunction) (GstPad *pad, gboolean active);
3401 public typedef extern(C) int function (GstPad*, int) GstPadActivateModeFunction;
3404 * The signature of the query function.
3405 * pad:
3406 * the GstPad to query.
3407 * query:
3408 * the GstQuery object to execute
3409 * Returns:
3410 * TRUE if the query could be performed.
3412 // gboolean (*GstPadQueryFunction) (GstPad *pad, GstQuery *query);
3413 public typedef extern(C) int function (GstPad*, GstQuery*) GstPadQueryFunction;
3416 * The signature of the query types function.
3417 * pad:
3418 * a GstPad to query
3419 * Returns:
3420 * a constant array of query types
3422 // const GstQueryType* (*GstPadQueryTypeFunction) (GstPad *pad);
3423 public typedef extern(C) GstQueryType* function (GstPad*) GstPadQueryTypeFunction;
3426 * The signature of the internal pad link function.
3427 * pad:
3428 * The GstPad to query.
3429 * Returns:
3430 * a newly allocated GList of pads that are linked to the given pad on
3431 * the inside of the parent element.
3432 * The caller must call g_list_free() on it after use.
3434 // GList* (*GstPadIntLinkFunction) (GstPad *pad);
3435 public typedef extern(C) GList* function (GstPad*) GstPadIntLinkFunction;
3438 * A dispatcher function is called for all internally linked pads, see
3439 * gst_pad_dispatcher().
3440 * pad:
3441 * the GstPad that is dispatched.
3442 * data:
3443 * the gpointer to optional user data.
3444 * Returns:
3445 * TRUE if the dispatching procedure has to be stopped.
3447 // gboolean (*GstPadDispatcherFunction) (GstPad *pad, gpointer data);
3448 public typedef extern(C) int function (GstPad*, void*) GstPadDispatcherFunction;
3451 * A plugin should provide a pointer to a function of this type in the
3452 * plugin_desc struct.
3453 * This function will be called by the loader at startup.
3454 * plugin:
3455 * The plugin object that can be used to register GstPluginFeatures for this plugin.
3456 * Returns:
3457 * TRUE if plugin initialised successfully
3459 // gboolean (*GstPluginInitFunc) (GstPlugin *plugin);
3460 public typedef extern(C) int function (GstPlugin*) GstPluginInitFunc;
3463 * A function that can be used with e.g. gst_registry_plugin_filter()
3464 * to get a list of plugins that match certain criteria.
3465 * plugin:
3466 * the plugin to check
3467 * user_data:
3468 * the user_data that has been passed on e.g. gst_registry_plugin_filter()
3469 * Returns:
3470 * TRUE for a positive match, FALSE otherwise
3472 // gboolean (*GstPluginFilter) (GstPlugin *plugin, gpointer user_data);
3473 public typedef extern(C) int function (GstPlugin*, void*) GstPluginFilter;
3476 * A function that can be used with e.g. gst_registry_feature_filter()
3477 * to get a list of pluginfeature that match certain criteria.
3478 * feature:
3479 * the pluginfeature to check
3480 * user_data:
3481 * the user_data that has been passed on e.g.
3482 * gst_registry_feature_filter()
3483 * Returns:
3484 * TRUE for a positive match, FALSE otherwise
3486 // gboolean (*GstPluginFeatureFilter) (GstPluginFeature *feature, gpointer user_data);
3487 public typedef extern(C) int function (GstPluginFeature*, void*) GstPluginFeatureFilter;
3490 * A function that will be called in gst_structure_foreach(). The function may
3491 * not modify value.
3492 * field_id:
3493 * the GQuark of the field name
3494 * value:
3495 * the GValue of the field
3496 * user_data:
3497 * user data
3498 * Returns:
3499 * TRUE if the foreach operation should continue, FALSE if
3500 * the foreach operation should stop with FALSE.
3502 // gboolean (*GstStructureForeachFunc) (GQuark field_id, const GValue *value, gpointer user_data);
3503 public typedef extern(C) int function (GQuark, GValue*, void*) GstStructureForeachFunc;
3506 * A function that will be called in gst_structure_map_in_place(). The function
3507 * may modify value.
3508 * field_id:
3509 * the GQuark of the field name
3510 * value:
3511 * the GValue of the field
3512 * user_data:
3513 * user data
3514 * Returns:
3515 * TRUE if the map operation should continue, FALSE if
3516 * the map operation should stop with FALSE.
3518 // gboolean (*GstStructureMapFunc) (GQuark field_id, GValue *value, gpointer user_data);
3519 public typedef extern(C) int function (GQuark, GValue*, void*) GstStructureMapFunc;
3522 * A function that will be called in gst_tag_list_foreach(). The function may
3523 * not modify the tag list.
3524 * list:
3525 * the GstTagList
3526 * tag:
3527 * a name of a tag in list
3528 * user_data:
3529 * user data
3531 // void (*GstTagForeachFunc) (const GstTagList *list, const gchar *tag, gpointer user_data);
3532 public typedef extern(C) void function (GstTagList*, char[], void*) GstTagForeachFunc;
3535 * A function for merging multiple values of a tag used when registering
3536 * tags.
3537 * dest:
3538 * the destination GValue
3539 * src:
3540 * the source GValue
3542 // void (*GstTagMergeFunc) (GValue *dest, const GValue *src);
3543 public typedef extern(C) void function (GValue*, GValue*) GstTagMergeFunc;
3546 * A function that will repeadedly be called in the thread created by
3547 * a GstTask.
3548 * data:
3549 * user data passed to the function
3551 // void (*GstTaskFunction) (void *data);
3552 public typedef extern(C) void function (void*) GstTaskFunction;
3555 * A function that will be called by typefinding.
3556 * find:
3557 * A GstTypeFind structure
3558 * data:
3559 * optionnal data to pass to the function
3561 // void (*GstTypeFindFunction) (GstTypeFind *find, gpointer data);
3562 public typedef extern(C) void function (GstTypeFind*, void*) GstTypeFindFunction;