1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 module gstreamerc.gstreamertypes;
25 
26 public import gtkc.glibtypes;
27 public import gtkc.gthreadtypes;
28 public import gtkc.gobjecttypes;
29 /***** default padding of structures *****/
30 const long GST_PADDING = 4;
31 
32 /***** padding for very extensible base classes *****/
33 const long GST_PADDING_LARGE = 20;
34 
35 //These times might be clean to define as GstClockTimes instead of long (maybe):
36 
37 //#define G_USEC_PER_SEC 1000000 //This should be in glib...
38 const ulong G_USEC_PER_SEC = 1000000uL;
39 //#define GST_SECOND  (G_USEC_PER_SEC * G_GINT64_CONSTANT (1000))
40 const ulong GST_SECOND = (G_USEC_PER_SEC * 1000uL);
41 
42 public alias GST_SECOND SECOND;
43 
44 //This one is an undefined GstClockTime. How can this be ulong???
45 //I guess it should be long...???
46 //#define GST_CLOCK_TIME_NONE		((GstClockTime) -1)
47 const long GST_CLOCK_TIME_NONE = -1L;
48 public alias GST_CLOCK_TIME_NONE CLOCK_TIME_NONE;
49 align(1):
50 
51 alias void* GstXmlNodePtr;
52 alias void* xmlNodePtr;
53 
54 /**
55  * typedef guint64	GstClockTime;
56  * A datatype to hold a time, measured in nanoseconds.
57  */
58 public alias ulong GstClockTime;
59 
60 /**
61  * typedef gint64 GstClockTimeDiff;
62  * A datatype to hold a timedifference, measured in nanoseconds.
63  */
64 public alias long GstClockTimeDiff;
65 
66 /**
67  * typedef gpointer GstClockID;
68  * A datatype to hold the handle to an outstanding sync or async clock callback.
69  */
70 public alias void* GstClockID;
71 
72 /**
73  * typedef GstStructure GstTagList;
74  * Opaque GstTagList data structure.
75  */
76 public alias GstStructure GstTagList;
77 /**
78  * GstEventTypeFlags indicate the aspects of the different GstEventType
79  * values. You can get the type flags of a GstEventType with the
80  * gst_event_type_get_flags() function.
81  * GST_EVENT_TYPE_UPSTREAM
82  */
83 public enum GstEventTypeFlags
84 {
85 	UPSTREAM = 1 << 0,
86 	DOWNSTREAM = 1 << 1,
87 	SERIALIZED = 1 << 2,
88 }
89 alias GstEventTypeFlags EventTypeFlags;
90 
91 /**
92  * GstEventType lists the standard event types that can be sent in a pipeline.
93  * The custom event types can be used for private messages between elements
94  * that can't be expressed using normal
95  * GStreamer buffer passing semantics. Custom events carry an arbitrary
96  * GstStructure.
97  * Specific custom events are distinguished by the name of the structure.
98  * GST_EVENT_UNKNOWN
99  */
100 public enum GstEventType
101 {
102 	UNKNOWN = 0,
103 	/+* bidirectional events +/
104 	FLUSH_START = 16 | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM,
105 	FLUSH_STOP = 32 | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
106 	/+* downstream serialized events +/
107 	EOS = 80 | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
108 	NEWSEGMENT = 96 | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
109 	TAG = 112 | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
110 	BUFFERSIZE = 128 | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
111 	/+* upstream events +/
112 	QOS = 240 | GstEventTypeFlags.UPSTREAM,
113 	SEEK = 256 | GstEventTypeFlags.UPSTREAM,
114 	NAVIGATION = 272 | GstEventTypeFlags.UPSTREAM,
115 	/+* custom events start here +/
116 	CUSTOM_UPSTREAM = 512 | GstEventTypeFlags.UPSTREAM,
117 	CUSTOM_DOWNSTREAM = 512 | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
118 	CUSTOM_DOWNSTREAM_OOB = 512 | GstEventTypeFlags.DOWNSTREAM,
119 	CUSTOM_BOTH = 512 | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM | GstEventTypeFlags.SERIALIZED,
120 	CUSTOM_BOTH_OOB = 512 | GstEventTypeFlags.UPSTREAM | GstEventTypeFlags.DOWNSTREAM
121 }
122 alias GstEventType EventType;
123 
124 /**
125  * Flags for the padtemplate
126  * GST_MINI_OBJECT_FLAG_READONLY
127  *  is the miniobject readonly or writable
128  * GST_MINI_OBJECT_FLAG_LAST
129  *  first flag that can be used by subclasses.
130  */
131 public enum GstMiniObjectFlags
132 {
133 	READONLY = (1<<0),
134 	/+* padding +/
135 	LAST = (1<<4)
136 }
137 alias GstMiniObjectFlags MiniObjectFlags;
138 
139 /**
140  * The standard flags that an gstobject may have.
141  * GST_OBJECT_DISPOSING
142  *  the object is been destroyed, do use it anymore
143  * GST_OBJECT_FLOATING
144  *  the object has a floating reference count (e.g. its
145  *  not assigned to a bin)
146  * GST_OBJECT_FLAG_LAST
147  *  subclasses can add additional flags starting from this flag
148  */
149 public enum GstObjectFlags
150 {
151 	DISPOSING = (1<<0),
152 	FLOATING = (1<<1),
153 	/+* padding +/
154 	FLAG_LAST = (1<<4)
155 }
156 alias GstObjectFlags ObjectFlags;
157 
158 /**
159  * The standard flags that an element may have.
160  * GST_ELEMENT_LOCKED_STATE
161  *  ignore state changes from parent
162  * GST_ELEMENT_IS_SINK
163  *  the element is a sink
164  * GST_ELEMENT_UNPARENTING
165  *  Child is being removed from the parent bin.
166  *  gst_bin_remove() on a child already being removed immediately returns FALSE
167  * GST_ELEMENT_FLAG_LAST
168  *  offset to define more flags
169  */
170 public enum GstElementFlags
171 {
172 	LOCKED_STATE = (GstObjectFlags.FLAG_LAST << 0),
173 	IS_SINK = (GstObjectFlags.FLAG_LAST << 1),
174 	UNPARENTING = (GstObjectFlags.FLAG_LAST << 2),
175 	/+* padding +/
176 	FLAG_LAST = (GstObjectFlags.FLAG_LAST << 16)
177 }
178 alias GstElementFlags ElementFlags;
179 
180 /**
181  * The posible states an element can be in.
182  * GST_STATE_VOID_PENDING
183  *  no pending state.
184  * GST_STATE_NULL
185  *  the NULL state or initial state of an element
186  * GST_STATE_READY
187  *  the element is ready to go to PAUSED
188  * GST_STATE_PAUSED
189  *  the element is PAUSED
190  * GST_STATE_PLAYING
191  *  the element is PLAYING
192  */
193 public enum GstState
194 {
195 	VOID_PENDING = 0,
196 	NULL = 1,
197 	READY = 2,
198 	PAUSED = 3,
199 	PLAYING = 4
200 }
201 alias GstState State;
202 
203 /**
204  * The different (interesting) state changes that are passed to the
205  * state change functions of elements.
206  * GST_STATE_CHANGE_NULL_TO_READY
207  *  state change from NULL to READY
208  * GST_STATE_CHANGE_READY_TO_PAUSED
209  *  state change from READY to PAUSED
210  * GST_STATE_CHANGE_PAUSED_TO_PLAYING
211  *  state change from PAUSED to PLAYING
212  * GST_STATE_CHANGE_PLAYING_TO_PAUSED
213  *  state change from PLAYING to PAUSED
214  * GST_STATE_CHANGE_PAUSED_TO_READY
215  *  state change from PAUSED to READY
216  * GST_STATE_CHANGE_READY_TO_NULL
217  *  state change from READY to NULL
218  */
219 public enum GstStateChange
220 {
221 	NULL_TO_READY = (GstState.NULL << 3) | GstState.READY,
222 	READY_TO_PAUSED = (GstState.READY << 3) | GstState.PAUSED,
223 	PAUSED_TO_PLAYING = (GstState.PAUSED << 3) | GstState.PLAYING,
224 	PLAYING_TO_PAUSED = (GstState.PLAYING << 3) | GstState.PAUSED,
225 	PAUSED_TO_READY = (GstState.PAUSED << 3) | GstState.READY,
226 	READY_TO_NULL = (GstState.READY << 3) | GstState.NULL
227 }
228 alias GstStateChange StateChange;
229 
230 /**
231  * The possible return values from a state change function. Only
232  * GST_STATE_CHANGE_FAILURE is a real failure.
233  * GST_STATE_CHANGE_FAILURE
234  *  the state change failed
235  * GST_STATE_CHANGE_SUCCESS
236  *  the state change succeeded
237  * GST_STATE_CHANGE_ASYNC
238  *  the state change will happen asynchronously
239  * GST_STATE_CHANGE_NO_PREROLL
240  *  the state change succeeded but the element
241  *  cannot produce data in PAUSED. This typically
242  *  happens with live sources.
243  */
244 public enum GstStateChangeReturn
245 {
246 	FAILURE = 0,
247 	SUCCESS = 1,
248 	ASYNC = 2,
249 	NO_PREROLL = 3
250 }
251 alias GstStateChangeReturn StateChangeReturn;
252 
253 /**
254  * GstBinFlags are a set of flags specific to bins. Most are set/used
255  * internally. They can be checked using the GST_OBJECT_FLAG_IS_SET() macro,
256  * and (un)set using GST_OBJECT_FLAG_SET() and GST_OBJECT_FLAG_UNSET().
257  * GST_BIN_FLAG_LAST
258  *  the last enum in the series of flags for bins.
259  * Derived classes can use this as first value in a list of flags.
260  */
261 public enum GstBinFlags
262 {
263 	/+* padding +/
264 	FLAG_LAST = (GstElementFlags.FLAG_LAST << 5)
265 }
266 alias GstBinFlags BinFlags;
267 
268 /**
269  * A set of buffer flags used to describe properties of a GstBuffer.
270  * GST_BUFFER_FLAG_READONLY
271  *  the buffer is read-only. This means the data of
272  * the buffer should not be modified. The metadata might still be modified.
273  * GST_BUFFER_FLAG_PREROLL
274  *  the buffer is part of a preroll and should not be
275  * displayed.
276  * GST_BUFFER_FLAG_DISCONT
277  *  the buffer marks a discontinuity in the stream.
278  * This typically occurs after a seek or a dropped buffer from a live or
279  * network source.
280  * GST_BUFFER_FLAG_IN_CAPS
281  *  the buffer has been added as a field in a GstCaps.
282  * GST_BUFFER_FLAG_GAP
283  *  the buffer has been created to fill a gap in the
284  * stream.
285  * GST_BUFFER_FLAG_DELTA_UNIT
286  *  this unit cannot be decoded independently.
287  * GST_BUFFER_FLAG_LAST
288  *  additional flags can be added starting from this flag.
289  */
290 public enum GstBufferFlag
291 {
292 	FLAG_READONLY = GstMiniObjectFlags.READONLY,
293 	FLAG_PREROLL = (GstMiniObjectFlags.LAST << 0),
294 	FLAG_DISCONT = (GstMiniObjectFlags.LAST << 1),
295 	FLAG_IN_CAPS = (GstMiniObjectFlags.LAST << 2),
296 	FLAG_GAP = (GstMiniObjectFlags.LAST << 3),
297 	FLAG_DELTA_UNIT = (GstMiniObjectFlags.LAST << 4),
298 	/+* padding +/
299 	FLAG_LAST = (GstMiniObjectFlags.LAST << 8)
300 }
301 alias GstBufferFlag BufferFlag;
302 
303 /**
304  * A set of flags that can be provided to the gst_buffer_copy_metadata()
305  * function to specify which metadata fields should be copied.
306  * GST_BUFFER_COPY_FLAGS
307  *  flag indicating that buffer flags should be copied
308  * GST_BUFFER_COPY_TIMESTAMPS
309  *  flag indicating that buffer timestamp, duration,
310  * offset and offset_end should be copied
311  * GST_BUFFER_COPY_CAPS
312  *  flag indicating that buffer caps should be copied
313  * Since 0.10.13
314  */
315 public enum GstBufferCopyFlags
316 {
317 	FLAGS = (1 << 0),
318 	TIMESTAMPS = (1 << 1),
319 	CAPS = (1 << 2),
320 }
321 alias GstBufferCopyFlags BufferCopyFlags;
322 
323 /**
324  * The standard flags that a bus may have.
325  * GST_BUS_FLUSHING
326  *  The bus is currently dropping all messages
327  * GST_BUS_FLAG_LAST
328  *  offset to define more flags
329  */
330 public enum GstBusFlags
331 {
332 	FLUSHING = (GstObjectFlags.FLAG_LAST << 0),
333 	/+* padding +/
334 	FLAG_LAST = (GstObjectFlags.FLAG_LAST << 1)
335 }
336 alias GstBusFlags BusFlags;
337 
338 /**
339  * The result values for a GstBusSyncHandler.
340  * GST_BUS_DROP
341  *  drop the message
342  * GST_BUS_PASS
343  *  pass the message to the async queue
344  * GST_BUS_ASYNC
345  *  pass message to async queue, continue if message is handled
346  */
347 public enum GstBusSyncReply
348 {
349 	DROP = 0,
350 	PASS = 1,
351 	ASYNC = 2
352 }
353 alias GstBusSyncReply BusSyncReply;
354 
355 /**
356  * Extra flags for a caps.
357  * GST_CAPS_FLAGS_ANY
358  *  Caps has no specific content, but can contain
359  *  anything.
360  */
361 public enum GstCapsFlags
362 {
363 	ANY = (1 << 0)
364 }
365 alias GstCapsFlags CapsFlags;
366 
367 /**
368  * The type of the clock entry
369  * GST_CLOCK_ENTRY_SINGLE
370  *  a single shot timeout
371  * GST_CLOCK_ENTRY_PERIODIC
372  *  a periodic timeout request
373  */
374 public enum GstClockEntryType
375 {
376 	SINGLE,
377 	PERIODIC
378 }
379 alias GstClockEntryType ClockEntryType;
380 
381 /**
382  * The return value of a clock operation.
383  * GST_CLOCK_OK
384  *  The operation succeded.
385  * GST_CLOCK_EARLY
386  *  The operation was scheduled too late.
387  * GST_CLOCK_UNSCHEDULED
388  *  The clockID was unscheduled
389  * GST_CLOCK_BUSY
390  *  The ClockID is busy
391  * GST_CLOCK_BADTIME
392  *  A bad time was provided to a function.
393  * GST_CLOCK_ERROR
394  *  An error occured
395  * GST_CLOCK_UNSUPPORTED
396  *  Operation is not supported
397  */
398 public enum GstClockReturn
399 {
400 	OK = 0,
401 	EARLY = 1,
402 	UNSCHEDULED = 2,
403 	BUSY = 3,
404 	BADTIME = 4,
405 	ERROR = 5,
406 	UNSUPPORTED = 6
407 }
408 alias GstClockReturn ClockReturn;
409 
410 /**
411  * The capabilities of this clock
412  * GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC
413  *  clock can do a single sync timeout request
414  * GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC
415  *  clock can do a single async timeout request
416  * GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC
417  *  clock can do sync periodic timeout requests
418  * GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC
419  *  clock can do async periodic timeout callbacks
420  * GST_CLOCK_FLAG_CAN_SET_RESOLUTION
421  *  clock's resolution can be changed
422  * GST_CLOCK_FLAG_CAN_SET_MASTER
423  *  clock can be slaved to a master clock
424  * GST_CLOCK_FLAG_LAST
425  *  subclasses can add additional flags starting from this flag
426  */
427 public enum GstClockFlags
428 {
429 	CAN_DO_SINGLE_SYNC = (GstObjectFlags.FLAG_LAST << 0),
430 	CAN_DO_SINGLE_ASYNC = (GstObjectFlags.FLAG_LAST << 1),
431 	CAN_DO_PERIODIC_SYNC = (GstObjectFlags.FLAG_LAST << 2),
432 	CAN_DO_PERIODIC_ASYNC = (GstObjectFlags.FLAG_LAST << 3),
433 	CAN_SET_RESOLUTION = (GstObjectFlags.FLAG_LAST << 4),
434 	CAN_SET_MASTER = (GstObjectFlags.FLAG_LAST << 5),
435 	/+* padding +/
436 	LAST = (GstObjectFlags.FLAG_LAST << 8)
437 }
438 alias GstClockFlags ClockFlags;
439 
440 /**
441  * The different types of seek events. When constructing a seek event with
442  * gst_event_new_seek(), a format, a seek method and optional flags are to
443  * be provided. The seek event is then inserted into the graph with
444  * gst_pad_send_event() or gst_element_send_event().
445  * GST_SEEK_TYPE_NONE
446  *  no change in position is required
447  * GST_SEEK_TYPE_CUR
448  *  change relative to current position
449  * GST_SEEK_TYPE_SET
450  *  absolute position is requested
451  * GST_SEEK_TYPE_END
452  *  relative position to duration is requested
453  */
454 public enum GstSeekType
455 {
456 	/+* one of these +/
457 	NONE = 0,
458 	CUR = 1,
459 	SET = 2,
460 	END = 3
461 }
462 alias GstSeekType SeekType;
463 
464 /**
465  * Flags to be used with gst_element_seek() or gst_event_new_seek(). All flags
466  * can be used together.
467  * A non flushing seek might take some time to perform as the currently
468  * playing data in the pipeline will not be cleared.
469  * An accurate seek might be slower for formats that don't have any indexes
470  * or timestamp markers in the stream. Specifying this flag might require a
471  * complete scan of the file in those cases.
472  * When performing a segment seek: after the playback of the segment completes,
473  * no EOS will be emmited by the element that performed the seek, but a
474  * GST_MESSAGE_SEGMENT_DONE message will be posted on the bus by the element.
475  * When this message is posted, it is possible to send a new seek event to
476  * continue playback. With this seek method it is possible to perform seemless
477  * looping or simple linear editing.
478  * GST_SEEK_FLAG_NONE
479  *  no flag
480  * GST_SEEK_FLAG_FLUSH
481  *  flush pipeline
482  * GST_SEEK_FLAG_ACCURATE
483  *  accurate position is requested, this might
484  *  be considerably slower for some formats.
485  * GST_SEEK_FLAG_KEY_UNIT
486  *  seek to the nearest keyframe. This might be
487  * 	 faster but less accurate.
488  * GST_SEEK_FLAG_SEGMENT
489  *  perform a segment seek.
490  */
491 public enum GstSeekFlags
492 {
493 	NONE = 0,
494 	FLUSH = (1 << 0),
495 	ACCURATE = (1 << 1),
496 	KEY_UNIT = (1 << 2),
497 	SEGMENT = (1 << 3)
498 }
499 alias GstSeekFlags SeekFlags;
500 
501 /**
502  * Standard predefined formats
503  * GST_FORMAT_UNDEFINED
504  *  undefined format
505  * GST_FORMAT_DEFAULT
506  *  the default format of the pad/element. This can be
507  *  samples for raw audio, frames/fields for raw video.
508  * GST_FORMAT_BYTES
509  *  bytes
510  * GST_FORMAT_TIME
511  *  time in nanoseconds
512  * GST_FORMAT_BUFFERS
513  *  buffers
514  * GST_FORMAT_PERCENT
515  *  percentage of stream
516  */
517 public enum GstFormat
518 {
519 	UNDEFINED = 0, /+* must be first inn list +/
520 	DEFAULT = 1,
521 	BYTES = 2,
522 	TIME = 3,
523 	BUFFERS = 4,
524 	PERCENT = 5
525 }
526 alias GstFormat Format;
527 
528 /**
529  * Core errors are errors inside the core GStreamer library.
530  * GST_CORE_ERROR_FAILED
531  *  a general error which doesn't fit in any other
532  * category. Make sure you add a custom message to the error call.
533  * GST_CORE_ERROR_TOO_LAZY
534  *  do not use this except as a placeholder for
535  * deciding where to go while developing code.
536  * GST_CORE_ERROR_NOT_IMPLEMENTED
537  *  use this when you do not want to implement
538  * this functionality yet.
539  * GST_CORE_ERROR_STATE_CHANGE
540  *  used for state change errors.
541  * GST_CORE_ERROR_PAD
542  *  used for pad-related errors.
543  * GST_CORE_ERROR_THREAD
544  *  used for thread-related errors.
545  * GST_CORE_ERROR_NEGOTIATION
546  *  used for negotiation-related errors.
547  * GST_CORE_ERROR_EVENT
548  *  used for event-related errors.
549  * GST_CORE_ERROR_SEEK
550  *  used for seek-related errors.
551  * GST_CORE_ERROR_CAPS
552  *  used for caps-related errors.
553  * GST_CORE_ERROR_TAG
554  *  used for negotiation-related errors.
555  * GST_CORE_ERROR_MISSING_PLUGIN
556  *  used if a plugin is missing.
557  * GST_CORE_ERROR_CLOCK
558  *  used for clock related errors.
559  * GST_CORE_ERROR_DISABLED
560  *  used if functionality has been disabled at
561  *  compile time (Since: 0.10.13).
562  * GST_CORE_ERROR_NUM_ERRORS
563  *  the number of core error types.
564  */
565 public enum GstCoreError
566 {
567 	FAILED = 1,
568 	TOO_LAZY,
569 	NOT_IMPLEMENTED,
570 	STATE_CHANGE,
571 	PAD,
572 	THREAD,
573 	NEGOTIATION,
574 	EVENT,
575 	SEEK,
576 	CAPS,
577 	TAG,
578 	MISSING_PLUGIN,
579 	CLOCK,
580 	DISABLED,
581 	NUM_ERRORS
582 }
583 alias GstCoreError CoreError;
584 
585 /**
586  * Library errors are for errors from the library being used by elements
587  * (initializing, finalizing, settings, ...)
588  * GST_LIBRARY_ERROR_FAILED
589  *  a general error which doesn't fit in any other
590  * category. Make sure you add a custom message to the error call.
591  * GST_LIBRARY_ERROR_TOO_LAZY
592  *  do not use this except as a placeholder for
593  * deciding where to go while developing code.
594  * GST_LIBRARY_ERROR_INIT
595  *  used when the library could not be opened.
596  * GST_LIBRARY_ERROR_SHUTDOWN
597  *  used when the library could not be closed.
598  * GST_LIBRARY_ERROR_SETTINGS
599  *  used when the library doesn't accept settings.
600  * GST_LIBRARY_ERROR_ENCODE
601  *  used when the library generated an encoding error.
602  * GST_LIBRARY_ERROR_NUM_ERRORS
603  *  the number of library error types.
604  */
605 public enum GstLibraryError
606 {
607 	FAILED = 1,
608 	TOO_LAZY,
609 	INIT,
610 	SHUTDOWN,
611 	SETTINGS,
612 	ENCODE,
613 	NUM_ERRORS
614 }
615 alias GstLibraryError LibraryError;
616 
617 /**
618  * Resource errors are for any resource used by an element:
619  * memory, files, network connections, process space, ...
620  * They're typically used by source and sink elements.
621  * GST_RESOURCE_ERROR_FAILED
622  *  a general error which doesn't fit in any other
623  * category. Make sure you add a custom message to the error call.
624  * GST_RESOURCE_ERROR_TOO_LAZY
625  *  do not use this except as a placeholder for
626  * deciding where to go while developing code.
627  * GST_RESOURCE_ERROR_NOT_FOUND
628  *  used when the resource could not be found.
629  * GST_RESOURCE_ERROR_BUSY
630  *  used when resource is busy.
631  * GST_RESOURCE_ERROR_OPEN_READ
632  *  used when resource fails to open for reading.
633  * GST_RESOURCE_ERROR_OPEN_WRITE
634  *  used when resource fails to open for writing.
635  * GST_RESOURCE_ERROR_OPEN_READ_WRITE
636  *  used when resource cannot be opened for
637  * both reading and writing, or either (but unspecified which).
638  * GST_RESOURCE_ERROR_CLOSE
639  *  used when the resource can't be closed.
640  * GST_RESOURCE_ERROR_READ
641  *  used when the resource can't be read from.
642  * GST_RESOURCE_ERROR_WRITE
643  *  used when the resource can't be written to.
644  * GST_RESOURCE_ERROR_SEEK
645  *  used when a seek on the resource fails.
646  * GST_RESOURCE_ERROR_SYNC
647  *  used when a synchronize on the resource fails.
648  * GST_RESOURCE_ERROR_SETTINGS
649  *  used when settings can't be manipulated on.
650  * GST_RESOURCE_ERROR_NO_SPACE_LEFT
651  *  used when the resource has no space left.
652  * GST_RESOURCE_ERROR_NUM_ERRORS
653  *  the number of resource error types.
654  */
655 public enum GstResourceError
656 {
657 	FAILED = 1,
658 	TOO_LAZY,
659 	NOT_FOUND,
660 	BUSY,
661 	OPEN_READ,
662 	OPEN_WRITE,
663 	OPEN_READ_WRITE,
664 	CLOSE,
665 	READ,
666 	WRITE,
667 	SEEK,
668 	SYNC,
669 	SETTINGS,
670 	NO_SPACE_LEFT,
671 	NUM_ERRORS
672 }
673 alias GstResourceError ResourceError;
674 
675 /**
676  * Stream errors are for anything related to the stream being processed:
677  * format errors, media type errors, ...
678  * They're typically used by decoders, demuxers, converters, ...
679  * GST_STREAM_ERROR_FAILED
680  *  a general error which doesn't fit in any other
681  * category. Make sure you add a custom message to the error call.
682  * GST_STREAM_ERROR_TOO_LAZY
683  *  do not use this except as a placeholder for
684  * deciding where to go while developing code.
685  * GST_STREAM_ERROR_NOT_IMPLEMENTED
686  *  use this when you do not want to implement
687  * this functionality yet.
688  * GST_STREAM_ERROR_TYPE_NOT_FOUND
689  *  used when the element doesn't know the
690  * stream's type.
691  * GST_STREAM_ERROR_WRONG_TYPE
692  *  used when the element doesn't handle this type
693  * of stream.
694  * GST_STREAM_ERROR_CODEC_NOT_FOUND
695  *  used when there's no codec to handle the
696  * stream's type.
697  * GST_STREAM_ERROR_DECODE
698  *  used when decoding fails.
699  * GST_STREAM_ERROR_ENCODE
700  *  used when encoding fails.
701  * GST_STREAM_ERROR_DEMUX
702  *  used when demuxing fails.
703  * GST_STREAM_ERROR_MUX
704  *  used when muxing fails.
705  * GST_STREAM_ERROR_FORMAT
706  *  used when the stream is of the wrong format
707  * (for example, wrong caps).
708  * GST_STREAM_ERROR_NUM_ERRORS
709  *  the number of stream error types.
710  */
711 public enum GstStreamError
712 {
713 	FAILED = 1,
714 	TOO_LAZY,
715 	NOT_IMPLEMENTED,
716 	TYPE_NOT_FOUND,
717 	WRONG_TYPE,
718 	CODEC_NOT_FOUND,
719 	DECODE,
720 	ENCODE,
721 	DEMUX,
722 	MUX,
723 	FORMAT,
724 	NUM_ERRORS
725 }
726 alias GstStreamError StreamError;
727 
728 /**
729  * The certainty of a group in the index.
730  * GST_INDEX_UNKNOWN
731  *  accuracy is not known
732  * GST_INDEX_CERTAIN
733  *  accuracy is perfect
734  * GST_INDEX_FUZZY
735  *  accuracy is fuzzy
736  */
737 public enum GstIndexCertainty
738 {
739 	UNKNOWN,
740 	CERTAIN,
741 	FUZZY
742 }
743 alias GstIndexCertainty IndexCertainty;
744 
745 /**
746  * The different types of entries in the index.
747  * GST_INDEX_ENTRY_ID
748  *  This entry is an id that maps an index id to its owner object
749  * GST_INDEX_ENTRY_ASSOCIATION
750  *  This entry is an association between formats
751  * GST_INDEX_ENTRY_OBJECT
752  *  An object
753  * GST_INDEX_ENTRY_FORMAT
754  *  A format definition
755  */
756 public enum GstIndexEntryType
757 {
758 	ID,
759 	ASSOCIATION,
760 	OBJECT,
761 	FORMAT
762 }
763 alias GstIndexEntryType IndexEntryType;
764 
765 /**
766  * Specify the method to find an index entry in the index.
767  * GST_INDEX_LOOKUP_EXACT
768  *  There has to be an exact indexentry with the given format/value
769  * GST_INDEX_LOOKUP_BEFORE
770  *  The exact entry or the one before it
771  * GST_INDEX_LOOKUP_AFTER
772  *  The exact entry or the one after it
773  */
774 public enum GstIndexLookupMethod
775 {
776 	EXACT,
777 	BEFORE,
778 	AFTER
779 }
780 alias GstIndexLookupMethod IndexLookupMethod;
781 
782 /**
783  * Flags for an association entry.
784  * GST_ASSOCIATION_FLAG_NONE
785  *  no extra flags
786  * GST_ASSOCIATION_FLAG_KEY_UNIT
787  *  the entry marks a key unit, a key unit is one
788  *  that marks a place where one can randomly seek to.
789  * GST_ASSOCIATION_FLAG_DELTA_UNIT
790  *  the entry marks a delta unit, a delta unit
791  *  is one that marks a place where one can relatively seek to.
792  * GST_ASSOCIATION_FLAG_LAST
793  *  extra user defined flags should start here.
794  */
795 public enum GstAssocFlags
796 {
797 	ASSOCIATION_FLAG_NONE = 0,
798 	ASSOCIATION_FLAG_KEY_UNIT = (1 << 0),
799 	ASSOCIATION_FLAG_DELTA_UNIT = (1 << 1),
800 	/+* new flags should start here +/
801 	ASSOCIATION_FLAG_LAST = (1 << 8)
802 }
803 alias GstAssocFlags AssocFlags;
804 
805 /**
806  * The method used to resolve index writers
807  * GST_INDEX_RESOLVER_CUSTOM
808  *  Use a custom resolver
809  * GST_INDEX_RESOLVER_GTYPE
810  *  Resolve based on the GType of the object
811  * GST_INDEX_RESOLVER_PATH
812  *  Resolve on the path in graph
813  */
814 public enum GstIndexResolverMethod
815 {
816 	CUSTOM,
817 	GTYPE,
818 	PATH
819 }
820 alias GstIndexResolverMethod IndexResolverMethod;
821 
822 /**
823  * Flags for this index
824  * GST_INDEX_WRITABLE
825  *  The index is writable
826  * GST_INDEX_READABLE
827  *  The index is readable
828  * GST_INDEX_FLAG_LAST
829  *  First flag that can be used by subclasses
830  */
831 public enum GstIndexFlags
832 {
833 	WRITABLE = (GstObjectFlags.FLAG_LAST << 0),
834 	READABLE = (GstObjectFlags.FLAG_LAST << 1),
835 	FLAG_LAST = (GstObjectFlags.FLAG_LAST << 8)
836 }
837 alias GstIndexFlags IndexFlags;
838 
839 /**
840  * The result of a GstIteratorItemFunction.
841  * GST_ITERATOR_ITEM_SKIP
842  *  Skip this item
843  * GST_ITERATOR_ITEM_PASS
844  *  Return item
845  * GST_ITERATOR_ITEM_END
846  *  Stop after this item.
847  */
848 public enum GstIteratorItem
849 {
850 	SKIP = 0,
851 	PASS = 1,
852 	END = 2
853 }
854 alias GstIteratorItem IteratorItem;
855 
856 /**
857  * The result of gst_iterator_next().
858  * GST_ITERATOR_DONE
859  *  No more items in the iterator
860  * GST_ITERATOR_OK
861  *  An item was retrieved
862  * GST_ITERATOR_RESYNC
863  *  Datastructure changed while iterating
864  * GST_ITERATOR_ERROR
865  *  An error happened
866  */
867 public enum GstIteratorResult
868 {
869 	DONE = 0,
870 	OK = 1,
871 	RESYNC = 2,
872 	ERROR = 3
873 }
874 alias GstIteratorResult IteratorResult;
875 
876 /**
877  * The direction of a pad.
878  * GST_PAD_UNKNOWN
879  *  direction is unknown.
880  * GST_PAD_SRC
881  *  the pad is a source pad.
882  * GST_PAD_SINK
883  *  the pad is a sink pad.
884  */
885 public enum GstPadDirection
886 {
887 	UNKNOWN,
888 	SRC,
889 	SINK
890 }
891 alias GstPadDirection PadDirection;
892 
893 /**
894  * Pad state flags
895  * GST_PAD_BLOCKED
896  *  is dataflow on a pad blocked
897  * GST_PAD_FLUSHING
898  *  is pad refusing buffers
899  * GST_PAD_IN_GETCAPS
900  *  GstPadGetCapsFunction() is running now
901  * GST_PAD_IN_SETCAPS
902  *  GstPadSetCapsFunction() is running now
903  * GST_PAD_BLOCKING
904  *  is pad currently blocking on a buffer or event
905  * GST_PAD_FLAG_LAST
906  *  offset to define more flags
907  */
908 public enum GstPadFlags
909 {
910 	BLOCKED = (GstObjectFlags.FLAG_LAST << 0),
911 	FLUSHING = (GstObjectFlags.FLAG_LAST << 1),
912 	IN_GETCAPS = (GstObjectFlags.FLAG_LAST << 2),
913 	IN_SETCAPS = (GstObjectFlags.FLAG_LAST << 3),
914 	BLOCKING = (GstObjectFlags.FLAG_LAST << 4),
915 	/+* padding +/
916 	FLAG_LAST = (GstObjectFlags.FLAG_LAST << 8)
917 }
918 alias GstPadFlags PadFlags;
919 
920 /**
921  * Result values from gst_pad_link and friends.
922  * GST_PAD_LINK_OK
923  *  link succeeded
924  * GST_PAD_LINK_WRONG_HIERARCHY
925  *  pads have no common grandparent
926  * GST_PAD_LINK_WAS_LINKED
927  *  pad was already linked
928  * GST_PAD_LINK_WRONG_DIRECTION
929  *  pads have wrong direction
930  * GST_PAD_LINK_NOFORMAT
931  *  pads do not have common format
932  * GST_PAD_LINK_NOSCHED
933  *  pads cannot cooperate in scheduling
934  * GST_PAD_LINK_REFUSED
935  *  refused for some reason
936  */
937 public enum GstPadLinkReturn
938 {
939 	OK = 0,
940 	WRONG_HIERARCHY = -1,
941 	WAS_LINKED = -2,
942 	WRONG_DIRECTION = -3,
943 	NOFORMAT = -4,
944 	NOSCHED = -5,
945 	REFUSED = -6
946 }
947 alias GstPadLinkReturn PadLinkReturn;
948 
949 /**
950  * The result of passing data to a pad.
951  * Note that the custom return values should not be exposed outside of the
952  * element scope and are available since 0.10.7.
953  * GST_FLOW_CUSTOM_SUCCESS
954  * 	 Elements can use values starting from
955  *  this to define custom success codes.
956  *  Since 0.10.7.
957  * GST_FLOW_RESEND
958  * 		 Resend buffer, possibly with new caps (not
959  *  send yet).
960  * GST_FLOW_OK
961  * 		 Data passing was ok.
962  * GST_FLOW_NOT_LINKED
963  * 	 Pad is not linked.
964  * GST_FLOW_WRONG_STATE
965  * 	 Pad is in wrong state.
966  * GST_FLOW_UNEXPECTED
967  * 	 Did not expect anything, like after EOS.
968  * GST_FLOW_NOT_NEGOTIATED
969  * 	 Pad is not negotiated.
970  * GST_FLOW_ERROR
971  * 		 Some (fatal) error occured. Element generating
972  *  this error should post an error message with more
973  *  details.
974  * GST_FLOW_NOT_SUPPORTED
975  * 	 This operation is not supported.
976  * GST_FLOW_CUSTOM_ERROR
977  * 	 Elements can use values starting from
978  *  this to define custom error codes. Since 0.10.7.
979  */
980 public enum GstFlowReturn
981 {
982 	/+* custom success starts here +/
983 	CUSTOM_SUCCESS = 100,
984 	/+* core predefined +/
985 	RESEND = 1,
986 	OK = 0,
987 	/+* expected failures +/
988 	NOT_LINKED = -1,
989 	WRONG_STATE = -2,
990 	/+* error cases +/
991 	UNEXPECTED = -3,
992 	NOT_NEGOTIATED = -4,
993 	ERROR = -5,
994 	NOT_SUPPORTED = -6,
995 	/+* custom error starts here +/
996 	CUSTOM_ERROR = -100
997 }
998 alias GstFlowReturn FlowReturn;
999 
1000 /**
1001  * The status of a GstPad. After activating a pad, which usually happens when the
1002  * parent element goes from READY to PAUSED, the GstActivateMode defines if the
1003  * pad operates in push or pull mode.
1004  * GST_ACTIVATE_NONE
1005  * 	 	 Pad will not handle dataflow
1006  * GST_ACTIVATE_PUSH
1007  * 		 Pad handles dataflow in downstream push mode
1008  * GST_ACTIVATE_PULL
1009  *  	 Pad handles dataflow in upstream pull mode
1010  */
1011 public enum GstActivateMode
1012 {
1013 	NONE,
1014 	PUSH,
1015 	PULL
1016 }
1017 alias GstActivateMode ActivateMode;
1018 
1019 /**
1020  * The different message types that are available.
1021  * GST_MESSAGE_UNKNOWN
1022  *  an undefined message
1023  * GST_MESSAGE_EOS
1024  *  end-of-stream reached in a pipeline. The application will
1025  * only receive this message in the PLAYING state and every time it sets a
1026  * pipeline to PLAYING that is in the EOS state. The application can perform a
1027  * seek in the pipeline to a new position.
1028  * GST_MESSAGE_ERROR
1029  *  an error occured. Whe the application receives an error
1030  * message it should stop playback of the pipeline and not assume that more
1031  * data will be played.
1032  * GST_MESSAGE_WARNING
1033  *  a warning occured.
1034  * GST_MESSAGE_INFO
1035  *  an info message occured
1036  * GST_MESSAGE_TAG
1037  *  a tag was found.
1038  * GST_MESSAGE_BUFFERING
1039  *  the pipeline is buffering. When the application
1040  * receives a buffering message in the PLAYING state for a non-live pipeline it
1041  * must PAUSE the pipeline until the buffering completes, when the percentage
1042  * field in the message is 100%. For live pipelines, no action must be
1043  * performed and the buffering percentage can be used to infor the user about
1044  * the progress.
1045  * GST_MESSAGE_STATE_CHANGED
1046  *  a state change happened
1047  * GST_MESSAGE_STATE_DIRTY
1048  *  an element changed state in a streaming thread.
1049  * This message is deprecated.
1050  * GST_MESSAGE_STEP_DONE
1051  *  a framestep finished. This message is not yet
1052  * implemented.
1053  * GST_MESSAGE_CLOCK_PROVIDE
1054  *  an element notifies its capability of providing
1055  *  a clock.
1056  * GST_MESSAGE_CLOCK_LOST
1057  *  The current clock as selected by the pipeline became
1058  *  unusable. The pipeline will select a new clock on
1059  *  the next PLAYING state change.
1060  * GST_MESSAGE_NEW_CLOCK
1061  *  a new clock was selected in the pipeline.
1062  * GST_MESSAGE_STRUCTURE_CHANGE
1063  *  the structure of the pipeline changed.
1064  * GST_MESSAGE_STREAM_STATUS
1065  *  status about a stream, emitted when it starts,
1066  *  stops, errors, etc..
1067  * GST_MESSAGE_APPLICATION
1068  *  message posted by the application, possibly
1069  *  via an application-specific element.
1070  * GST_MESSAGE_ELEMENT
1071  *  element-specific message, see the specific element's
1072  *  documentation
1073  * GST_MESSAGE_SEGMENT_START
1074  *  pipeline started playback of a segment.
1075  * GST_MESSAGE_SEGMENT_DONE
1076  *  pipeline completed playback of a segment.
1077  * GST_MESSAGE_DURATION
1078  *  The duration of a pipeline changed.
1079  * GST_MESSAGE_LATENCY
1080  *  Posted by elements when their latency changes. The
1081  * pipeline will calculate and distribute a new latency. Since: 0.10.12
1082  * GST_MESSAGE_ASYNC_START
1083  *  Posted by elements when they start an ASYNC state
1084  * change. Since: 0.10.13
1085  * GST_MESSAGE_ASYNC_DONE
1086  *  Posted by elements when they complete an ASYNC state
1087  * change. Since: 0.10.13
1088  * GST_MESSAGE_ANY
1089  *  mask for all of the above messages.
1090  */
1091 public enum GstMessageType
1092 {
1093 	UNKNOWN = 0,
1094 	EOS = (1 << 0),
1095 	ERROR = (1 << 1),
1096 	WARNING = (1 << 2),
1097 	INFO = (1 << 3),
1098 	TAG = (1 << 4),
1099 	BUFFERING = (1 << 5),
1100 	STATE_CHANGED = (1 << 6),
1101 	STATE_DIRTY = (1 << 7),
1102 	STEP_DONE = (1 << 8),
1103 	CLOCK_PROVIDE = (1 << 9),
1104 	CLOCK_LOST = (1 << 10),
1105 	NEW_CLOCK = (1 << 11),
1106 	STRUCTURE_CHANGE = (1 << 12),
1107 	STREAM_STATUS = (1 << 13),
1108 	APPLICATION = (1 << 14),
1109 	ELEMENT = (1 << 15),
1110 	SEGMENT_START = (1 << 16),
1111 	SEGMENT_DONE = (1 << 17),
1112 	DURATION = (1 << 18),
1113 	LATENCY = (1 << 19),
1114 	ASYNC_START = (1 << 20),
1115 	ASYNC_DONE = (1 << 21),
1116 	ANY = ~0
1117 }
1118 alias GstMessageType MessageType;
1119 
1120 /**
1121  * Flags for the padtemplate
1122  * GST_PAD_TEMPLATE_FIXED
1123  *  the padtemplate has no variable properties
1124  * GST_PAD_TEMPLATE_FLAG_LAST
1125  *  first flag that can be used by subclasses.
1126  */
1127 public enum GstPadTemplateFlags
1128 {
1129 	FIXED = (GstObjectFlags.FLAG_LAST << 0),
1130 	/+* padding +/
1131 	FLAG_LAST = (GstObjectFlags.FLAG_LAST << 4)
1132 }
1133 alias GstPadTemplateFlags PadTemplateFlags;
1134 
1135 /**
1136  * Indicates when this pad will become available.
1137  * GST_PAD_ALWAYS
1138  *  the pad is always available
1139  * GST_PAD_SOMETIMES
1140  *  the pad will become available depending on the media stream
1141  * GST_PAD_REQUEST
1142  *  the pad is only available on request with
1143  *  gst_element_request_pad_by_name() or gst_element_request_compatible_pad().
1144  */
1145 public enum GstPadPresence
1146 {
1147 	ALWAYS,
1148 	SOMETIMES,
1149 	REQUEST
1150 }
1151 alias GstPadPresence PadPresence;
1152 
1153 /**
1154  * The different parsing errors that can occur.
1155  * GST_PARSE_ERROR_SYNTAX
1156  *  A syntax error occured.
1157  * GST_PARSE_ERROR_NO_SUCH_ELEMENT
1158  *  The description contained an unknown element
1159  * GST_PARSE_ERROR_NO_SUCH_PROPERTY
1160  *  An element did not have a specified property
1161  * GST_PARSE_ERROR_LINK
1162  *  There was an error linking two pads.
1163  * GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY
1164  *  There was an error setting a property
1165  * GST_PARSE_ERROR_EMPTY_BIN
1166  *  An empty bin was specified.
1167  * GST_PARSE_ERROR_EMPTY
1168  *  An empty description was specified
1169  */
1170 public enum GstParseError
1171 {
1172 	SYNTAX,
1173 	NO_SUCH_ELEMENT,
1174 	NO_SUCH_PROPERTY,
1175 	LINK,
1176 	COULD_NOT_SET_PROPERTY,
1177 	EMPTY_BIN,
1178 	EMPTY
1179 }
1180 alias GstParseError ParseError;
1181 
1182 /**
1183  * Pipeline flags
1184  * GST_PIPELINE_FLAG_FIXED_CLOCK
1185  *  this pipeline works with a fixed clock
1186  * GST_PIPELINE_FLAG_LAST
1187  *  offset to define more flags
1188  */
1189 public enum GstPipelineFlags
1190 {
1191 	FIXED_CLOCK = (GstBinFlags.FLAG_LAST << 0),
1192 	/+* padding +/
1193 	LAST = (GstBinFlags.FLAG_LAST << 4)
1194 }
1195 alias GstPipelineFlags PipelineFlags;
1196 
1197 /**
1198  * The plugin loading errors
1199  * GST_PLUGIN_ERROR_MODULE
1200  *  The plugin could not be loaded
1201  * GST_PLUGIN_ERROR_DEPENDENCIES
1202  *  The plugin has unresolved dependencies
1203  * GST_PLUGIN_ERROR_NAME_MISMATCH
1204  *  The plugin has already be loaded from a different file
1205  */
1206 public enum GstPluginError
1207 {
1208 	MODULE,
1209 	DEPENDENCIES,
1210 	NAME_MISMATCH
1211 }
1212 alias GstPluginError PluginError;
1213 
1214 /**
1215  * Element priority ranks. Defines the order in which the autoplugger (or
1216  * similar rank-picking mechanisms) will choose this element over an alternative
1217  * one with the same function.
1218  * The rank is a unsigned integer ranging from 0 (GST_RANK_NONE) to 256
1219  * (GST_RANK_PRIMARY). These constants serve as a rough guidiance for defining
1220  * the rank of a GstPlugin using gst_plugin_feature_set_rank().
1221  * GST_RANK_NONE
1222  *  will be chosen last or not at all
1223  * GST_RANK_MARGINAL
1224  *  unlikly to be chosen
1225  * GST_RANK_SECONDARY
1226  *  likely to be chosen
1227  * GST_RANK_PRIMARY
1228  *  will be chosen first
1229  */
1230 public enum GstRank
1231 {
1232 	NONE = 0,
1233 	MARGINAL = 64,
1234 	SECONDARY = 128,
1235 	PRIMARY = 256
1236 }
1237 alias GstRank Rank;
1238 
1239 /**
1240  * Standard predefined Query types
1241  * GST_QUERY_NONE
1242  *  invalid query type
1243  * GST_QUERY_POSITION
1244  *  current position in stream
1245  * GST_QUERY_DURATION
1246  *  total duration of the stream
1247  * GST_QUERY_LATENCY
1248  *  latency of stream
1249  * GST_QUERY_JITTER
1250  *  current jitter of stream
1251  * GST_QUERY_RATE
1252  *  current rate of the stream
1253  * GST_QUERY_SEEKING
1254  *  seeking capabilities
1255  * GST_QUERY_SEGMENT
1256  *  segment start/stop positions
1257  * GST_QUERY_CONVERT
1258  *  convert values between formats
1259  * GST_QUERY_FORMATS
1260  *  query supported formats for convert
1261  */
1262 public enum GstQueryType
1263 {
1264 	NONE = 0,
1265 	POSITION,
1266 	DURATION,
1267 	LATENCY,
1268 	JITTER, /+* not inn draft-query, necessary? +/
1269 	RATE,
1270 	SEEKING,
1271 	SEGMENT,
1272 	CONVERT,
1273 	FORMATS
1274 }
1275 alias GstQueryType QueryType;
1276 
1277 /**
1278  * The different tag merging modes are basically replace, overwrite and append,
1279  * but they can be seen from two directions.
1280  * Given two taglists: A - the one that are supplied to
1281  * gst_tag_setter_merge_tags() or gst_tag_setter_add_tags() and B - the tags
1282  * already in the element, how are the tags merged? In the table below this is
1283  * shown for the cases that a tag exists in the list (A) or does not exists (!A)
1284  * and combination thereof.
1285  * Table1.merge mode
1286  * merge mode
1287  * A + B
1288  * A + !B
1289  * !A + B
1290  * !A + !B
1291  * REPLACE_ALL
1292  * B
1293  * -
1294  * B
1295  * -
1296  * REPLACE
1297  * B
1298  * A
1299  * B
1300  * -
1301  * APPEND
1302  * A, B
1303  * A
1304  * B
1305  * -
1306  * PREPEND
1307  * B, A
1308  * A
1309  * B
1310  * -
1311  * KEEP
1312  * A
1313  * A
1314  * B
1315  * -
1316  * KEEP_ALL
1317  * A
1318  * A
1319  * -
1320  * -
1321  * GST_TAG_MERGE_UNDEFINED
1322  *  undefined merge mode
1323  * GST_TAG_MERGE_REPLACE_ALL
1324  *  replace all tags (clear list and append)
1325  * GST_TAG_MERGE_REPLACE
1326  *  replace tags
1327  * GST_TAG_MERGE_APPEND
1328  *  append tags
1329  * GST_TAG_MERGE_PREPEND
1330  *  prepend tags
1331  * GST_TAG_MERGE_KEEP
1332  *  keep existing tags
1333  * GST_TAG_MERGE_KEEP_ALL
1334  *  keep all existing tags
1335  * GST_TAG_MERGE_COUNT
1336  *  the number of merge modes
1337  */
1338 public enum GstTagMergeMode
1339 {
1340 	UNDEFINED,
1341 	REPLACE_ALL,
1342 	REPLACE,
1343 	APPEND,
1344 	PREPEND,
1345 	KEEP,
1346 	KEEP_ALL,
1347 	/+* add more +/
1348 	COUNT
1349 }
1350 alias GstTagMergeMode TagMergeMode;
1351 
1352 /**
1353  * Extra tag flags used when registering tags.
1354  * GST_TAG_FLAG_UNDEFINED
1355  *  undefined flag
1356  * GST_TAG_FLAG_META
1357  *  tag is meta data
1358  * GST_TAG_FLAG_ENCODED
1359  *  tag is encoded
1360  * GST_TAG_FLAG_DECODED
1361  *  tag is decoded
1362  * GST_TAG_FLAG_COUNT
1363  *  number of tag flags
1364  */
1365 public enum GstTagFlag
1366 {
1367 	FLAG_UNDEFINED,
1368 	FLAG_META,
1369 	FLAG_ENCODED,
1370 	FLAG_DECODED,
1371 	FLAG_COUNT
1372 }
1373 alias GstTagFlag TagFlag;
1374 
1375 /**
1376  * The different states a task can be in
1377  * GST_TASK_STARTED
1378  *  the task is started and running
1379  * GST_TASK_STOPPED
1380  *  the task is stopped
1381  * GST_TASK_PAUSED
1382  *  the task is paused
1383  */
1384 public enum GstTaskState
1385 {
1386 	STARTED,
1387 	STOPPED,
1388 	PAUSED
1389 }
1390 alias GstTaskState TaskState;
1391 
1392 /**
1393  * The probability of the typefind function. Higher values have more certainty
1394  * in doing a reliable typefind.
1395  * GST_TYPE_FIND_MINIMUM
1396  *  unlikely typefind
1397  * GST_TYPE_FIND_POSSIBLE
1398  *  possible type detected
1399  * GST_TYPE_FIND_LIKELY
1400  *  likely a type was detected
1401  * GST_TYPE_FIND_NEARLY_CERTAIN
1402  *  nearly certain that a type was detected
1403  * GST_TYPE_FIND_MAXIMUM
1404  *  very certain a type was detected.
1405  */
1406 public enum GstTypeFindProbability
1407 {
1408 	MINIMUM = 1,
1409 	POSSIBLE = 50,
1410 	LIKELY = 80,
1411 	NEARLY_CERTAIN = 99,
1412 	MAXIMUM = 100
1413 }
1414 alias GstTypeFindProbability TypeFindProbability;
1415 
1416 struct GstBinPrivate{}
1417 
1418 align(1) public struct GstBuffer
1419 {
1420 	GstMiniObject mini_object;
1421 	
1422 	/*< public >*/ /* with COW */
1423 	/* pointer to data and its size */
1424 	guint8 *data;
1425 	guint size;
1426 	
1427 	/* timestamp */
1428 	GstClockTime timestamp;
1429 	GstClockTime duration;
1430 	
1431 	/* the media type of this buffer */
1432 	GstCaps* caps;
1433 	
1434 	/* media specific offset */
1435 	guint64 offset;
1436 	guint64 offset_end;
1437 	
1438 	guint8 *malloc_data;
1439 	
1440 	/*< private >*/
1441 	gpointer _gst_reserved[GST_PADDING];
1442 }
1443 
1444 struct GstObjectClass {
1445 	GObjectClass parent_class;
1446 	
1447 	gchar   *path_string_separator;
1448 	GObject	*signal_object;
1449 	
1450 	GStaticRecMutex *lock;
1451 	
1452 	/* signals */
1453 	extern(C) void function(GstObject* object, GstObject* parent) parent_set;
1454 	extern(C) void function(GstObject* object, GstObject* parent) parent_unset;
1455 	extern(C) void function(GstObject* object, GstXmlNodePtr parent) object_saved;
1456 	extern(C) void function(GstObject* object, GstObject* orig, GParamSpec* pspec) deep_notify;
1457 	
1458 	/*< public >*/
1459 	/* virtual methods for subclasses */
1460 	extern(C) GstXmlNodePtr function(GstObject* object, GstXmlNodePtr parent) save_thyself;
1461 	extern(C) void          function(GstObject* object, GstXmlNodePtr self) restore_thyself;
1462 	
1463 	/*< private >*/
1464 	gpointer _gst_reserved[GST_PADDING];
1465 }
1466 
1467 align(1) struct GstMessage
1468 {
1469 	GstMiniObject mini_object;
1470 	
1471 	/*< private > *//* with MESSAGE_LOCK */
1472 	GMutex* lock;                 /* lock and cond for async delivery */
1473 	GCond* cond;
1474 	
1475 	/*< public > *//* with COW */
1476 	GstMessageType type;
1477 	ulong timestamp;//guint64 timestamp;
1478 	GstObject* src;
1479 	
1480 	GstStructure* structure;
1481 	
1482 	/*< private > */
1483 	gpointer _gst_reserved[GST_PADDING];
1484 }
1485 
1486 align(1) public struct GstMiniObject
1487 {
1488 	GTypeInstance instanc;
1489 	//< public >// with COW
1490 	int refcount;//gint refcount;
1491 	uint flags;//guint flags;
1492 	
1493 	//< private >
1494 	gpointer _gst_reserved;
1495 }
1496 
1497 /**
1498  * Main Gtk struct.
1499  * GStreamer base object class.
1500  * gintrefcount;
1501  */
1502 public struct GstObject
1503 {
1504 	int refcount;
1505 	GMutex *lock; /+* object LOCK +/
1506 	char *name; /+* object name +/
1507 	char *namePrefix; /+* used for debugging +/
1508 	GstObject *parent; /+* this object's parent, weak ref +/
1509 	uint flags;
1510 }
1511 
1512 
1513 /**
1514  * Main Gtk struct.
1515  * GStreamer element abstract base class.
1516  * GStaticRecMutex*state_lock;
1517  */
1518 public struct GstElement
1519 {
1520 	GStaticRecMutex *stateLock;
1521 	/+* element state +/
1522 	GCond *stateCond;
1523 	uint stateCookie;
1524 	GstState currentState;
1525 	GstState nextState;
1526 	GstState pendingState;
1527 	GstStateChangeReturn lastReturn;
1528 	GstBus *bus;
1529 	/+* allocated clock +/
1530 	GstClock *clock;
1531 	GstClockTimeDiff baseTime; /+* NULL/READY: 0 - PAUSED: current time - PLAYING: difference to clock +/
1532 	/+* element pads, these lists can only be iterated while holding
1533 	 * the LOCK or checking the cookie after each LOCK. +/
1534 	ushort numpads;
1535 	GList *pads;
1536 	ushort numsrcpads;
1537 	GList *srcpads;
1538 	ushort numsinkpads;
1539 	GList *sinkpads;
1540 	uint padsCookie;
1541 }
1542 
1543 
1544 /**
1545  * GStreamer element class. Override the vmethods to implement the element
1546  * functionality.
1547  * GstObjectClassparent_class;
1548  */
1549 public struct GstElementClass
1550 {
1551 	GstObjectClass parentClass;
1552 	/+* the element details +/
1553 	GstElementDetails details;
1554 	/+* factory that the element was created from +/
1555 	GstElementFactory *elementfactory;
1556 	/+* templates for our pads +/
1557 	GList *padtemplates;
1558 	int numpadtemplates;
1559 	uint padTemplCookie;
1560 	/+* virtua methods for subclasses +/
1561 	/+* request/release pads +/
1562 	extern(C) GstPad* function(GstElement* element, GstPadTemplate* templ, char* name) requestNewPad;
1563 	extern(C) void function(GstElement* element, GstPad* pad) releasePad;
1564 	/+* state changes +/
1565 	extern(C) GstStateChangeReturn function(GstElement* element, GstState* state, GstState* pending, GstClockTime timeout) getState;
1566 	extern(C) GstStateChangeReturn function(GstElement* element, GstState state) setState;
1567 	extern(C) GstStateChangeReturn function(GstElement* element, GstStateChange transition) changeState;
1568 	/+* bus +/
1569 	extern(C) void function(GstElement* element, GstBus* bus) setBus;
1570 	/+* set/get clocks +/
1571 	extern(C) GstClock* function(GstElement* element) provideClock;
1572 	extern(C) int function(GstElement* element, GstClock* clock) setClock;
1573 	/+* index +/
1574 	extern(C) GstIndex* function(GstElement* element) getIndex;
1575 	extern(C) void function(GstElement* element, GstIndex* index) setIndex;
1576 	/+* query functions +/
1577 	extern(C) int function(GstElement* element, GstEvent* event) sendEvent;
1578 	extern(C) GstQueryType* function(GstElement* element) getQueryTypes;
1579 	extern(C) int function(GstElement* element, GstQuery* query) query;
1580 }
1581 
1582 
1583 /**
1584  * Main Gtk struct.
1585  * The GstBin base class. Subclasses can access these fields provided
1586  * the LOCK is taken.
1587  * gintnumchildren;
1588  */
1589 public struct GstBin
1590 {
1591 	/+* our children, subclass are supposed to update these
1592 	 * fields to reflect their state with _Iterate*() +/
1593 	int numchildren;
1594 	GList *children;
1595 	uint childrenCookie;
1596 	GstBus *childBus;
1597 	GList *messages;
1598 	int polling;
1599 	int stateDirty;
1600 	int clockDirty;
1601 	GstClock *providedClock;
1602 	GstElement *clockProvider;
1603 	GstBinPrivate *priv;
1604 }
1605 
1606 
1607 /**
1608  * Subclasses can override the add_element and remove_element to
1609  * update the list of children in the bin.
1610  * The handle_message method can be overriden to implement custom
1611  * message handling.
1612  * GstElementClassparent_class;
1613  */
1614 public struct GstBinClass
1615 {
1616 	GstElementClass parentClass;
1617 	/+* virtua methods for subclasses +/
1618 	extern(C) int function(GstBin* bin, GstElement* element) addElement;
1619 	extern(C) int function(GstBin* bin, GstElement* element) removeElement;
1620 	extern(C) void function(GstBin* bin, GstMessage* message) handleMessage;
1621 }
1622 
1623 
1624 /**
1625  * Main Gtk struct.
1626  * The opaque GstBus data structure.
1627  */
1628 public struct GstBus{}
1629 
1630 
1631 /**
1632  * Main Gtk struct.
1633  * Object describing media types.
1634  * GTypetype;
1635  */
1636 public struct GstCaps
1637 {
1638 	GType type;
1639 	/+* refcounting +/
1640 	int refcount;
1641 	GstCapsFlags flags;
1642 }
1643 
1644 
1645 /**
1646  * Datastructure to initialize GstCaps from a string description usually
1647  * used in conjunction with GST_STATIC_CAPS() and gst_static_caps_get() to
1648  * instantiate a GstCaps.
1649  * GstCapscaps;
1650  */
1651 public struct GstStaticCaps
1652 {
1653 	GstCaps caps;
1654 	char *string;
1655 }
1656 
1657 
1658 /**
1659  * Main Gtk struct.
1660  * GstClock base structure. The values of this structure are
1661  * protected for subclasses, use the methods to use the GstClock.
1662  */
1663 public struct GstClock{}
1664 
1665 
1666 /**
1667  * GStreamer clock class. Override the vmethods to implement the clock
1668  * functionality.
1669  * GstObjectClassparent_class;
1670  */
1671 public struct GstClockClass
1672 {
1673 	GstObjectClass parentClass;
1674 	/+* vtable +/
1675 	extern(C) GstClockTime function(GstClock* clock, GstClockTime oldResolution, GstClockTime newResolution) changeResolution;
1676 	extern(C) GstClockTime function(GstClock* clock) getResolution;
1677 	extern(C) GstClockTime function(GstClock* clock) getInternalTime;
1678 	/+* waiting on an ID +/
1679 	extern(C) GstClockReturn function(GstClock* clock, GstClockEntry* entry) wait;
1680 	extern(C) GstClockReturn function(GstClock* clock, GstClockEntry* entry) waitAsync;
1681 	extern(C) void function(GstClock* clock, GstClockEntry* entry) unschedule;
1682 	/+* ABI added to replace the deprecated wait +/
1683 	extern(C) GstClockReturn function(GstClock* clock, GstClockEntry* entry, GstClockTimeDiff* jitter) waitJitter;
1684 }
1685 
1686 
1687 /**
1688  * All pending timeouts or periodic notifies are converted into
1689  * an entry.
1690  * gintrefcount;
1691  */
1692 public struct GstClockEntry
1693 {
1694 	int refcount;
1695 }
1696 
1697 
1698 /**
1699  * Main Gtk struct.
1700  * The opaque GstElementFactory data structure.
1701  */
1702 public struct GstElementFactory{}
1703 
1704 
1705 /**
1706  * This struct defines the public information about a GstElement. It contains
1707  * meta-data about the element that is mostly for the benefit of editors.
1708  * The klass member can be used by applications to filter elements based
1709  * on functionality.
1710  * gchar*longname;
1711  */
1712 public struct GstElementDetails
1713 {
1714 	char *longname;
1715 	char *klass;
1716 	char *description;
1717 	char *author;
1718 }
1719 
1720 
1721 /**
1722  * Main Gtk struct.
1723  * A GstEvent.
1724  * GstMiniObjectmini_object;
1725  */
1726 public struct GstEvent
1727 {
1728 	GstMiniObject miniObject;
1729 	GstEventType type;
1730 	ulong timestamp;
1731 	GstObject *src;
1732 	GstStructure *structure;
1733 }
1734 
1735 
1736 /**
1737  * A format definition
1738  * GstFormatvalue;
1739  */
1740 public struct GstFormatDefinition
1741 {
1742 	GstFormat value;
1743 	char *nick;
1744 	char *description;
1745 	GQuark quark;
1746 }
1747 
1748 
1749 /**
1750  * Main Gtk struct.
1751  * Opaque GstGhostPad structure.
1752  */
1753 public struct GstGhostPad{}
1754 
1755 
1756 /**
1757  * Main Gtk struct.
1758  * Opaque GstImplementsInterface structure.
1759  */
1760 public struct GstImplementsInterface{}
1761 
1762 
1763 /**
1764  * Main Gtk struct.
1765  * Opaque GstIndex structure.
1766  */
1767 public struct GstIndex{}
1768 
1769 
1770 /**
1771  * The basic element of an index.
1772  */
1773 public struct GstIndexEntry{}
1774 
1775 
1776 /**
1777  * A group of related entries in an index.
1778  */
1779 public struct GstIndexGroup{}
1780 
1781 
1782 /**
1783  * An association in an entry.
1784  * GstFormatformat;
1785  */
1786 public struct GstIndexAssociation
1787 {
1788 	GstFormat format;
1789 	long value;
1790 }
1791 
1792 
1793 /**
1794  * Main Gtk struct.
1795  * The GstIndexFactory object
1796  */
1797 public struct GstIndexFactory{}
1798 
1799 
1800 /**
1801  * Main Gtk struct.
1802  * GstIterator base structure. The values of this structure are
1803  * protected for subclasses, use the methods to use the GstIterator.
1804  */
1805 public struct GstIterator{}
1806 
1807 
1808 /**
1809  * Main Gtk struct.
1810  * The GstPad structure. Use the functions to update the variables.
1811  * gpointerelement_private;
1812  */
1813 public struct GstPad
1814 {
1815 	void* elementPrivate;
1816 	GstPadTemplate *padtemplate;
1817 	GstPadDirection direction;
1818 	/+* streaming recLock +/
1819 	GStaticRecMutex *streamRecLock;
1820 	GstTask *task;
1821 	GMutex *prerollLock;
1822 	GCond *prerollCond;
1823 	/+* block cond, mutex is from the object +/
1824 	GCond *blockCond;
1825 	GstPadBlockCallback blockCallback;
1826 	void* blockData;
1827 	/+* the pad capabilities +/
1828 	GstCaps *caps;
1829 	GstPadGetCapsFunction getcapsfunc;
1830 	GstPadSetCapsFunction setcapsfunc;
1831 	GstPadAcceptCapsFunction acceptcapsfunc;
1832 	GstPadFixateCapsFunction fixatecapsfunc;
1833 	GstPadActivateFunction activatefunc;
1834 	GstPadActivateModeFunction activatepushfunc;
1835 	GstPadActivateModeFunction activatepullfunc;
1836 	/+* pad link +/
1837 	GstPadLinkFunction linkfunc;
1838 	GstPadUnlinkFunction unlinkfunc;
1839 	GstPad *peer;
1840 	void* schedPrivate;
1841 	/+* data transport functions +/
1842 	GstPadChainFunction chainfunc;
1843 	GstPadCheckGetRangeFunction checkgetrangefunc;
1844 	GstPadGetRangeFunction getrangefunc;
1845 	GstPadEventFunction eventfunc;
1846 	GstActivateMode mode;
1847 	/+* generic query method +/
1848 	GstPadQueryTypeFunction querytypefunc;
1849 	GstPadQueryFunction queryfunc;
1850 	/+* internal links +/
1851 	GstPadIntLinkFunction intlinkfunc;
1852 	GstPadBufferAllocFunction bufferallocfunc;
1853 	/+* whether to emit signals for have-data. counts number
1854 	 * of handlers attached. +/
1855 	int doBufferSignals;
1856 	int doEventSignals;
1857 }
1858 
1859 
1860 /**
1861  * Structure describing the GstStaticPadTemplate.
1862  * gchar*name_template;
1863  */
1864 public struct GstStaticPadTemplate
1865 {
1866 	char *nameTemplate;
1867 	GstPadDirection direction;
1868 	GstPadPresence presence;
1869 	GstStaticCaps staticCaps;
1870 }
1871 
1872 
1873 /**
1874  * Main Gtk struct.
1875  * The padtemplate object.
1876  */
1877 public struct GstPadTemplate{}
1878 
1879 
1880 /**
1881  * Main Gtk struct.
1882  * The GstPipeline structure.
1883  * GstClock*fixed_clock;
1884  */
1885 public struct GstPipeline
1886 {
1887 	GstClock *fixedClock;
1888 	GstClockTime streamTime;
1889 	GstClockTime delay;
1890 }
1891 
1892 
1893 /**
1894  * Main Gtk struct.
1895  * The plugin object
1896  */
1897 public struct GstPlugin{}
1898 
1899 
1900 /**
1901  * A plugin should export a variable of this type called plugin_desc. The plugin
1902  * loader will use the data provided there to initialize the plugin.
1903  * The licence parameter must be one of: LGPL, GPL, QPL, GPL/QPL, MPL,
1904  * Proprietary, unknown.
1905  * gintmajor_version;
1906  */
1907 public struct GstPluginDesc
1908 {
1909 	int majorVersion;
1910 	int minorVersion;
1911 	char *name;
1912 	char *description;
1913 	GstPluginInitFunc pluginInit;
1914 	char *versio;
1915 	char *license;
1916 	char *source;
1917 	char *p;
1918 	char *origin;
1919 	void*[GST_PADDING] _GstReserved;
1920 }
1921 
1922 
1923 /**
1924  * Main Gtk struct.
1925  * Opaque GstPluginFeature structure.
1926  */
1927 public struct GstPluginFeature{}
1928 
1929 
1930 /**
1931  * Structure used for filtering based on name and type.
1932  * constgchar*name;
1933  */
1934 public struct GstTypeNameData
1935 {
1936 	char *name;
1937 	GType type;
1938 }
1939 
1940 
1941 /**
1942  * Main Gtk struct.
1943  * The GstQuery structure.
1944  * GstMiniObjectmini_object;
1945  */
1946 public struct GstQuery
1947 {
1948 	GstMiniObject miniObject;
1949 	GstQueryType type;
1950 	GstStructure *structure;
1951 }
1952 
1953 
1954 /**
1955  * A Query Type definition
1956  * GstQueryTypevalue;
1957  */
1958 public struct GstQueryTypeDefinition
1959 {
1960 	GstQueryType value;
1961 	char *nick;
1962 	char *description;
1963 	GQuark quark;
1964 }
1965 
1966 
1967 /**
1968  * Main Gtk struct.
1969  * Opaque GstRegistry structure.
1970  */
1971 public struct GstRegistry{}
1972 
1973 
1974 /**
1975  * Main Gtk struct.
1976  * A helper structure that holds the configured region of
1977  * interest in a media file.
1978  * gdoublerate;
1979  */
1980 public struct GstSegment
1981 {
1982 	double rate;
1983 	double absRate;
1984 	GstFormat format;
1985 	GstSeekFlags flags;
1986 	long start;
1987 	long stop;
1988 	long time;
1989 	long accum;
1990 	long lastStop;
1991 	long duration;
1992 	/+* API added 0.10.6 +/
1993 	double appliedRate;
1994 }
1995 
1996 
1997 /**
1998  * Main Gtk struct.
1999  * The GstStructure object. Most fields are private.
2000  * GTypetype;
2001  */
2002 public struct GstStructure
2003 {
2004 	GType type;
2005 }
2006 
2007 
2008 /**
2009  * Main Gtk struct.
2010  * The default implementation of a GstClock that uses the system time.
2011  */
2012 public struct GstSystemClock{}
2013 
2014 
2015 /**
2016  * Main Gtk struct.
2017  * Opaque GstTagSetter data structure.
2018  */
2019 public struct GstTagSetter{}
2020 
2021 
2022 /**
2023  * GstTagSetterIFace interface.
2024  * GTypeInterfaceg_iface;
2025  */
2026 public struct GstTagSetterIFace
2027 {
2028 	GTypeInterface gIface;
2029 	/+* signals +/
2030 	/+* virtua table +/
2031 }
2032 
2033 
2034 /**
2035  * Main Gtk struct.
2036  * The GstTask object.
2037  * GstTaskStatestate;
2038  */
2039 public struct GstTask
2040 {
2041 	GstTaskState state;
2042 	GCond *cond;
2043 	GStaticRecMutex *lock;
2044 	GstTaskFunction func;
2045 	void* data;
2046 	int running;
2047 }
2048 
2049 
2050 /**
2051  * Main Gtk struct.
2052  * Object that stores typefind callbacks. To use with GstTypeFindFactory.
2053  * peek()
2054  */
2055 public struct GstTypeFind
2056 {
2057 	/+* private to the caller of the typefind funct +/
2058 	extern(C) ubyte * function(void* data, long offset, uint size)  peek;
2059 	extern(C) void function(void* data, uint probability, GstCaps* caps)  suggest;
2060 	void* data;
2061 	/+* optional +/
2062 	extern(C) ulong function(void* data)  getLength;
2063 }
2064 
2065 
2066 /**
2067  * Main Gtk struct.
2068  * Object that stores information about a typefind function.
2069  */
2070 public struct GstTypeFindFactory{}
2071 
2072 
2073 /*
2074  * This macro returns the entire set of flags for the mini-object.
2075  * obj:
2076  *  MiniObject to return flags for.
2077  */
2078 // TODO
2079 // #define GST_MINI_OBJECT_FLAGS(obj) (GST_MINI_OBJECT_CAST(obj)->flags)
2080 
2081 /*
2082  * This macro checks to see if the given flag is set.
2083  * obj:
2084  *  MiniObject to check for flags.
2085  * flag:
2086  *  Flag to check for
2087  */
2088 // TODO
2089 // #define GST_MINI_OBJECT_FLAG_IS_SET(obj,flag) !!(GST_MINI_OBJECT_FLAGS (obj)  (flag))
2090 
2091 /*
2092  * This macro sets the given bits.
2093  * obj:
2094  *  MiniObject to set flag in.
2095  * flag:
2096  *  Flag to set, can by any number of bits in guint32.
2097  */
2098 // TODO
2099 // #define GST_MINI_OBJECT_FLAG_SET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) |= (flag))
2100 
2101 /*
2102  * This macro usets the given bits.
2103  * obj:
2104  *  MiniObject to unset flag in.
2105  * flag:
2106  *  Flag to set, must be a single bit in guint32.
2107  */
2108 // TODO
2109 // #define GST_MINI_OBJECT_FLAG_UNSET(obj,flag) (GST_MINI_OBJECT_FLAGS (obj) = ~(flag))
2110 
2111 /*
2112  * Get access to the reference count field of the mini-object.
2113  * obj:
2114  *  a GstMiniObject
2115  */
2116 // TODO
2117 // #define GST_MINI_OBJECT_REFCOUNT(obj) ((GST_MINI_OBJECT_CAST(obj))->refcount)
2118 
2119 /*
2120  * Get the reference count value of the mini-object.
2121  * obj:
2122  *  a GstMiniObject
2123  */
2124 // TODO
2125 // #define GST_MINI_OBJECT_REFCOUNT_VALUE(obj) (g_atomic_int_get ((GST_MINI_OBJECT_CAST(obj))->refcount))
2126 
2127 /*
2128  * This macro returns the entire set of flags for the object.
2129  * obj:
2130  *  a GstObject
2131  */
2132 // TODO
2133 // #define GST_OBJECT_FLAGS(obj) (GST_OBJECT_CAST (obj)->flags)
2134 
2135 /*
2136  * This macro checks to see if the given flag is set.
2137  * obj:
2138  *  a GstObject
2139  * flag:
2140  *  Flag to check for
2141  */
2142 // TODO
2143 // #define GST_OBJECT_FLAG_IS_SET(obj,flag) ((GST_OBJECT_FLAGS (obj)  (flag)) == (flag))
2144 
2145 /*
2146  * This macro sets the given bits.
2147  * obj:
2148  *  a GstObject
2149  * flag:
2150  *  Flag to set
2151  */
2152 // TODO
2153 // #define GST_OBJECT_FLAG_SET(obj,flag) (GST_OBJECT_FLAGS (obj) |= (flag))
2154 
2155 /*
2156  * This macro usets the given bits.
2157  * obj:
2158  *  a GstObject
2159  * flag:
2160  *  Flag to set
2161  */
2162 // TODO
2163 // #define GST_OBJECT_FLAG_UNSET(obj,flag) (GST_OBJECT_FLAGS (obj) = ~(flag))
2164 
2165 /*
2166  * Get the name of this object
2167  * obj:
2168  *  a GstObject
2169  */
2170 // TODO
2171 // #define GST_OBJECT_NAME(obj) (GST_OBJECT_CAST(obj)->name)
2172 
2173 /*
2174  * Get the parent of this object
2175  * obj:
2176  *  a GstObject
2177  */
2178 // TODO
2179 // #define GST_OBJECT_PARENT(obj) (GST_OBJECT_CAST(obj)->parent)
2180 
2181 /*
2182  * Check if the given object is beeing destroyed.
2183  * obj:
2184  *  a GstObject
2185  */
2186 // TODO
2187 // #define GST_OBJECT_IS_DISPOSING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_DISPOSING))
2188 
2189 /*
2190  * Check if the given object is floating (has no owner).
2191  * obj:
2192  *  a GstObject
2193  */
2194 // TODO
2195 // #define GST_OBJECT_IS_FLOATING(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_OBJECT_FLOATING))
2196 
2197 /*
2198  * Get access to the reference count field of the object.
2199  * obj:
2200  *  a GstObject
2201  */
2202 // TODO
2203 // #define GST_OBJECT_REFCOUNT(obj) (((GObject*)(obj))->ref_count)
2204 
2205 /*
2206  * Get the reference count value of the object.
2207  * obj:
2208  *  a GstObject
2209  */
2210 // TODO
2211 // #define GST_OBJECT_REFCOUNT_VALUE(obj) g_atomic_int_get ((gint *) GST_OBJECT_REFCOUNT(obj))
2212 
2213 /*
2214  * This macro will return the class lock used to protect deep_notify signal
2215  * emission on thread-unsafe glib versions (glib < 2.8).
2216  * obj:
2217  *  a GstObjectClass
2218  */
2219 // TODO
2220 // #define GST_CLASS_GET_LOCK(obj) (GST_OBJECT_CLASS_CAST(obj)->lock)
2221 
2222 /*
2223  * Lock the class.
2224  * obj:
2225  *  a GstObjectClass
2226  */
2227 // TODO
2228 // #define GST_CLASS_LOCK(obj) (g_static_rec_mutex_lock(GST_CLASS_GET_LOCK(obj)))
2229 
2230 /*
2231  * Try to lock the class, returns TRUE if class could be locked.
2232  * obj:
2233  *  a GstObjectClass
2234  */
2235 // TODO
2236 // #define GST_CLASS_TRYLOCK(obj) (g_static_rec_mutex_trylock(GST_CLASS_GET_LOCK(obj)))
2237 
2238 /*
2239  * Unlock the class.
2240  * obj:
2241  *  a GstObjectClass
2242  */
2243 // TODO
2244 // #define GST_CLASS_UNLOCK(obj) (g_static_rec_mutex_unlock(GST_CLASS_GET_LOCK(obj)))
2245 
2246 /*
2247  * This macro will obtain a lock on the object, making serialization possible.
2248  * It blocks until the lock can be obtained.
2249  * obj:
2250  *  a GstObject to lock
2251  */
2252 // TODO
2253 // #define GST_OBJECT_LOCK(obj) g_mutex_lock(GST_OBJECT_GET_LOCK(obj))
2254 
2255 /*
2256  * This macro will try to obtain a lock on the object, but will return with
2257  * FALSE if it can't get it immediately.
2258  * obj:
2259  *  a Object.
2260  */
2261 // TODO
2262 // #define GST_OBJECT_TRYLOCK(obj) g_mutex_trylock(GST_OBJECT_GET_LOCK(obj))
2263 
2264 /*
2265  * This macro releases a lock on the object.
2266  * obj:
2267  *  a GstObject to unlock.
2268  */
2269 // TODO
2270 // #define GST_OBJECT_UNLOCK(obj) g_mutex_unlock(GST_OBJECT_GET_LOCK(obj))
2271 
2272 /*
2273  * Acquire a reference to the mutex of this object.
2274  * obj:
2275  *  a GstObject
2276  */
2277 // TODO
2278 // #define GST_OBJECT_GET_LOCK(obj) (GST_OBJECT_CAST(obj)->lock)
2279 
2280 /*
2281  * This macro returns the current GstState of the element.
2282  * elem:
2283  *  a GstElement to return state for.
2284  */
2285 // TODO
2286 // #define GST_STATE(elem)			(GST_ELEMENT_CAST(elem)->current_state)
2287 
2288 /*
2289  * Given a current state cur and a target state pending, calculate the next (intermediate)
2290  * GstState.
2291  * cur:
2292  *  A starting GstState
2293  * pending:
2294  *  A target GstState
2295  */
2296 // TODO
2297 // #define GST_STATE_GET_NEXT(cur,pending)		((cur) + __GST_SIGN ((gint)(pending) - (gint)(cur)))
2298 
2299 /*
2300  * This macro returns the next GstState of the element.
2301  * elem:
2302  *  a GstElement to return the next state for.
2303  */
2304 // TODO
2305 // #define GST_STATE_NEXT(elem)		(GST_ELEMENT_CAST(elem)->next_state)
2306 
2307 /*
2308  * This macro returns the currently pending GstState of the element.
2309  * elem:
2310  *  a GstElement to return the pending state for.
2311  */
2312 // TODO
2313 // #define GST_STATE_PENDING(elem)		(GST_ELEMENT_CAST(elem)->pending_state)
2314 
2315 /*
2316  * This macro returns the last GstStateChangeReturn value.
2317  * elem:
2318  *  a GstElement to return the last state result for.
2319  */
2320 // TODO
2321 // #define GST_STATE_RETURN(elem)		(GST_ELEMENT_CAST(elem)->last_return)
2322 
2323 /*
2324  * This macro returns the target GstState of the element.
2325  * elem:
2326  *  a GstElement to return the target state for.
2327  * Since 0.10.13
2328  */
2329 // TODO
2330 // #define GST_STATE_TARGET(elem)		(GST_ELEMENT_CAST(elem)->abidata.ABI.target_state)
2331 
2332 /*
2333  * Given a current state cur and a next state next, calculate the associated
2334  * GstStateChange transition.
2335  * cur:
2336  *  A current state
2337  * next:
2338  *  A next state
2339  */
2340 // TODO
2341 // #define GST_STATE_TRANSITION(cur,next)		((GstStateChange)(((cur)<<3)|(next)))
2342 
2343 /*
2344  * Given a state transition trans, extract the current GstState.
2345  * trans:
2346  *  A GstStateChange
2347  */
2348 // TODO
2349 // #define GST_STATE_TRANSITION_CURRENT(trans)	((GstState)((trans)>>3))
2350 
2351 /*
2352  * Given a state transition trans, extract the next GstState.
2353  * trans:
2354  *  A GstStateChange
2355  */
2356 // TODO
2357 // #define GST_STATE_TRANSITION_NEXT(trans)	((GstState)((trans)0x7))
2358 
2359 /*
2360  * Get a reference to the state lock of elem.
2361  * This lock is used by the core. It is taken while getting or setting
2362  * the state, during state changes, and while finalizing.
2363  * elem:
2364  *  a GstElement
2365  */
2366 // TODO
2367 // #define GST_STATE_GET_LOCK(elem) (GST_ELEMENT_CAST(elem)->state_lock)
2368 
2369 /*
2370  * Get the conditional used to signal the completion of a state change.
2371  * elem:
2372  *  a GstElement
2373  */
2374 // TODO
2375 // #define GST_STATE_GET_COND(elem) (GST_ELEMENT_CAST(elem)->state_cond)
2376 
2377 /*
2378  * Gets the name of this element. Use only in core as this is not
2379  * ABI-compatible. Others use gst_element_get_name()
2380  * elem:
2381  *  A GstElement to query
2382  */
2383 // TODO
2384 // #define GST_ELEMENT_NAME(elem)			(GST_OBJECT_NAME(elem))
2385 
2386 /*
2387  * Get the parent object of this element.
2388  * elem:
2389  *  A GstElement to query
2390  */
2391 // TODO
2392 // #define GST_ELEMENT_PARENT(elem)		(GST_ELEMENT_CAST(GST_OBJECT_PARENT(elem)))
2393 
2394 /*
2395  * Get the message bus of this element.
2396  * elem:
2397  *  A GstElement to query
2398  */
2399 // TODO
2400 // #define GST_ELEMENT_BUS(elem)			(GST_ELEMENT_CAST(elem)->bus)
2401 
2402 /*
2403  * Get the clock of this element
2404  * elem:
2405  *  A GstElement to query
2406  */
2407 // TODO
2408 // #define GST_ELEMENT_CLOCK(elem)			(GST_ELEMENT_CAST(elem)->clock)
2409 
2410 /*
2411  * Get the pads of this elements.
2412  * elem:
2413  *  A GstElement to query
2414  */
2415 // TODO
2416 // #define GST_ELEMENT_PADS(elem)			(GST_ELEMENT_CAST(elem)->pads)
2417 
2418 /*
2419  * Utility function that elements can use in case they encountered a fatal
2420  * data processing error. The pipeline will post an error message and the
2421  * application will be requested to stop further media processing.
2422  * el:
2423  *  the element that generates the error
2424  * domain:
2425  *  like CORE, LIBRARY, RESOURCE or STREAM (see GstGError)
2426  * code:
2427  *  error code defined for that domain (see GstGError)
2428  * text:
2429  *  the message to display (format string and args enclosed in
2430  *  parentheses)
2431  * debug:
2432  *  debugging information for the message (format string and args
2433  *  enclosed in parentheses)
2434  */
2435 // TODO
2436 // #define GST_ELEMENT_ERROR(el, domain, code, text, debug)
2437 
2438 /*
2439  * Utility function that elements can use in case they encountered a non-fatal
2440  * data processing problem. The pipeline will post a warning message and the
2441  * application will be informed.
2442  * el:
2443  *  the element that generates the warning
2444  * domain:
2445  *  like CORE, LIBRARY, RESOURCE or STREAM (see gstreamer-GstGError)
2446  * code:
2447  *  error code defined for that domain (see gstreamer-GstGError)
2448  * text:
2449  *  the message to display (format string and args enclosed in
2450  *  parentheses)
2451  * debug:
2452  *  debugging information for the message (format string and args
2453  *  enclosed in parentheses)
2454  */
2455 // TODO
2456 // #define GST_ELEMENT_WARNING(el, domain, code, text, debug)
2457 
2458 /*
2459  * Utility function that elements can use in case they want to inform
2460  * the application of something noteworthy that is not an error.
2461  * The pipeline will post a warning message and the
2462  * application will be informed.
2463  * el:
2464  *  the element that generates the information
2465  * domain:
2466  *  like CORE, LIBRARY, RESOURCE or STREAM (see gstreamer-GstGError)
2467  * code:
2468  *  error code defined for that domain (see gstreamer-GstGError)
2469  * text:
2470  *  the message to display (format string and args enclosed in
2471  *  parentheses)
2472  * debug:
2473  *  debugging information for the message (format string and args
2474  *  enclosed in parentheses)
2475  * Since 0.10.12
2476  */
2477 // TODO
2478 // #define GST_ELEMENT_INFO(el, domain, code, text, debug)
2479 
2480 /*
2481  * Check if the element is in the locked state and therefore will ignore state
2482  * changes from its parent object.
2483  * elem:
2484  *  A GstElement to query
2485  */
2486 // TODO
2487 // #define GST_ELEMENT_IS_LOCKED_STATE(elem) (GST_OBJECT_FLAG_IS_SET(elem,GST_ELEMENT_LOCKED_STATE))
2488 
2489 /*
2490  * Sets the name of the element, getting rid of the old name if there was one.
2491  * elem:
2492  *  a GstElement to set the name of.
2493  * name:
2494  *  the new name
2495  */
2496 // TODO
2497 // #define			gst_element_set_name(elem,name)	gst_object_set_name(GST_OBJECT_CAST(elem),name)
2498 
2499 /*
2500  * Gets the name of the element.
2501  * elem:
2502  *  a GstElement to set the name of.
2503  */
2504 // TODO
2505 // #define			gst_element_get_name(elem)	gst_object_get_name(GST_OBJECT_CAST(elem))
2506 
2507 /*
2508  * Sets the parent of an element.
2509  * elem:
2510  *  a GstElement to set the parent of.
2511  * parent:
2512  *  the new parent GstObject of the element.
2513  */
2514 // TODO
2515 // #define			gst_element_set_parent(elem,parent)	gst_object_set_parent(GST_OBJECT_CAST(elem),parent)
2516 
2517 /*
2518  * Gets the parent of an element.
2519  * elem:
2520  *  a GstElement to get the parent of.
2521  */
2522 // TODO
2523 // #define			gst_element_get_parent(elem)	gst_object_get_parent(GST_OBJECT_CAST(elem))
2524 
2525 /*
2526  * Gets the list with children in a bin.
2527  * bin:
2528  *  a GstBin
2529  */
2530 // TODO
2531 // #define GST_BIN_CHILDREN(bin)		(GST_BIN_CAST(bin)->children)
2532 
2533 /*
2534  * Gets the children cookie that watches the children list.
2535  * bin:
2536  *  a GstBin
2537  */
2538 // TODO
2539 // #define GST_BIN_CHILDREN_COOKIE(bin)	(GST_BIN_CAST(bin)->children_cookie)
2540 
2541 /*
2542  * Gets the number of children in a bin.
2543  * bin:
2544  *  a GstBin
2545  * Property Details
2546  * The "async-handling" property
2547  *  "async-handling" gboolean : Read / Write
2548  * If set to TRUE, the bin will handle asynchronous state changes.
2549  * This should be used only if the bin subclass is modifying the state
2550  * of its childs on its own.
2551  * Default value: FALSE
2552  * Since 0.10.13
2553  * Signal Details
2554  * The "element-added" signal
2555  * void user_function (GstBin *bin,
2556  *  GstElement *element,
2557  *  gpointer user_data) : Run First
2558  * Will be emitted after the element was added to the bin.
2559  * bin:
2560  *  the GstBin
2561  * element:
2562  *  the GstElement that was added to the bin
2563  * user_data:
2564  * user data set when the signal handler was connected.
2565  */
2566 // TODO
2567 // #define GST_BIN_NUMCHILDREN(bin)	(GST_BIN_CAST(bin)->numchildren)
2568 
2569 /*
2570  * A flags word containing GstBufferFlag flags set on this buffer.
2571  * buf:
2572  *  a GstBuffer.
2573  */
2574 // TODO
2575 // #define GST_BUFFER_FLAGS(buf) GST_MINI_OBJECT_FLAGS(buf)
2576 
2577 /*
2578  * Gives the status of a specific flag on a buffer.
2579  * buf:
2580  *  a GstBuffer.
2581  * flag:
2582  *  the GstBufferFlag to check.
2583  */
2584 // TODO
2585 // #define GST_BUFFER_FLAG_IS_SET(buf,flag) GST_MINI_OBJECT_FLAG_IS_SET (buf, flag)
2586 
2587 /*
2588  * Sets a buffer flag on a buffer.
2589  * buf:
2590  *  a GstBuffer.
2591  * flag:
2592  *  the GstBufferFlag to set.
2593  */
2594 // TODO
2595 // #define GST_BUFFER_FLAG_SET(buf,flag) GST_MINI_OBJECT_FLAG_SET (buf, flag)
2596 
2597 /*
2598  * Clears a buffer flag.
2599  * buf:
2600  *  a GstBuffer.
2601  * flag:
2602  *  the GstBufferFlag to clear.
2603  */
2604 // TODO
2605 // #define GST_BUFFER_FLAG_UNSET(buf,flag) GST_MINI_OBJECT_FLAG_UNSET (buf, flag)
2606 
2607 /*
2608  * A pointer to the data element of this buffer.
2609  * buf:
2610  *  a GstBuffer.
2611  */
2612 // TODO
2613 // #define GST_BUFFER_DATA(buf)			(GST_BUFFER_CAST(buf)->data)
2614 
2615 /*
2616  * A pointer to any data allocated for this buffer using malloc(). If this is
2617  * non-NULL, this memory will be freed at the end of the buffer's lifecycle
2618  * (i.e. when its refcount becomes zero).
2619  * buf:
2620  *  a GstBuffer.
2621  */
2622 // TODO
2623 // #define GST_BUFFER_MALLOCDATA(buf)		(GST_BUFFER_CAST(buf)->malloc_data)
2624 
2625 /*
2626  * The size in bytes of the data in this buffer.
2627  * buf:
2628  *  a GstBuffer.
2629  */
2630 // TODO
2631 // #define GST_BUFFER_SIZE(buf)			(GST_BUFFER_CAST(buf)->size)
2632 
2633 /*
2634  * The timestamp in nanoseconds (as a GstClockTime) of the data in the buffer.
2635  * Value will be GST_CLOCK_TIME_NONE if the timestamp is unknown.
2636  * buf:
2637  *  a GstBuffer.:
2638  */
2639 // TODO
2640 // #define GST_BUFFER_TIMESTAMP(buf)		(GST_BUFFER_CAST(buf)->timestamp)
2641 
2642 /*
2643  * The duration in nanoseconds (as a GstClockTime) of the data in the buffer.
2644  * Value will be GST_CLOCK_TIME_NONE if the duration is unknown.
2645  * buf:
2646  *  a GstBuffer.
2647  */
2648 // TODO
2649 // #define GST_BUFFER_DURATION(buf)		(GST_BUFFER_CAST(buf)->duration)
2650 
2651 /*
2652  * The caps for this buffer.
2653  * buf:
2654  *  a GstBuffer.
2655  */
2656 // TODO
2657 // #define GST_BUFFER_CAPS(buf)			(GST_BUFFER_CAST(buf)->caps)
2658 
2659 /*
2660  * The offset in the source file of the beginning of this buffer.
2661  * buf:
2662  *  a GstBuffer.
2663  */
2664 // TODO
2665 // #define GST_BUFFER_OFFSET(buf)			(GST_BUFFER_CAST(buf)->offset)
2666 
2667 /*
2668  * The offset in the source file of the end of this buffer.
2669  * buf:
2670  *  a GstBuffer.
2671  */
2672 // TODO
2673 // #define GST_BUFFER_OFFSET_END(buf)		(GST_BUFFER_CAST(buf)->offset_end)
2674 
2675 /*
2676  * Tests if the duration is known.
2677  * buffer:
2678  *  a GstBuffer
2679  */
2680 // TODO
2681 // #define GST_BUFFER_DURATION_IS_VALID(buffer)	(GST_CLOCK_TIME_IS_VALID (GST_BUFFER_DURATION (buffer)))
2682 
2683 /*
2684  * Tests if the timestamp is known.
2685  * buffer:
2686  *  a GstBuffer
2687  */
2688 // TODO
2689 // #define GST_BUFFER_TIMESTAMP_IS_VALID(buffer)	(GST_CLOCK_TIME_IS_VALID (GST_BUFFER_TIMESTAMP (buffer)))
2690 
2691 /*
2692  * Tests if the start offset is known.
2693  * buffer:
2694  *  a GstBuffer
2695  */
2696 // TODO
2697 // #define GST_BUFFER_OFFSET_IS_VALID(buffer)	(GST_BUFFER_OFFSET (buffer) != GST_BUFFER_OFFSET_NONE)
2698 
2699 /*
2700  * Tests if the end offset is known.
2701  * buffer:
2702  *  a GstBuffer
2703  */
2704 // TODO
2705 // #define GST_BUFFER_OFFSET_END_IS_VALID(buffer)	(GST_BUFFER_OFFSET_END (buffer) != GST_BUFFER_OFFSET_NONE)
2706 
2707 /*
2708  * Tests if the buffer marks a discontinuity in the stream.
2709  * buffer:
2710  *  a GstBuffer
2711  * Since 0.10.9
2712  */
2713 // TODO
2714 // #define GST_BUFFER_IS_DISCONT(buffer)	(GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT))
2715 
2716 /*
2717  * Decreases the refcount of the buffer. If the refcount reaches 0, the buffer
2718  * will be freed. If GST_BUFFER_MALLOCDATA() is non-NULL, this pointer will
2719  * also be freed at this time.
2720  * buf:
2721  *  a GstBuffer.
2722  */
2723 // TODO
2724 // #define		gst_buffer_unref(buf)		gst_mini_object_unref (GST_MINI_OBJECT_CAST (buf))
2725 
2726 /*
2727  * A convenience function to set the data and size on a buffer.
2728  * This will replace any existing data pointer set on this buffer, but will
2729  * not change GST_BUFFER_MALLOCDATA(), if any. Callers should ensure that
2730  * GST_BUFFER_MALLOCDATA() is non-NULL, or should free that and set it to NULL.
2731  * No checks are done on the data or size arguments passed.
2732  * buf:
2733  *  a GstBuffer
2734  * data:
2735  *  The data (a guint8 *) to set on the buffer.
2736  * size:
2737  *  The size (in bytes, as a guint) of the data being set.
2738  */
2739 // TODO
2740 // #define gst_buffer_set_data(buf, data, size)
2741 
2742 /*
2743  * Create a copy of the given buffer. This will also make a newly allocated
2744  * copy of the data the source buffer contains.
2745  * buf:
2746  *  a GstBuffer.
2747  */
2748 // TODO
2749 // #define		gst_buffer_copy(buf)		GST_BUFFER_CAST (gst_mini_object_copy (GST_MINI_OBJECT_CAST (buf)))
2750 
2751 /*
2752  * Tests if you can safely write data into a buffer's data array or validly
2753  * modify the caps and timestamp metadata. Metadata in a GstBuffer is always
2754  * writable, but it is only safe to change it when there is only one owner
2755  * of the buffer - ie, the refcount is 1.
2756  * buf:
2757  *  a GstBuffer
2758  */
2759 // TODO
2760 // #define		gst_buffer_is_writable(buf)	gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (buf))
2761 
2762 /*
2763  * Makes a writable buffer from the given buffer. If the source buffer is
2764  * already writable, this will simply return the same buffer. A copy will
2765  * otherwise be made using gst_buffer_copy().
2766  * buf:
2767  *  a GstBuffer
2768  */
2769 // TODO
2770 // #define		gst_buffer_make_writable(buf) GST_BUFFER_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (buf)))
2771 
2772 /*
2773  * Modifies a pointer to a Gstbuffer to point to a different GstBuffer. The
2774  * modification is done atomically (so this is useful for ensuring thread safety
2775  * in some cases), and the reference counts are updated appropriately (the old
2776  * buffer is unreffed, the new is reffed).
2777  * Either nbuf or the GstBuffer pointed to by obuf may be NULL.
2778  * obuf:
2779  *  pointer to a pointer to a GstBuffer to be replaced.
2780  * nbuf:
2781  *  pointer to a GstBuffer that will replace the buffer pointed to by
2782  *  obuf.
2783  */
2784 // TODO
2785 // #define gst_buffer_replace(obuf,nbuf)
2786 
2787 /*
2788  * Get access to the reference count field of the caps
2789  * caps:
2790  *  a GstCaps
2791  */
2792 // TODO
2793 // #define GST_CAPS_REFCOUNT(caps) ((GST_CAPS(caps))->refcount)
2794 
2795 /*
2796  * Get the reference count value of the caps.
2797  * caps:
2798  *  a GstCaps
2799  */
2800 // TODO
2801 // #define GST_CAPS_REFCOUNT_VALUE(caps) (g_atomic_int_get ((GST_CAPS(caps))->refcount))
2802 
2803 /*
2804  * Convenience macro that checks if the number of structures in the given caps
2805  * is exactly one.
2806  * caps:
2807  *  the GstCaps instance to check
2808  */
2809 // TODO
2810 // #define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1)
2811 
2812 /*
2813  * Warning
2814  * GST_DEBUG_CAPS is deprecated and should not be used in newly-written code. do not use anymore
2815  * Convenience macro for printing out the contents of caps with GST_DEBUG().
2816  * string:
2817  *  a string that should be prepended to the caps data.
2818  * caps:
2819  *  the GstCaps instance to print
2820  */
2821 // TODO
2822 // #define GST_DEBUG_CAPS(string, caps)
2823 
2824 /*
2825  * Creates a new GstCaps static caps from an input string.
2826  * This can be used in pad templates.
2827  * string:
2828  *  the string describing the caps
2829  */
2830 // TODO
2831 // #define GST_STATIC_CAPS(string)
2832 
2833 /*
2834  * Tests if a given GstClockTime represents a valid defined time.
2835  * time:
2836  *  clock time to validate
2837  */
2838 // TODO
2839 // #define GST_CLOCK_TIME_IS_VALID(time)	(((GstClockTime)(time)) != GST_CLOCK_TIME_NONE)
2840 
2841 /*
2842  * Calculate a difference between two clock times as a GstClockTimeDiff.
2843  * The difference is calculated as e - s.
2844  * s:
2845  *  the first time
2846  * e:
2847  *  the second time
2848  */
2849 // TODO
2850 // #define GST_CLOCK_DIFF(s, e)		(GstClockTimeDiff)((e) - (s))
2851 
2852 /*
2853  * Convert a GTimeVal to a GstClockTime.
2854  * tv:
2855  *  the timeval to convert
2856  */
2857 // TODO
2858 // #define GST_TIMEVAL_TO_TIME(tv)		((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND)
2859 
2860 /*
2861  * Note: on 32-bit systems, a timeval has a range of only 2^32 - 1 seconds,
2862  * which is about 68 years. Expect trouble if you want to schedule stuff
2863  * in your pipeline for 2038.
2864  * Convert a GstClockTime to a GTimeVal
2865  * t:
2866  *  The GstClockTime to convert
2867  * tv:
2868  *  The target timeval
2869  */
2870 // TODO
2871 // #define GST_TIME_TO_TIMEVAL(t,tv)
2872 
2873 /*
2874  * Convert a struct timespec (see man pselect) to a GstClockTime.
2875  * ts:
2876  *  the timespec to convert
2877  */
2878 // TODO
2879 // #define GST_TIMESPEC_TO_TIME(ts)		((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND)
2880 
2881 /*
2882  * Convert a GstClockTime to a struct timespec (see man pselect)
2883  * t:
2884  *  The GstClockTime to convert
2885  * ts:
2886  *  The target timespec
2887  */
2888 // TODO
2889 // #define GST_TIME_TO_TIMESPEC(t,ts)
2890 
2891 /*
2892  * Cast to a clock entry
2893  * entry:
2894  *  the entry to cast
2895  */
2896 // TODO
2897 // #define GST_CLOCK_ENTRY(entry)		((GstClockEntry *)(entry))
2898 
2899 /*
2900  * Get the owner clock of the entry
2901  * entry:
2902  *  the entry to query
2903  */
2904 // TODO
2905 // #define GST_CLOCK_ENTRY_CLOCK(entry)	((entry)->clock)
2906 
2907 /*
2908  * Get the type of the clock entry
2909  * entry:
2910  *  the entry to query
2911  */
2912 // TODO
2913 // #define GST_CLOCK_ENTRY_TYPE(entry)	((entry)->type)
2914 
2915 /*
2916  * Get the requested time of this entry
2917  * entry:
2918  *  the entry to query
2919  */
2920 // TODO
2921 // #define GST_CLOCK_ENTRY_TIME(entry)	((entry)->time)
2922 
2923 /*
2924  * Get the interval of this periodic entry
2925  * entry:
2926  *  the entry to query
2927  */
2928 // TODO
2929 // #define GST_CLOCK_ENTRY_INTERVAL(entry)	((entry)->interval)
2930 
2931 /*
2932  * The status of the entry
2933  * entry:
2934  *  the entry to query
2935  */
2936 // TODO
2937 // #define GST_CLOCK_ENTRY_STATUS(entry)	((entry)->status)
2938 
2939 /*
2940  * Gets the GstClockFlags clock flags.
2941  * clock:
2942  *  the clock to query
2943  */
2944 // TODO
2945 // #define GST_CLOCK_FLAGS(clock) (GST_CLOCK(clock)->flags)
2946 
2947 /*
2948  * Signal that the entries in the clock have changed.
2949  * clock:
2950  *  the clock to broadcast
2951  */
2952 // TODO
2953 // #define GST_CLOCK_BROADCAST(clock) g_cond_broadcast(GST_CLOCK_COND(clock))
2954 
2955 /*
2956  * Gets the GCond that gets signaled when the entries of the clock
2957  * changed.
2958  * clock:
2959  *  the clock to query
2960  */
2961 // TODO
2962 // #define GST_CLOCK_COND(clock) (GST_CLOCK_CAST(clock)->entries_changed)
2963 
2964 /*
2965  * Wait on the clock until the entries changed or the specified timeout
2966  * occured.
2967  * clock:
2968  *  the clock to wait on
2969  * tv:
2970  *  a GTimeVal to wait.
2971  */
2972 // TODO
2973 // #define GST_CLOCK_TIMED_WAIT(clock,tv) g_cond_timed_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock),tv)
2974 
2975 /*
2976  * Wait on the clock until the entries changed.
2977  * clock:
2978  *  the clock to wait on
2979  */
2980 // TODO
2981 // #define GST_CLOCK_WAIT(clock) g_cond_wait(GST_CLOCK_COND(clock),GST_OBJECT_GET_LOCK(clock))
2982 
2983 /*
2984  * Macro to initialize GstElementDetails.
2985  * longname:
2986  *  long, english name
2987  * klass:
2988  *  string describing the type of element, as an unordered list
2989  * separated with slashes ('/'). See draft-klass.txt of the design docs
2990  * for more details and common types
2991  * description:
2992  *  what the element is about
2993  * author:
2994  *  who wrote this element
2995  */
2996 // TODO
2997 // #define GST_ELEMENT_DETAILS(longname,klass,description,author)
2998 
2999 /*
3000  * Tests if element details are initialized.
3001  * details:
3002  *  the GstElementDetails to check
3003  */
3004 // TODO
3005 // #define GST_IS_ELEMENT_DETAILS(details)
3006 
3007 /*
3008  * Get the GstEventType of the event.
3009  * event:
3010  *  the event to query
3011  */
3012 // TODO
3013 // #define GST_EVENT_TYPE(event)		(GST_EVENT_CAST(event)->type)
3014 
3015 /*
3016  * Get a constant string representation of the GstEventType of the event.
3017  * event:
3018  *  the event to query
3019  */
3020 // TODO
3021 // #define GST_EVENT_TYPE_NAME(event)	(gst_event_type_get_name(GST_EVENT_TYPE(event)))
3022 
3023 /*
3024  * Get the GstClockTime timestamp of the event. This is the time when the event
3025  * was created.
3026  * event:
3027  *  the event to query
3028  */
3029 // TODO
3030 // #define GST_EVENT_TIMESTAMP(event)	(GST_EVENT_CAST(event)->timestamp)
3031 
3032 /*
3033  * The source GstObject that generated this event.
3034  * event:
3035  *  the event to query
3036  */
3037 // TODO
3038 // #define GST_EVENT_SRC(event)		(GST_EVENT_CAST(event)->src)
3039 
3040 /*
3041  * Check if an event can travel downstream.
3042  * ev:
3043  *  the event to query
3044  */
3045 // TODO
3046 // #define GST_EVENT_IS_DOWNSTREAM(ev)	!!(GST_EVENT_TYPE (ev)  GST_EVENT_TYPE_DOWNSTREAM)
3047 
3048 /*
3049  * Check if an event is serialized with the data stream.
3050  * ev:
3051  *  the event to query
3052  */
3053 // TODO
3054 // #define GST_EVENT_IS_SERIALIZED(ev)	!!(GST_EVENT_TYPE (ev)  GST_EVENT_TYPE_SERIALIZED)
3055 
3056 /*
3057  * Check if an event can travel upstream.
3058  * ev:
3059  *  the event to query
3060  */
3061 // TODO
3062 // #define GST_EVENT_IS_UPSTREAM(ev)	!!(GST_EVENT_TYPE (ev)  GST_EVENT_TYPE_UPSTREAM)
3063 
3064 /*
3065  * when making custom event types, use this macro with the num and
3066  * the given flags
3067  * num:
3068  *  the event number to create
3069  * flags:
3070  *  the event flags
3071  */
3072 // TODO
3073 // #define GST_EVENT_MAKE_TYPE(num,flags)
3074 
3075 /*
3076  * Copy the event using the event specific copy function.
3077  * ev:
3078  *  The event to copy
3079  */
3080 // TODO
3081 // #define gst_event_copy(ev)		GST_EVENT_CAST (gst_mini_object_copy (GST_MINI_OBJECT (ev)))
3082 
3083 /*
3084  * Decrease the refcount of an event, freeing it if the refcount reaches 0.
3085  * ev:
3086  *  The event to refcount
3087  */
3088 // TODO
3089 // #define gst_event_unref(ev)		gst_mini_object_unref (GST_MINI_OBJECT (ev))
3090 
3091 /*
3092  * Modifies a pointer to a GstEvent to point to a different GstEvent. The
3093  * modification is done atomically (so this is useful for ensuring thread safety
3094  * in some cases), and the reference counts are updated appropriately (the old
3095  * event is unreffed, the new one is reffed).
3096  * Either new_event or the GstEvent pointed to by old_event may be NULL.
3097  * old_event:
3098  *  pointer to a pointer to a GstEvent to be replaced.
3099  * new_event:
3100  *  pointer to a GstEvent that will replace the event pointed to
3101  *  by old_event.
3102  * Since 0.10.3
3103  */
3104 // TODO
3105 // #define gst_event_replace(old_event,new_event)
3106 
3107 /*
3108  * Get the number of associations in the entry.
3109  * entry:
3110  *  The entry to query
3111  */
3112 // TODO
3113 // #define GST_INDEX_NASSOCS(entry)		((entry)->data.assoc.nassocs)
3114 
3115 /*
3116  * Get the flags for this entry.
3117  * entry:
3118  *  The entry to query
3119  */
3120 // TODO
3121 // #define GST_INDEX_ASSOC_FLAGS(entry)		((entry)->data.assoc.flags)
3122 
3123 /*
3124  * Get the i-th format of the entry.
3125  * entry:
3126  *  The entry to query
3127  * i:
3128  *  The format index
3129  */
3130 // TODO
3131 // #define GST_INDEX_ASSOC_FORMAT(entry,i)		((entry)->data.assoc.assocs[(i)].format)
3132 
3133 /*
3134  * Get the i-th value of the entry.
3135  * entry:
3136  *  The entry to query
3137  * i:
3138  *  The value index
3139  */
3140 // TODO
3141 // #define GST_INDEX_ASSOC_VALUE(entry,i)		((entry)->data.assoc.assocs[(i)].value)
3142 
3143 /*
3144  * Get the format of the format entry
3145  * entry:
3146  *  The entry to query
3147  */
3148 // TODO
3149 // #define GST_INDEX_FORMAT_FORMAT(entry)		((entry)->data.format.format)
3150 
3151 /*
3152  * Get the key of the format entry
3153  * entry:
3154  *  The entry to query
3155  */
3156 // TODO
3157 // #define GST_INDEX_FORMAT_KEY(entry)		((entry)->data.format.key)
3158 
3159 /*
3160  * Get the description of the id entry
3161  * entry:
3162  *  The entry to query
3163  */
3164 // TODO
3165 // #define GST_INDEX_ID_DESCRIPTION(entry)		((entry)->data.id.description)
3166 
3167 /*
3168  * Check if the index can be read from
3169  * obj:
3170  *  The index to check
3171  */
3172 // TODO
3173 // #define GST_INDEX_IS_READABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_INDEX_READABLE))
3174 
3175 /*
3176  * Check if the index can be written to
3177  * obj:
3178  *  The index to check
3179  */
3180 // TODO
3181 // #define GST_INDEX_IS_WRITABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_INDEX_WRITABLE))
3182 
3183 /*
3184  * Macro to cast to a GstIterator
3185  * it:
3186  *  the GstIterator value
3187  */
3188 // TODO
3189 // #define GST_ITERATOR(it)		((GstIterator*)(it))
3190 
3191 /*
3192  * Macro to get the lock protecting the datastructure being iterated.
3193  * it:
3194  *  the GstIterator to get the lock of
3195  */
3196 // TODO
3197 // #define GST_ITERATOR_LOCK(it)		(GST_ITERATOR(it)->lock)
3198 
3199 /*
3200  * Macro to get the cookie of a GstIterator. The cookie of the
3201  * iterator is the value of the master cookie when the iterator
3202  * was created.
3203  * Whenever the iterator is iterated, the value is compared to the
3204  * value of the master cookie. If they are different, a concurrent
3205  * modification happened to the iterator and a resync is needed.
3206  * it:
3207  *  the GstIterator to get the cookie of
3208  */
3209 // TODO
3210 // #define GST_ITERATOR_COOKIE(it)		(GST_ITERATOR(it)->cookie)
3211 
3212 /*
3213  * Macro to get a pointer to where the master cookie is stored. The
3214  * master cookie protects the structure being iterated and gets updated
3215  * whenever the datastructure changes.
3216  * it:
3217  *  the GstIterator to get the master cookie of
3218  */
3219 // TODO
3220 // #define GST_ITERATOR_ORIG_COOKIE(it)	(GST_ITERATOR(it)->master_cookie)
3221 
3222 /*
3223  * Macro to test if the given GstPadLinkReturn value indicates a failed
3224  * link step.
3225  * ret:
3226  *  the GstPadLinkReturn value
3227  */
3228 // TODO
3229 // #define GST_PAD_LINK_FAILED(ret) ((ret) < GST_PAD_LINK_OK)
3230 
3231 /*
3232  * Macro to test if the given GstPadLinkReturn value indicates a successful
3233  * link step.
3234  * ret:
3235  *  the GstPadLinkReturn value
3236  */
3237 // TODO
3238 // #define GST_PAD_LINK_SUCCESSFUL(ret) ((ret) >= GST_PAD_LINK_OK)
3239 
3240 /*
3241  * Get a copy of the name of the pad. g_free() after usage.
3242  * MT safe.
3243  * pad:
3244  *  the pad to get the name from
3245  */
3246 // TODO
3247 // #define gst_pad_get_name(pad) gst_object_get_name (GST_OBJECT_CAST (pad))
3248 
3249 /*
3250  * Get the parent of pad. This function increases the refcount
3251  * of the parent object so you should gst_object_unref() it after usage.
3252  * Can return NULL if the pad did not have a parent.
3253  * MT safe.
3254  * pad:
3255  *  the pad to get the parent of
3256  */
3257 // TODO
3258 // #define gst_pad_get_parent(pad) gst_object_get_parent (GST_OBJECT_CAST (pad))
3259 
3260 /*
3261  * Get the stream lock of pad. The stream lock is protecting the
3262  * resources used in the data processing functions of pad.
3263  * pad:
3264  *  a GstPad
3265  */
3266 // TODO
3267 // #define GST_PAD_GET_STREAM_LOCK(pad) (GST_PAD_CAST(pad)->stream_rec_lock)
3268 
3269 /*
3270  * Lock the stream lock of pad.
3271  * pad:
3272  *  a GstPad
3273  */
3274 // TODO
3275 // #define GST_PAD_STREAM_LOCK(pad) (g_static_rec_mutex_lock(GST_PAD_GET_STREAM_LOCK(pad)))
3276 
3277 /*
3278  * Lock the stream lock of pad t times.
3279  * pad:
3280  *  a GstPad
3281  * t:
3282  *  the number of times to recursively lock
3283  */
3284 // TODO
3285 // #define GST_PAD_STREAM_LOCK_FULL(pad,t) (g_static_rec_mutex_lock_full(GST_PAD_GET_STREAM_LOCK(pad), t))
3286 
3287 /*
3288  * Try to Lock the stream lock of the pad, return TRUE if the lock could be
3289  * taken.
3290  * pad:
3291  *  a GstPad
3292  */
3293 // TODO
3294 // #define GST_PAD_STREAM_TRYLOCK(pad) (g_static_rec_mutex_trylock(GST_PAD_GET_STREAM_LOCK(pad)))
3295 
3296 /*
3297  * Unlock the stream lock of pad.
3298  * pad:
3299  *  a GstPad
3300  */
3301 // TODO
3302 // #define GST_PAD_STREAM_UNLOCK(pad) (g_static_rec_mutex_unlock(GST_PAD_GET_STREAM_LOCK(pad)))
3303 
3304 /*
3305  * Fully unlock the recursive stream lock of pad, return the number of times
3306  * pad was locked.
3307  * pad:
3308  *  a GstPad
3309  */
3310 // TODO
3311 // #define GST_PAD_STREAM_UNLOCK_FULL(pad) (g_static_rec_mutex_unlock_full(GST_PAD_GET_STREAM_LOCK(pad)))
3312 
3313 /*
3314  * Macro to test if the given GstFlowReturn value indicates a fatal
3315  * error. This macro is mainly used in elements driving the pipeline to decide
3316  * whether an error message should be posted on the bus. Note that such
3317  * elements may also need to post an error message in the GST_FLOW_NOT_LINKED
3318  * case which is not caught by this macro.
3319  * ret:
3320  *  a GstFlowReturn value
3321  */
3322 // TODO
3323 // #define GST_FLOW_IS_FATAL(ret) ((ret) <= GST_FLOW_UNEXPECTED)
3324 
3325 /*
3326  * Macro to test if the given GstFlowReturn value indicates a
3327  * successfull result
3328  * This macro is mainly used in elements to decide if the processing
3329  * of a buffer was successfull.
3330  * ret:
3331  *  a GstFlowReturn value
3332  * Since 0.10.7
3333  * Property Details
3334  * The "caps" property
3335  *  "caps" GstCaps : Read
3336  * The capabilities of the pad.
3337  */
3338 // TODO
3339 // #define GST_FLOW_IS_SUCCESS(ret) ((ret) >= GST_FLOW_OK)
3340 
3341 /*
3342  * Get the object that posted message.
3343  * message:
3344  *  a GstMessage
3345  */
3346 // TODO
3347 // #define GST_MESSAGE_SRC(message)	(GST_MESSAGE(message)->src)
3348 
3349 /*
3350  * Get the timestamp of message. This is the timestamp when the message
3351  * was created.
3352  * message:
3353  *  a GstMessage
3354  */
3355 // TODO
3356 // #define GST_MESSAGE_TIMESTAMP(message)	(GST_MESSAGE(message)->timestamp)
3357 
3358 /*
3359  * Get the GstMessageType of message.
3360  * message:
3361  *  a GstMessage
3362  */
3363 // TODO
3364 // #define GST_MESSAGE_TYPE(message)	(GST_MESSAGE(message)->type)
3365 
3366 /*
3367  * Get a constant string representation of the GstMessageType of message.
3368  * message:
3369  *  a GstMessage
3370  * Since 0.10.4
3371  */
3372 // TODO
3373 // #define GST_MESSAGE_TYPE_NAME(message)	gst_message_type_get_name(GST_MESSAGE_TYPE(message))
3374 
3375 /*
3376  * Creates a copy of the message. Returns a copy of the message.
3377  * MT safe
3378  * msg:
3379  *  the message to copy
3380  */
3381 // TODO
3382 // #define gst_message_copy(msg)		GST_MESSAGE (gst_mini_object_copy (GST_MINI_OBJECT (msg)))
3383 
3384 /*
3385  * Checks if a message is writable. If not, a writable copy is made and
3386  * returned. Returns a message (possibly a duplicate) that is writable.
3387  * MT safe
3388  * msg:
3389  *  the message to make writable
3390  */
3391 // TODO
3392 // #define gst_message_make_writable(msg)	GST_MESSAGE (gst_mini_object_make_writable (GST_MINI_OBJECT (msg)))
3393 
3394 /*
3395  * Convenience macro to decrease the reference count of the message, possibly
3396  * freeing it.
3397  * msg:
3398  *  the message to unref
3399  * See Also
3400  * GstBus, GstMiniObject, GstElement
3401  */
3402 // TODO
3403 // #define gst_message_unref(msg)		gst_mini_object_unref (GST_MINI_OBJECT (msg))
3404 
3405 /*
3406  * Convenience macro to fill the values of a GstStaticPadTemplate
3407  * structure.
3408  * padname:
3409  *  the name template of pad
3410  * dir:
3411  *  the GstPadDirection of the pad
3412  * pres:
3413  *  the GstPadPresence of the pad
3414  * caps:
3415  *  the GstStaticCaps of the pad
3416  */
3417 // TODO
3418 // #define GST_STATIC_PAD_TEMPLATE(padname, dir, pres, caps)
3419 
3420 /*
3421  * Get the nametemplate of the padtemplate.
3422  * templ:
3423  *  the template to query
3424  */
3425 // TODO
3426 // #define GST_PAD_TEMPLATE_NAME_TEMPLATE(templ)	(((GstPadTemplate *)(templ))->name_template)
3427 
3428 /*
3429  * Get the GstPadDirection of the padtemplate.
3430  * templ:
3431  *  the template to query
3432  */
3433 // TODO
3434 // #define GST_PAD_TEMPLATE_DIRECTION(templ)	(((GstPadTemplate *)(templ))->direction)
3435 
3436 /*
3437  * Get the GstPadPresence of the padtemplate.
3438  * templ:
3439  *  the template to query
3440  */
3441 // TODO
3442 // #define GST_PAD_TEMPLATE_PRESENCE(templ)	(((GstPadTemplate *)(templ))->presence)
3443 
3444 /*
3445  * Get a handle to the padtemplate GstCaps
3446  * templ:
3447  *  the template to query
3448  */
3449 // TODO
3450 // #define GST_PAD_TEMPLATE_CAPS(templ)		(((GstPadTemplate *)(templ))->caps)
3451 
3452 /*
3453  * Check if the properties of the padtemplate are fixed
3454  * templ:
3455  *  the template to query
3456  */
3457 // TODO
3458 // #define GST_PAD_TEMPLATE_IS_FIXED(templ)	(GST_OBJECT_FLAG_IS_SET(templ, GST_PAD_TEMPLATE_FIXED))
3459 
3460 /*
3461  * This macro needs to be used to define the entry point and meta data of a
3462  * plugin. One would use this macro to export a plugin, so that it can be used
3463  * by other applications
3464  * major:
3465  *  major version number of the gstreamer-core that plugin was compiled for
3466  * minor:
3467  *  minor version number of the gstreamer-core that plugin was compiled for
3468  * name:
3469  *  short, but unique name of the plugin
3470  * description:
3471  *  information about the purpose of the plugin
3472  * init:
3473  *  function pointer to the plugin_init method with the signature of static gboolean plugin_init (GstPlugin * plugin).
3474  * version:
3475  *  full version string (e.g. VERSION from config.h)
3476  * license:
3477  *  under which licence the package has been released, e.g. GPL, LGPL.
3478  * package:
3479  *  the package-name (e.g. PACKAGE_NAME from config.h)
3480  * origin:
3481  *  a description from where the package comes from (e.g. the homepage URL)
3482  */
3483 // TODO
3484 // #define GST_PLUGIN_DEFINE(major,minor,name,description,init,version,license,package,origin)
3485 
3486 /*
3487  * This macro needs to be used to define the entry point and meta data of a
3488  * local plugin. One would use this macro to define a local plugin that can only
3489  * be used by the own application.
3490  * major:
3491  *  major version number of the gstreamer-core that plugin was compiled for
3492  * minor:
3493  *  minor version number of the gstreamer-core that plugin was compiled for
3494  * name:
3495  *  short, but unique name of the plugin
3496  * description:
3497  *  information about the purpose of the plugin
3498  * init:
3499  *  function pointer to the plugin_init method with the signature of static gboolean plugin_init (GstPlugin * plugin).
3500  * version:
3501  *  full version string (e.g. VERSION from config.h)
3502  * license:
3503  *  under which licence the package has been released, e.g. GPL, LGPL.
3504  * package:
3505  *  the package-name (e.g. PACKAGE_NAME from config.h)
3506  * origin:
3507  *  a description from where the package comes from (e.g. the homepage URL)
3508  */
3509 // TODO
3510 // #define GST_PLUGIN_DEFINE_STATIC(major,minor,name,description,init,version,license,package,origin)
3511 
3512 /*
3513  * Get the name of the feature
3514  * feature:
3515  *  The feature to query
3516  */
3517 // TODO
3518 // #define GST_PLUGIN_FEATURE_NAME(feature) (GST_PLUGIN_FEATURE (feature)->name)
3519 
3520 /*
3521  * Get the GstQueryType of the query.
3522  * query:
3523  *  the query to query
3524  */
3525 // TODO
3526 // #define GST_QUERY_TYPE(query) (((GstQuery*)(query))->type)
3527 
3528 /*
3529  * Get a constant string representation of the GstQueryType of the query.
3530  * query:
3531  *  the query to query
3532  * Since 0.10.4
3533  */
3534 // TODO
3535 // #define GST_QUERY_TYPE_NAME(query) (gst_query_type_get_name(GST_QUERY_TYPE(query)))
3536 
3537 /*
3538  * Increases the refcount of the given query by one.
3539  * q:
3540  *  a GstQuery to increase the refcount of.
3541  */
3542 // TODO
3543 // #define gst_query_ref(q)		GST_QUERY (gst_mini_object_ref (GST_MINI_OBJECT (q)))
3544 
3545 /*
3546  * Decreases the refcount of the query. If the refcount reaches 0, the query
3547  * will be freed.
3548  * q:
3549  *  a GstQuery to decrease the refcount of.
3550  */
3551 // TODO
3552 // #define gst_query_unref(q)		gst_mini_object_unref (GST_MINI_OBJECT (q))
3553 
3554 /*
3555  * Copies the given query using the copy function of the parent GstData
3556  * structure.
3557  * q:
3558  *  a GstQuery to copy.
3559  */
3560 // TODO
3561 // #define gst_query_copy(q)		GST_QUERY (gst_mini_object_copy (GST_MINI_OBJECT (q)))
3562 
3563 /*
3564  * Makes a writable query from the given query.
3565  * q:
3566  *  a GstQuery to make writable
3567  */
3568 // TODO
3569 // #define gst_query_make_writable(q)	GST_QUERY (gst_mini_object_make_writable (GST_MINI_OBJECT (q)))
3570 
3571 /*
3572  * Get the list of paths for the default registry.
3573  */
3574 // TODO
3575 // #define gst_default_registry_get_path_list()
3576 
3577 /*
3578  * Add the plugin to the default registry.
3579  * The plugin-added signal will be emitted.
3580  * plugin:
3581  *  the plugin to add
3582  */
3583 // TODO
3584 // #define gst_default_registry_add_plugin(plugin)
3585 
3586 /*
3587  * Add the given path to the default registry. The syntax of the
3588  * path is specific to the registry. If the path has already been
3589  * added, do nothing.
3590  * path:
3591  *  the path to add to the registry
3592  */
3593 // TODO
3594 // #define gst_default_registry_add_path(path)
3595 
3596 /*
3597  * Find the plugin with the given name in the default registry.
3598  * The plugin will be reffed; caller is responsible for unreffing.
3599  * name:
3600  *  the plugin name to find
3601  */
3602 // TODO
3603 // #define gst_default_registry_find_plugin(name)
3604 
3605 /*
3606  * Find the pluginfeature with the given name and type in the default registry.
3607  * name:
3608  *  the pluginfeature name to find
3609  * type:
3610  *  the pluginfeature type to find
3611  */
3612 // TODO
3613 // #define gst_default_registry_find_feature(name,type)
3614 
3615 /*
3616  * Get a copy of all plugins registered in the default registry.
3617  */
3618 // TODO
3619 // #define gst_default_registry_get_plugin_list()
3620 
3621 /*
3622  * Runs a filter against all features of the plugins in the default registry
3623  * and returns a GList with the results.
3624  * If the first flag is set, only the first match is
3625  * returned (as a list with a single object).
3626  * filter:
3627  *  the filter to use
3628  * first:
3629  *  only return first match
3630  * user_data:
3631  *  user data passed to the filter function
3632  * Signal Details
3633  * The "feature-added" signal
3634  * void user_function (GstRegistry *registry,
3635  *  gpointer feature,
3636  *  gpointer user_data) : Run Last
3637  * Signals that a feature has been added to the registry (possibly
3638  * replacing a previously-added one by the same name)
3639  * registry:
3640  *  the registry that emitted the signal
3641  * feature:
3642  *  the feature that has been added
3643  * user_data:
3644  * user data set when the signal handler was connected.
3645  */
3646 // TODO
3647 // #define gst_default_registry_feature_filter(filter,first,user_data)
3648 
3649 /*
3650  * Send a broadcast signal to all waiting task conds
3651  * task:
3652  *  Task to broadcast
3653  */
3654 // TODO
3655 // #define GST_TASK_BROADCAST(task)	g_cond_breadcast(GST_TASK_GET_COND (task))
3656 
3657 /*
3658  * Get access to the cond of the task.
3659  * task:
3660  *  Task to get the cond of
3661  */
3662 // TODO
3663 // #define GST_TASK_GET_COND(task)		(GST_TASK_CAST(task)->cond)
3664 
3665 /*
3666  * Get access to the task lock.
3667  * task:
3668  *  Task to get the lock of
3669  */
3670 // TODO
3671 // #define GST_TASK_GET_LOCK(task)		(GST_TASK_CAST(task)->lock)
3672 
3673 /*
3674  * Signal the task cond
3675  * task:
3676  *  Task to signal
3677  */
3678 // TODO
3679 // #define GST_TASK_SIGNAL(task)		g_cond_signal(GST_TASK_GET_COND (task))
3680 
3681 /*
3682  * Get access to the state of the task.
3683  * task:
3684  *  Task to get the state of
3685  */
3686 // TODO
3687 // #define GST_TASK_STATE(task)		(GST_TASK_CAST(task)->state)
3688 
3689 /*
3690  * Wait for the task cond to be signalled
3691  * task:
3692  *  Task to wait for
3693  */
3694 // TODO
3695 // #define GST_TASK_WAIT(task)		g_cond_wait(GST_TASK_GET_COND (task), GST_OBJECT_GET_LOCK (task))
3696 
3697 /*
3698  * Virtual function prototype for methods to create copies of instances.
3699  * obj:
3700  *  MiniObject to copy
3701  * Returns:
3702  *  reference to cloned instance.
3703  */
3704 // GstMiniObject* (*GstMiniObjectCopyFunction) (const GstMiniObject *obj);
3705 public alias extern(C) GstMiniObject* function(GstMiniObject* obj) GstMiniObjectCopyFunction;
3706 
3707 /*
3708  * Virtual function prototype for methods to free ressources used by
3709  * mini-objects. Subclasses of the mini object are allowed to revive the
3710  * passed object by doing a gst_mini_object_ref(). If the object is not
3711  * revived after the finalize function, the memory associated with the
3712  * object is freed.
3713  * obj:
3714  *  MiniObject to finalize
3715  */
3716 // void (*GstMiniObjectFinalizeFunction) (GstMiniObject *obj);
3717 public alias extern(C) void function(GstMiniObject* obj) GstMiniObjectFinalizeFunction;
3718 
3719 /*
3720  * Specifies the type of function passed to gst_bus_add_watch() or
3721  * gst_bus_add_watch_full(), which is called from the mainloop when a message
3722  * is available on the bus.
3723  * The message passed to the function will be unreffed after execution of this
3724  * function so it should not be freed in the function.
3725  * Note that this function is used as a GSourceFunc which means that returning
3726  * FALSE will remove the GSource from the mainloop.
3727  * bus:
3728  *  the GstBus that sent the message
3729  * message:
3730  *  the GstMessage
3731  * data:
3732  *  user data that has been given, when registering the handler
3733  * Returns:
3734  *  FALSE if the event source should be removed.
3735  */
3736 // gboolean (*GstBusFunc) (GstBus *bus,  GstMessage *message,  gpointer data);
3737 public alias extern(C) int function(GstBus* bus, GstMessage* message, void* data) GstBusFunc;
3738 
3739 /*
3740  * Handler will be invoked synchronously, when a new message has been injected
3741  * into the bus. This function is mostly used internally. Only one sync handler
3742  * can be attached to a given bus.
3743  * If the handler returns GST_BUS_DROP, it should unref the message, else the
3744  * message should not be unreffed by the sync handler.
3745  * bus:
3746  *  the GstBus that sent the message
3747  * message:
3748  *  the GstMessage
3749  * data:
3750  *  user data that has been given, when registering the handler
3751  * Returns:
3752  *  GstBusSyncReply stating what to do with the message
3753  */
3754 // GstBusSyncReply (*GstBusSyncHandler) (GstBus *bus,  GstMessage *message,  gpointer data);
3755 public alias extern(C) GstBusSyncReply function(GstBus* bus, GstMessage* message, void* data) GstBusSyncHandler;
3756 
3757 /*
3758  * The function prototype of the callback.
3759  * clock:
3760  *  The clock that triggered the callback
3761  * time:
3762  *  The time it was triggered
3763  * id:
3764  *  The GstClockID that expired
3765  * user_data:
3766  *  user data passed in the gst_clock_id_wait_async() function
3767  * Returns:
3768  *  TRUE or FALSE (currently unused)
3769  */
3770 // gboolean (*GstClockCallback) (GstClock *clock,  GstClockTime time,  GstClockID id,  gpointer user_data);
3771 public alias extern(C) int function(GstClock* clock, GstClockTime time, GstClockID id, void* userData) GstClockCallback;
3772 
3773 /*
3774  * Function to filter out entries in the index.
3775  * index:
3776  *  The index being queried
3777  * entry:
3778  *  The entry to be added.
3779  * user_data:
3780  *  User data passed to the function.
3781  * Returns:
3782  *  This function should return TRUE if the entry is to be added
3783  * to the index, FALSE otherwise.
3784  */
3785 // gboolean (*GstIndexFilter) (GstIndex *index,  GstIndexEntry *entry,  gpointer user_data);
3786 public alias extern(C) int function(GstIndex* index, GstIndexEntry* entry, void* userData) GstIndexFilter;
3787 
3788 /*
3789  * Function to resolve ids to writer descriptions.
3790  * index:
3791  *  the index being queried.
3792  * writer:
3793  *  The object that wants to write
3794  * writer_string:
3795  *  A description of the writer.
3796  * user_data:
3797  *  user_data as registered
3798  * Returns:
3799  *  TRUE if an id could be assigned to the writer.
3800  */
3801 // gboolean (*GstIndexResolver) (GstIndex *index,  GstObject *writer,  gchar **writer_string,  gpointer user_data);
3802 public alias extern(C) int function(GstIndex* index, GstObject* writer, gchar** writerString, void* userData) GstIndexResolver;
3803 
3804 /*
3805  * The function that will be called when a GList iterator is freed. The
3806  * owner of the GList iterator can then clean up its resources.
3807  * owner:
3808  *  the owner of the iterator
3809  */
3810 // void (*GstIteratorDisposeFunction) (gpointer owner);
3811 public alias extern(C) void function(void* owner) GstIteratorDisposeFunction;
3812 
3813 /*
3814  * The function that will be called when the next element of the iterator
3815  * should be retrieved.
3816  * Implementors of a GstIterator should implement this
3817  * function and pass it to the constructor of the custom iterator.
3818  * The function will be called with the iterator lock held.
3819  * it:
3820  *  the iterator
3821  * result:
3822  *  a pointer to hold the next item
3823  * Returns:
3824  *  the result of the operation.
3825  */
3826 // GstIteratorResult (*GstIteratorNextFunction) (GstIterator *it,  gpointer *result);
3827 public alias extern(C) GstIteratorResult function(GstIterator* it, gpointer* result) GstIteratorNextFunction;
3828 
3829 /*
3830  * The function that will be called after the next item of the iterator
3831  * has been retrieved. This function will typically increase the refcount
3832  * of the item or make a copy.
3833  * Implementors of a GstIterator should implement this
3834  * function and pass it to the constructor of the custom iterator.
3835  * The function will be called with the iterator lock held.
3836  * it:
3837  *  the iterator
3838  * item:
3839  *  the item being retrieved.
3840  * Returns:
3841  *  the result of the operation.
3842  */
3843 // GstIteratorItem (*GstIteratorItemFunction) (GstIterator *it,  gpointer item);
3844 public alias extern(C) GstIteratorItem function(GstIterator* it, void* item) GstIteratorItemFunction;
3845 
3846 /*
3847  * This function will be called whenever a concurrent update happened
3848  * to the iterated datastructure. The implementor of the iterator should
3849  * restart the iterator from the beginning and clean up any state it might
3850  * have.
3851  * Implementors of a GstIterator should implement this
3852  * function and pass it to the constructor of the custom iterator.
3853  * The function will be called with the iterator lock held.
3854  * it:
3855  *  the iterator
3856  */
3857 // void (*GstIteratorResyncFunction) (GstIterator *it);
3858 public alias extern(C) void function(GstIterator* it) GstIteratorResyncFunction;
3859 
3860 /*
3861  * This function will be called when the iterator is freed.
3862  * Implementors of a GstIterator should implement this
3863  * function and pass it to the constructor of the custom iterator.
3864  * The function will be called with the iterator lock held.
3865  * it:
3866  *  the iterator
3867  */
3868 // void (*GstIteratorFreeFunction) (GstIterator *it);
3869 public alias extern(C) void function(GstIterator* it) GstIteratorFreeFunction;
3870 
3871 /*
3872  * A function to be passed to gst_iterator_fold().
3873  * item:
3874  *  the item to fold
3875  * ret:
3876  *  a GValue collecting the result
3877  * user_data:
3878  *  data passed to gst_iterator_fold()
3879  * Returns:
3880  *  TRUE if the fold should continue, FALSE if it should stop.
3881  */
3882 // gboolean (*GstIteratorFoldFunction) (gpointer item,  GValue *ret,  gpointer user_data);
3883 public alias extern(C) int function(void* item, GValue* ret, void* userData) GstIteratorFoldFunction;
3884 
3885 /*
3886  * Callback used by gst_pad_set_blocked_async(). Gets called when the blocking
3887  * operation succeeds.
3888  * pad:
3889  *  the GstPad that is blockend or unblocked.
3890  * blocked:
3891  *  blocking state for the pad
3892  * user_data:
3893  *  the gpointer to optional user data.
3894  */
3895 // void (*GstPadBlockCallback) (GstPad *pad,  gboolean blocked,  gpointer user_data);
3896 public alias extern(C) void function(GstPad* pad, int blocked, void* userData) GstPadBlockCallback;
3897 
3898 /*
3899  * Ask the sinkpad pad to allocate a buffer with offset, size and caps.
3900  * The result will be stored in buf.
3901  * The purpose of this function is to allocate a buffer that is optimal to
3902  * be processed by pad. The function is mostly overridden by elements that can
3903  * provide a hardware buffer in order to avoid additional memcpy operations.
3904  * The function can return a buffer that does not have caps, in which case the
3905  * upstream element requests a format change. If a format change was requested,
3906  * the returned buffer will be one to hold the data of said new caps, so its
3907  * size might be different from size.
3908  * When this function returns anything else than GST_FLOW_OK, the buffer allocation
3909  * failed and buf does not contain valid data.
3910  * By default this function returns a new buffer of size and with caps containing
3911  * purely malloced data. The buffer should be freed with gst_buffer_unref()
3912  * after usage.
3913  * pad:
3914  *  a sink GstPad
3915  * offset:
3916  *  the desired offset of the buffer
3917  * size:
3918  *  the desired size of the buffer
3919  * caps:
3920  *  the desired caps of the buffer
3921  * buf:
3922  *  pointer to hold the allocated buffer.
3923  * Returns:
3924  *  GST_FLOW_OK if buf contains a valid buffer, any other return
3925  *  value means buf does not hold a valid buffer.
3926  */
3927 // GstFlowReturn (*GstPadBufferAllocFunction) (GstPad *pad,  guint64 offset,  guint size,  GstCaps *caps,  GstBuffer **buf);
3928 public alias extern(C) GstFlowReturn function(GstPad* pad, ulong offset, uint size, GstCaps* caps, GstBuffer** buf) GstPadBufferAllocFunction;
3929 
3930 /*
3931  * A function that will be called on sinkpads when chaining buffers.
3932  * The function typically processes the data contained in the buffer and
3933  * either consumes the data or passes it on to the internally linked pad(s).
3934  * The implementer of this function receives a refcount to buffer and should
3935  * gst_buffer_unref() when the buffer is no longer needed.
3936  * When a chain function detects an error in the data stream, it must post an
3937  * error on the buffer and return an appropriate GstFlowReturn value.
3938  * pad:
3939  *  the sink GstPad that performed the chain.
3940  * buffer:
3941  *  the GstBuffer that is chained, not NULL.
3942  * Returns:
3943  *  GST_FLOW_OK for success
3944  */
3945 // GstFlowReturn (*GstPadChainFunction) (GstPad *pad,  GstBuffer *buffer);
3946 public alias extern(C) GstFlowReturn function(GstPad* pad, GstBuffer* buffer) GstPadChainFunction;
3947 
3948 /*
3949  * Check if pad can be activated in pull mode.
3950  * This function will be deprecated after 0.10; use the seeking query to check
3951  * if a pad can support random access.
3952  * pad:
3953  *  a GstPad
3954  * Returns:
3955  *  TRUE if the pad can operate in pull mode.
3956  */
3957 // gboolean (*GstPadCheckGetRangeFunction) (GstPad *pad);
3958 public alias extern(C) int function(GstPad* pad) GstPadCheckGetRangeFunction;
3959 
3960 /*
3961  * This function will be called on source pads when a peer element
3962  * request a buffer at the specified offset and length. If this function
3963  * returns GST_FLOW_OK, the result buffer will be stored in buffer. The
3964  * contents of buffer is invalid for any other return value.
3965  * This function is installed on a source pad with
3966  * gst_pad_set_getrange_function() and can only be called on source pads after
3967  * they are successfully activated with gst_pad_activate_pull().
3968  * offset and length are always given in byte units. offset must normally be a value
3969  * between 0 and the length in bytes of the data available on pad. The
3970  * length (duration in bytes) can be retrieved with a GST_QUERY_DURATION or with a
3971  * GST_QUERY_SEEKING.
3972  * Any offset larger or equal than the length will make the function return
3973  * GST_FLOW_UNEXPECTED, which corresponds to EOS. In this case buffer does not
3974  * contain a valid buffer.
3975  * The buffer size of buffer might be smaller than length when offset is near
3976  * the end of the stream.
3977  * It is allowed to call this function with a 0 length and valid offset, in
3978  * which case buffer will contain a 0-sized buffer and the function returns
3979  * GST_FLOW_OK.
3980  * When this function is called with a -1 offset, the sequentially next buffer
3981  * of length length in the stream is returned.
3982  * When this function is called with a -1 length, a buffer with a default
3983  * optimal length is returned in buffer. The length might depend on the value
3984  * of offset.
3985  * pad:
3986  *  the src GstPad to perform the getrange on.
3987  * offset:
3988  *  the offset of the range
3989  * length:
3990  *  the length of the range
3991  * buffer:
3992  *  a memory location to hold the result buffer, cannot be NULL.
3993  * Returns:
3994  *  GST_FLOW_OK for success
3995  */
3996 // GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad,  guint64 offset,  guint length,  GstBuffer **buffer);
3997 public alias extern(C) GstFlowReturn function(GstPad* pad, ulong offset, uint length, GstBuffer** buffer) GstPadGetRangeFunction;
3998 
3999 /*
4000  * Function signature to handle an event for the pad.
4001  * pad:
4002  *  the GstPad to handle the event.
4003  * event:
4004  *  the GstEvent to handle.
4005  * Returns:
4006  *  TRUE if the pad could handle the event.
4007  */
4008 // gboolean (*GstPadEventFunction) (GstPad *pad,  GstEvent *event);
4009 public alias extern(C) int function(GstPad* pad, GstEvent* event) GstPadEventFunction;
4010 
4011 /*
4012  * Function signature to handle a new link on the pad.
4013  * pad:
4014  *  the GstPad that is linked.
4015  * peer:
4016  *  the peer GstPad of the link
4017  * Returns:
4018  *  the result of the link with the specified peer.
4019  */
4020 // GstPadLinkReturn (*GstPadLinkFunction) (GstPad *pad,  GstPad *peer);
4021 public alias extern(C) GstPadLinkReturn function(GstPad* pad, GstPad* peer) GstPadLinkFunction;
4022 
4023 /*
4024  * Function signature to handle a unlinking the pad prom its peer.
4025  * pad:
4026  *  the GstPad that is linked.
4027  */
4028 // void (*GstPadUnlinkFunction) (GstPad *pad);
4029 public alias extern(C) void function(GstPad* pad) GstPadUnlinkFunction;
4030 
4031 /*
4032  * Check if pad can accept caps. By default this function will see if caps
4033  * intersect with the result from gst_pad_get_caps() by can be overridden to
4034  * perform extra checks.
4035  * pad:
4036  *  the GstPad to check
4037  * caps:
4038  *  the GstCaps to check
4039  * Returns:
4040  *  TRUE if the caps can be accepted by the pad.
4041  */
4042 // gboolean (*GstPadAcceptCapsFunction) (GstPad *pad,  GstCaps *caps);
4043 public alias extern(C) int function(GstPad* pad, GstCaps* caps) GstPadAcceptCapsFunction;
4044 
4045 /*
4046  * Returns a copy of the capabilities of the specified pad. By default this
4047  * function will return the pad template capabilities, but can optionally
4048  * be overridden by elements.
4049  * pad:
4050  *  the GstPad to get the capabilities of.
4051  * Returns:
4052  *  a newly allocated copy GstCaps of the pad.
4053  */
4054 // GstCaps* (*GstPadGetCapsFunction) (GstPad *pad);
4055 public alias extern(C) GstCaps* function(GstPad* pad) GstPadGetCapsFunction;
4056 
4057 /*
4058  * Set caps on pad. By default this function updates the caps of the
4059  * pad but the function can be overriden by elements to perform extra
4060  * actions or verifications.
4061  * pad:
4062  *  the GstPad to set the capabilities of.
4063  * caps:
4064  *  the GstCaps to set
4065  * Returns:
4066  *  TRUE if the caps could be set on the pad.
4067  */
4068 // gboolean (*GstPadSetCapsFunction) (GstPad *pad,  GstCaps *caps);
4069 public alias extern(C) int function(GstPad* pad, GstCaps* caps) GstPadSetCapsFunction;
4070 
4071 /*
4072  * Given possibly unfixed caps caps, let pad use its default prefered
4073  * format to make a fixed caps. caps should be writable. By default this
4074  * function will pick the first value of any ranges or lists in the caps but
4075  * elements can override this function to perform other behaviour.
4076  * pad:
4077  *  a GstPad
4078  * caps:
4079  *  the GstCaps to fixate
4080  */
4081 // void (*GstPadFixateCapsFunction) (GstPad *pad,  GstCaps *caps);
4082 public alias extern(C) void function(GstPad* pad, GstCaps* caps) GstPadFixateCapsFunction;
4083 
4084 /*
4085  * This function is called when the pad is activated during the element
4086  * READY to PAUSED state change. By default this function will call the
4087  * activate function that puts the pad in push mode but elements can
4088  * override this function to activate the pad in pull mode if they wish.
4089  * pad:
4090  *  a GstPad
4091  * Returns:
4092  *  TRUE if the pad could be activated.
4093  */
4094 // gboolean (*GstPadActivateFunction) (GstPad *pad);
4095 public alias extern(C) int function(GstPad* pad) GstPadActivateFunction;
4096 
4097 /*
4098  * The prototype of the push and pull activate functions.
4099  * pad:
4100  *  a GstPad
4101  * active:
4102  *  activate or deactivate the pad.
4103  * Returns:
4104  *  TRUE if the pad could be activated or deactivated.
4105  */
4106 // gboolean (*GstPadActivateModeFunction) (GstPad *pad,  gboolean active);
4107 public alias extern(C) int function(GstPad* pad, int active) GstPadActivateModeFunction;
4108 
4109 /*
4110  * The signature of the query function.
4111  * pad:
4112  *  the GstPad to query.
4113  * query:
4114  *  the GstQuery object to execute
4115  * Returns:
4116  *  TRUE if the query could be performed.
4117  */
4118 // gboolean (*GstPadQueryFunction) (GstPad *pad,  GstQuery *query);
4119 public alias extern(C) int function(GstPad* pad, GstQuery* query) GstPadQueryFunction;
4120 
4121 /*
4122  * The signature of the query types function.
4123  * pad:
4124  *  a GstPad to query
4125  * Returns:
4126  *  a constant array of query types
4127  */
4128 // const GstQueryType* (*GstPadQueryTypeFunction) (GstPad *pad);
4129 public alias extern(C) GstQueryType* function(GstPad* pad) GstPadQueryTypeFunction;
4130 
4131 /*
4132  * The signature of the internal pad link function.
4133  * pad:
4134  *  The GstPad to query.
4135  * Returns:
4136  *  a newly allocated GList of pads that are linked to the given pad on
4137  *  the inside of the parent element.
4138  *  The caller must call g_list_free() on it after use.
4139  */
4140 // GList* (*GstPadIntLinkFunction) (GstPad *pad);
4141 public alias extern(C) GList* function(GstPad* pad) GstPadIntLinkFunction;
4142 
4143 /*
4144  * A dispatcher function is called for all internally linked pads, see
4145  * gst_pad_dispatcher().
4146  * pad:
4147  *  the GstPad that is dispatched.
4148  * data:
4149  *  the gpointer to optional user data.
4150  * Returns:
4151  *  TRUE if the dispatching procedure has to be stopped.
4152  */
4153 // gboolean (*GstPadDispatcherFunction) (GstPad *pad,  gpointer data);
4154 public alias extern(C) int function(GstPad* pad, void* data) GstPadDispatcherFunction;
4155 
4156 /*
4157  * A plugin should provide a pointer to a function of this type in the
4158  * plugin_desc struct.
4159  * This function will be called by the loader at startup.
4160  * plugin:
4161  *  The plugin object that can be used to register GstPluginFeatures for this plugin.
4162  * Returns:
4163  *  TRUE if plugin initialised successfully
4164  */
4165 // gboolean (*GstPluginInitFunc) (GstPlugin *plugin);
4166 public alias extern(C) int function(GstPlugin* plugin) GstPluginInitFunc;
4167 
4168 /*
4169  * A function that can be used with e.g. gst_registry_plugin_filter()
4170  * to get a list of plugins that match certain criteria.
4171  * plugin:
4172  *  the plugin to check
4173  * user_data:
4174  *  the user_data that has been passed on e.g. gst_registry_plugin_filter()
4175  * Returns:
4176  *  TRUE for a positive match, FALSE otherwise
4177  */
4178 // gboolean (*GstPluginFilter) (GstPlugin *plugin,  gpointer user_data);
4179 public alias extern(C) int function(GstPlugin* plugin, void* userData) GstPluginFilter;
4180 
4181 /*
4182  * A function that can be used with e.g. gst_registry_feature_filter()
4183  * to get a list of pluginfeature that match certain criteria.
4184  * feature:
4185  *  the pluginfeature to check
4186  * user_data:
4187  *  the user_data that has been passed on e.g.
4188  *  gst_registry_feature_filter()
4189  * Returns:
4190  *  TRUE for a positive match, FALSE otherwise
4191  */
4192 // gboolean (*GstPluginFeatureFilter) (GstPluginFeature *feature,  gpointer user_data);
4193 public alias extern(C) int function(GstPluginFeature* feature, void* userData) GstPluginFeatureFilter;
4194 
4195 /*
4196  * A function that will be called in gst_structure_foreach(). The function may
4197  * not modify value.
4198  * field_id:
4199  *  the GQuark of the field name
4200  * value:
4201  *  the GValue of the field
4202  * user_data:
4203  *  user data
4204  * Returns:
4205  *  TRUE if the foreach operation should continue, FALSE if
4206  * the foreach operation should stop with FALSE.
4207  */
4208 // gboolean (*GstStructureForeachFunc) (GQuark field_id,  const GValue *value,  gpointer user_data);
4209 public alias extern(C) int function(GQuark fieldId, GValue* value, void* userData) GstStructureForeachFunc;
4210 
4211 /*
4212  * A function that will be called in gst_structure_map_in_place(). The function
4213  * may modify value.
4214  * field_id:
4215  *  the GQuark of the field name
4216  * value:
4217  *  the GValue of the field
4218  * user_data:
4219  *  user data
4220  * Returns:
4221  *  TRUE if the map operation should continue, FALSE if
4222  * the map operation should stop with FALSE.
4223  */
4224 // gboolean (*GstStructureMapFunc) (GQuark field_id,  GValue *value,  gpointer user_data);
4225 public alias extern(C) int function(GQuark fieldId, GValue* value, void* userData) GstStructureMapFunc;
4226 
4227 /*
4228  * A function that will be called in gst_tag_list_foreach(). The function may
4229  * not modify the tag list.
4230  * list:
4231  *  the GstTagList
4232  * tag:
4233  *  a name of a tag in list
4234  * user_data:
4235  *  user data
4236  */
4237 // void (*GstTagForeachFunc) (const GstTagList *list,  const gchar *tag,  gpointer user_data);
4238 public alias extern(C) void function(GstTagList* list, char* tag, void* userData) GstTagForeachFunc;
4239 
4240 /*
4241  * A function for merging multiple values of a tag used when registering
4242  * tags.
4243  * dest:
4244  *  the destination GValue
4245  * src:
4246  *  the source GValue
4247  */
4248 // void (*GstTagMergeFunc) (GValue *dest,  const GValue *src);
4249 public alias extern(C) void function(GValue* dest, GValue* src) GstTagMergeFunc;
4250 
4251 /*
4252  * A function that will repeadedly be called in the thread created by
4253  * a GstTask.
4254  * data:
4255  *  user data passed to the function
4256  */
4257 // void (*GstTaskFunction) (void *data);
4258 public alias extern(C) void function(void* data) GstTaskFunction;
4259 
4260 /*
4261  * A function that will be called by typefinding.
4262  * find:
4263  *  A GstTypeFind structure
4264  * data:
4265  *  optionnal data to pass to the function
4266  */
4267 // void (*GstTypeFindFunction) (GstTypeFind *find,  gpointer data);
4268 public alias extern(C) void function(GstTypeFind* find, void* data) GstTypeFindFunction;