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 
25 module gst.base.c.types;
26 
27 public import glib.c.types;
28 public import gobject.c.types;
29 public import gstreamer.c.types;
30 
31 
32 /**
33  * Flags to be used in a #GstBaseParseFrame.
34  */
35 public enum GstBaseParseFrameFlags
36 {
37 	/**
38 	 * no flag
39 	 */
40 	NONE = 0,
41 	/**
42 	 * set by baseclass if current frame
43 	 * is passed for processing to the subclass for the first time
44 	 * (and not set on subsequent calls with same data).
45 	 */
46 	NEW_FRAME = 1,
47 	/**
48 	 * set to indicate this buffer should not be
49 	 * counted as frame, e.g. if this frame is dependent on a previous one.
50 	 * As it is not counted as a frame, bitrate increases but frame to time
51 	 * conversions are maintained.
52 	 */
53 	NO_FRAME = 2,
54 	/**
55 	 * @pre_push_frame can set this to indicate
56 	 * that regular segment clipping can still be performed (as opposed to
57 	 * any custom one having been done).
58 	 */
59 	CLIP = 4,
60 	/**
61 	 * indicates to @finish_frame that the
62 	 * the frame should be dropped (and might be handled internally by subclass)
63 	 */
64 	DROP = 8,
65 	/**
66 	 * indicates to @finish_frame that the
67 	 * the frame should be queued for now and processed fully later
68 	 * when the first non-queued frame is finished
69 	 */
70 	QUEUE = 16,
71 }
72 alias GstBaseParseFrameFlags BaseParseFrameFlags;
73 
74 /**
75  * The #GstElement flags that a basesrc element may have.
76  */
77 public enum GstBaseSrcFlags
78 {
79 	/**
80 	 * has source is starting
81 	 */
82 	STARTING = 16384,
83 	/**
84 	 * has source been started
85 	 */
86 	STARTED = 32768,
87 	/**
88 	 * offset to define more flags
89 	 */
90 	LAST = 1048576,
91 }
92 alias GstBaseSrcFlags BaseSrcFlags;
93 
94 public enum GstCollectPadsStateFlags
95 {
96 	/**
97 	 * Set if collectdata's pad is EOS.
98 	 */
99 	EOS = 1,
100 	/**
101 	 * Set if collectdata's pad is flushing.
102 	 */
103 	FLUSHING = 2,
104 	/**
105 	 * Set if collectdata's pad received a
106 	 * new_segment event.
107 	 */
108 	NEW_SEGMENT = 4,
109 	/**
110 	 * Set if collectdata's pad must be waited
111 	 * for when collecting.
112 	 */
113 	WAITING = 8,
114 	/**
115 	 * Set collectdata's pad WAITING state must
116 	 * not be changed.
117 	 * #GstCollectPadsStateFlags indicate private state of a collectdata('s pad).
118 	 */
119 	LOCKED = 16,
120 }
121 alias GstCollectPadsStateFlags CollectPadsStateFlags;
122 
123 struct GstAdapter;
124 
125 struct GstAdapterClass;
126 
127 struct GstAggregator
128 {
129 	GstElement parent;
130 	/**
131 	 * the aggregator's source pad
132 	 */
133 	GstPad* srcpad;
134 	GstAggregatorPrivate* priv;
135 	void*[20] GstReserved;
136 }
137 
138 /**
139  * The aggregator base class will handle in a thread-safe way all manners of
140  * concurrent flushes, seeks, pad additions and removals, leaving to the
141  * subclass the responsibility of clipping buffers, and aggregating buffers in
142  * the way the implementor sees fit.
143  *
144  * It will also take care of event ordering (stream-start, segment, eos).
145  *
146  * Basically, a simple implementation will override @aggregate, and call
147  * _finish_buffer from inside that function.
148  */
149 struct GstAggregatorClass
150 {
151 	GstElementClass parentClass;
152 	/** */
153 	extern(C) GstFlowReturn function(GstAggregator* aggregator) flush;
154 	/** */
155 	extern(C) GstBuffer* function(GstAggregator* aggregator, GstAggregatorPad* aggregatorPad, GstBuffer* buf) clip;
156 	/** */
157 	extern(C) GstFlowReturn function(GstAggregator* aggregator, GstBuffer* buffer) finishBuffer;
158 	/** */
159 	extern(C) int function(GstAggregator* aggregator, GstAggregatorPad* aggregatorPad, GstEvent* event) sinkEvent;
160 	/** */
161 	extern(C) int function(GstAggregator* aggregator, GstAggregatorPad* aggregatorPad, GstQuery* query) sinkQuery;
162 	/** */
163 	extern(C) int function(GstAggregator* aggregator, GstEvent* event) srcEvent;
164 	/** */
165 	extern(C) int function(GstAggregator* aggregator, GstQuery* query) srcQuery;
166 	/** */
167 	extern(C) int function(GstAggregator* aggregator, GstPadMode mode, int active) srcActivate;
168 	/** */
169 	extern(C) GstFlowReturn function(GstAggregator* aggregator, int timeout) aggregate;
170 	/** */
171 	extern(C) int function(GstAggregator* aggregator) stop;
172 	/** */
173 	extern(C) int function(GstAggregator* aggregator) start;
174 	/** */
175 	extern(C) GstClockTime function(GstAggregator* aggregator) getNextTime;
176 	/** */
177 	extern(C) GstAggregatorPad* function(GstAggregator* self, GstPadTemplate* templ, const(char)* reqName, GstCaps* caps) createNewPad;
178 	/** */
179 	extern(C) GstFlowReturn function(GstAggregator* self, GstCaps* caps, GstCaps** ret) updateSrcCaps;
180 	/** */
181 	extern(C) GstCaps* function(GstAggregator* self, GstCaps* caps) fixateSrcCaps;
182 	/** */
183 	extern(C) int function(GstAggregator* self, GstCaps* caps) negotiatedSrcCaps;
184 	/** */
185 	extern(C) int function(GstAggregator* self, GstQuery* query) decideAllocation;
186 	/** */
187 	extern(C) int function(GstAggregator* self, GstAggregatorPad* pad, GstQuery* decideQuery, GstQuery* query) proposeAllocation;
188 	void*[20] GstReserved;
189 }
190 
191 struct GstAggregatorPad
192 {
193 	GstPad parent;
194 	/**
195 	 * last segment received.
196 	 */
197 	GstSegment segment;
198 	GstAggregatorPadPrivate* priv;
199 	void*[4] GstReserved;
200 }
201 
202 struct GstAggregatorPadClass
203 {
204 	GstPadClass parentClass;
205 	/** */
206 	extern(C) GstFlowReturn function(GstAggregatorPad* aggpad, GstAggregator* aggregator) flush;
207 	/** */
208 	extern(C) int function(GstAggregatorPad* aggpad, GstAggregator* aggregator, GstBuffer* buffer) skipBuffer;
209 	void*[20] GstReserved;
210 }
211 
212 struct GstAggregatorPadPrivate;
213 
214 struct GstAggregatorPrivate;
215 
216 struct GstBaseParse
217 {
218 	/**
219 	 * the parent element.
220 	 */
221 	GstElement element;
222 	GstPad* sinkpad;
223 	GstPad* srcpad;
224 	uint flags;
225 	GstSegment segment;
226 	void*[20] GstReserved;
227 	GstBaseParsePrivate* priv;
228 }
229 
230 /**
231  * Subclasses can override any of the available virtual methods or not, as
232  * needed. At minimum @handle_frame needs to be overridden.
233  */
234 struct GstBaseParseClass
235 {
236 	/**
237 	 * the parent class
238 	 */
239 	GstElementClass parentClass;
240 	/** */
241 	extern(C) int function(GstBaseParse* parse) start;
242 	/** */
243 	extern(C) int function(GstBaseParse* parse) stop;
244 	/** */
245 	extern(C) int function(GstBaseParse* parse, GstCaps* caps) setSinkCaps;
246 	/** */
247 	extern(C) GstFlowReturn function(GstBaseParse* parse, GstBaseParseFrame* frame, int* skipsize) handleFrame;
248 	/** */
249 	extern(C) GstFlowReturn function(GstBaseParse* parse, GstBaseParseFrame* frame) prePushFrame;
250 	/** */
251 	extern(C) int function(GstBaseParse* parse, GstFormat srcFormat, long srcValue, GstFormat destFormat, long* destValue) convert;
252 	/** */
253 	extern(C) int function(GstBaseParse* parse, GstEvent* event) sinkEvent;
254 	/** */
255 	extern(C) int function(GstBaseParse* parse, GstEvent* event) srcEvent;
256 	/** */
257 	extern(C) GstCaps* function(GstBaseParse* parse, GstCaps* filter) getSinkCaps;
258 	/** */
259 	extern(C) GstFlowReturn function(GstBaseParse* parse, GstBuffer* buffer) detect;
260 	/** */
261 	extern(C) int function(GstBaseParse* parse, GstQuery* query) sinkQuery;
262 	/** */
263 	extern(C) int function(GstBaseParse* parse, GstQuery* query) srcQuery;
264 	void*[18] GstReserved;
265 }
266 
267 struct GstBaseParseFrame
268 {
269 	/**
270 	 * input data to be parsed for frames.
271 	 */
272 	GstBuffer* buffer;
273 	/**
274 	 * output data.
275 	 */
276 	GstBuffer* outBuffer;
277 	/**
278 	 * a combination of input and output #GstBaseParseFrameFlags that
279 	 * convey additional context to subclass or allow subclass to tune
280 	 * subsequent #GstBaseParse actions.
281 	 */
282 	uint flags;
283 	/**
284 	 * media specific offset of input frame
285 	 * Note that a converter may have a different one on the frame's buffer.
286 	 */
287 	ulong offset;
288 	/**
289 	 * subclass can set this to indicates the metadata overhead
290 	 * for the given frame, which is then used to enable more accurate bitrate
291 	 * computations. If this is -1, it is assumed that this frame should be
292 	 * skipped in bitrate calculation.
293 	 */
294 	int overhead;
295 	int size;
296 	uint[2] GstReservedI;
297 	void*[2] GstReservedP;
298 	uint PrivateFlags;
299 }
300 
301 struct GstBaseParsePrivate;
302 
303 struct GstBaseSink
304 {
305 	GstElement element;
306 	GstPad* sinkpad;
307 	GstPadMode padMode;
308 	ulong offset;
309 	bool canActivatePull;
310 	bool canActivatePush;
311 	GMutex prerollLock;
312 	GCond prerollCond;
313 	bool eos;
314 	bool needPreroll;
315 	bool havePreroll;
316 	bool playingAsync;
317 	bool haveNewsegment;
318 	GstSegment segment;
319 	GstClockID clockId;
320 	bool sync;
321 	bool flushing;
322 	bool running;
323 	long maxLateness;
324 	GstBaseSinkPrivate* priv;
325 	void*[20] GstReserved;
326 }
327 
328 /**
329  * Subclasses can override any of the available virtual methods or not, as
330  * needed. At the minimum, the @render method should be overridden to
331  * output/present buffers.
332  */
333 struct GstBaseSinkClass
334 {
335 	/**
336 	 * Element parent class
337 	 */
338 	GstElementClass parentClass;
339 	/** */
340 	extern(C) GstCaps* function(GstBaseSink* sink, GstCaps* filter) getCaps;
341 	/** */
342 	extern(C) int function(GstBaseSink* sink, GstCaps* caps) setCaps;
343 	/** */
344 	extern(C) GstCaps* function(GstBaseSink* sink, GstCaps* caps) fixate;
345 	/** */
346 	extern(C) int function(GstBaseSink* sink, int active) activatePull;
347 	/** */
348 	extern(C) void function(GstBaseSink* sink, GstBuffer* buffer, GstClockTime* start, GstClockTime* end) getTimes;
349 	/** */
350 	extern(C) int function(GstBaseSink* sink, GstQuery* query) proposeAllocation;
351 	/** */
352 	extern(C) int function(GstBaseSink* sink) start;
353 	/** */
354 	extern(C) int function(GstBaseSink* sink) stop;
355 	/** */
356 	extern(C) int function(GstBaseSink* sink) unlock;
357 	/** */
358 	extern(C) int function(GstBaseSink* sink) unlockStop;
359 	/** */
360 	extern(C) int function(GstBaseSink* sink, GstQuery* query) query;
361 	/** */
362 	extern(C) int function(GstBaseSink* sink, GstEvent* event) event;
363 	/** */
364 	extern(C) GstFlowReturn function(GstBaseSink* sink, GstEvent* event) waitEvent;
365 	/** */
366 	extern(C) GstFlowReturn function(GstBaseSink* sink, GstBuffer* buffer) prepare;
367 	/** */
368 	extern(C) GstFlowReturn function(GstBaseSink* sink, GstBufferList* bufferList) prepareList;
369 	/** */
370 	extern(C) GstFlowReturn function(GstBaseSink* sink, GstBuffer* buffer) preroll;
371 	/** */
372 	extern(C) GstFlowReturn function(GstBaseSink* sink, GstBuffer* buffer) render;
373 	/** */
374 	extern(C) GstFlowReturn function(GstBaseSink* sink, GstBufferList* bufferList) renderList;
375 	void*[20] GstReserved;
376 }
377 
378 struct GstBaseSinkPrivate;
379 
380 struct GstBaseSrc
381 {
382 	GstElement element;
383 	GstPad* srcpad;
384 	GMutex liveLock;
385 	GCond liveCond;
386 	bool isLive;
387 	bool liveRunning;
388 	uint blocksize;
389 	bool canActivatePush;
390 	bool randomAccess;
391 	GstClockID clockId;
392 	GstSegment segment;
393 	bool needNewsegment;
394 	int numBuffers;
395 	int numBuffersLeft;
396 	bool typefind;
397 	bool running;
398 	GstEvent* pendingSeek;
399 	GstBaseSrcPrivate* priv;
400 	void*[20] GstReserved;
401 }
402 
403 /**
404  * Subclasses can override any of the available virtual methods or not, as
405  * needed. At the minimum, the @create method should be overridden to produce
406  * buffers.
407  */
408 struct GstBaseSrcClass
409 {
410 	/**
411 	 * Element parent class
412 	 */
413 	GstElementClass parentClass;
414 	/** */
415 	extern(C) GstCaps* function(GstBaseSrc* src, GstCaps* filter) getCaps;
416 	/** */
417 	extern(C) int function(GstBaseSrc* src) negotiate;
418 	/** */
419 	extern(C) GstCaps* function(GstBaseSrc* src, GstCaps* caps) fixate;
420 	/**
421 	 *
422 	 * Params:
423 	 *     src = a #GstBaseSrc
424 	 *     caps = a #GstCaps
425 	 * Returns: %TRUE if the caps could be set
426 	 */
427 	extern(C) int function(GstBaseSrc* src, GstCaps* caps) setCaps;
428 	/** */
429 	extern(C) int function(GstBaseSrc* src, GstQuery* query) decideAllocation;
430 	/** */
431 	extern(C) int function(GstBaseSrc* src) start;
432 	/** */
433 	extern(C) int function(GstBaseSrc* src) stop;
434 	/** */
435 	extern(C) void function(GstBaseSrc* src, GstBuffer* buffer, GstClockTime* start, GstClockTime* end) getTimes;
436 	/** */
437 	extern(C) int function(GstBaseSrc* src, ulong* size) getSize;
438 	/** */
439 	extern(C) int function(GstBaseSrc* src) isSeekable;
440 	/** */
441 	extern(C) int function(GstBaseSrc* src, GstEvent* seek, GstSegment* segment) prepareSeekSegment;
442 	/** */
443 	extern(C) int function(GstBaseSrc* src, GstSegment* segment) doSeek;
444 	/** */
445 	extern(C) int function(GstBaseSrc* src) unlock;
446 	/** */
447 	extern(C) int function(GstBaseSrc* src) unlockStop;
448 	/** */
449 	extern(C) int function(GstBaseSrc* src, GstQuery* query) query;
450 	/** */
451 	extern(C) int function(GstBaseSrc* src, GstEvent* event) event;
452 	/** */
453 	extern(C) GstFlowReturn function(GstBaseSrc* src, ulong offset, uint size, GstBuffer** buf) create;
454 	/** */
455 	extern(C) GstFlowReturn function(GstBaseSrc* src, ulong offset, uint size, GstBuffer** buf) alloc;
456 	/** */
457 	extern(C) GstFlowReturn function(GstBaseSrc* src, ulong offset, uint size, GstBuffer* buf) fill;
458 	void*[20] GstReserved;
459 }
460 
461 struct GstBaseSrcPrivate;
462 
463 struct GstBaseTransform
464 {
465 	GstElement element;
466 	GstPad* sinkpad;
467 	GstPad* srcpad;
468 	bool haveSegment;
469 	GstSegment segment;
470 	GstBuffer* queuedBuf;
471 	GstBaseTransformPrivate* priv;
472 	void*[19] GstReserved;
473 }
474 
475 /**
476  * Subclasses can override any of the available virtual methods or not, as
477  * needed. At minimum either @transform or @transform_ip need to be overridden.
478  * If the element can overwrite the input data with the results (data is of the
479  * same type and quantity) it should provide @transform_ip.
480  */
481 struct GstBaseTransformClass
482 {
483 	/**
484 	 * Element parent class
485 	 */
486 	GstElementClass parentClass;
487 	/**
488 	 * If set to %TRUE, passthrough mode will be
489 	 * automatically enabled if the caps are the same.
490 	 * Set to %FALSE by default.
491 	 */
492 	bool passthroughOnSameCaps;
493 	/**
494 	 * If set to %TRUE, @transform_ip will be called in
495 	 * passthrough mode. The passed buffer might not be
496 	 * writable. When %FALSE, neither @transform nor
497 	 * @transform_ip will be called in passthrough mode.
498 	 * Set to %TRUE by default.
499 	 */
500 	bool transformIpOnPassthrough;
501 	/** */
502 	extern(C) GstCaps* function(GstBaseTransform* trans, GstPadDirection direction, GstCaps* caps, GstCaps* filter) transformCaps;
503 	/** */
504 	extern(C) GstCaps* function(GstBaseTransform* trans, GstPadDirection direction, GstCaps* caps, GstCaps* othercaps) fixateCaps;
505 	/** */
506 	extern(C) int function(GstBaseTransform* trans, GstPadDirection direction, GstCaps* caps) acceptCaps;
507 	/** */
508 	extern(C) int function(GstBaseTransform* trans, GstCaps* incaps, GstCaps* outcaps) setCaps;
509 	/** */
510 	extern(C) int function(GstBaseTransform* trans, GstPadDirection direction, GstQuery* query) query;
511 	/** */
512 	extern(C) int function(GstBaseTransform* trans, GstQuery* query) decideAllocation;
513 	/** */
514 	extern(C) int function(GstBaseTransform* trans, GstQuery* query, GType api, GstStructure* params) filterMeta;
515 	/** */
516 	extern(C) int function(GstBaseTransform* trans, GstQuery* decideQuery, GstQuery* query) proposeAllocation;
517 	/** */
518 	extern(C) int function(GstBaseTransform* trans, GstPadDirection direction, GstCaps* caps, size_t size, GstCaps* othercaps, size_t* othersize) transformSize;
519 	/** */
520 	extern(C) int function(GstBaseTransform* trans, GstCaps* caps, size_t* size) getUnitSize;
521 	/** */
522 	extern(C) int function(GstBaseTransform* trans) start;
523 	/** */
524 	extern(C) int function(GstBaseTransform* trans) stop;
525 	/** */
526 	extern(C) int function(GstBaseTransform* trans, GstEvent* event) sinkEvent;
527 	/** */
528 	extern(C) int function(GstBaseTransform* trans, GstEvent* event) srcEvent;
529 	/** */
530 	extern(C) GstFlowReturn function(GstBaseTransform* trans, GstBuffer* input, GstBuffer** outbuf) prepareOutputBuffer;
531 	/** */
532 	extern(C) int function(GstBaseTransform* trans, GstBuffer* input, GstBuffer* outbuf) copyMetadata;
533 	/** */
534 	extern(C) int function(GstBaseTransform* trans, GstBuffer* outbuf, GstMeta* meta, GstBuffer* inbuf) transformMeta;
535 	/** */
536 	extern(C) void function(GstBaseTransform* trans, GstBuffer* buffer) beforeTransform;
537 	/** */
538 	extern(C) GstFlowReturn function(GstBaseTransform* trans, GstBuffer* inbuf, GstBuffer* outbuf) transform;
539 	/** */
540 	extern(C) GstFlowReturn function(GstBaseTransform* trans, GstBuffer* buf) transformIp;
541 	/** */
542 	extern(C) GstFlowReturn function(GstBaseTransform* trans, int isDiscont, GstBuffer* input) submitInputBuffer;
543 	/** */
544 	extern(C) GstFlowReturn function(GstBaseTransform* trans, GstBuffer** outbuf) generateOutput;
545 	void*[18] GstReserved;
546 }
547 
548 struct GstBaseTransformPrivate;
549 
550 struct GstBitReader
551 {
552 	/**
553 	 * Data from which the bit reader will
554 	 * read
555 	 */
556 	ubyte* data;
557 	/**
558 	 * Size of @data in bytes
559 	 */
560 	uint size;
561 	/**
562 	 * Current byte position
563 	 */
564 	uint byte_;
565 	/**
566 	 * Bit position in the current byte
567 	 */
568 	uint bit;
569 	void*[4] GstReserved;
570 }
571 
572 struct GstBitWriter
573 {
574 	/**
575 	 * Allocated @data for bit writer to write
576 	 */
577 	ubyte* data;
578 	/**
579 	 * Size of written @data in bits
580 	 */
581 	uint bitSize;
582 	uint bitCapacity;
583 	bool autoGrow;
584 	bool owned;
585 	void*[4] GstReserved;
586 }
587 
588 struct GstByteReader
589 {
590 	/**
591 	 * Data from which the bit reader will
592 	 * read
593 	 */
594 	ubyte* data;
595 	/**
596 	 * Size of @data in bytes
597 	 */
598 	uint size;
599 	/**
600 	 * Current byte position
601 	 */
602 	uint byte_;
603 	void*[4] GstReserved;
604 }
605 
606 struct GstByteWriter
607 {
608 	/**
609 	 * #GstByteReader parent
610 	 */
611 	GstByteReader parent;
612 	/**
613 	 * Allocation size of the data
614 	 */
615 	uint allocSize;
616 	/**
617 	 * If %TRUE no reallocations are allowed
618 	 */
619 	bool fixed;
620 	/**
621 	 * If %FALSE no reallocations are allowed and copies of data are returned
622 	 */
623 	bool owned;
624 	void*[4] GstReserved;
625 }
626 
627 /**
628  * Structure used by the collect_pads.
629  */
630 struct GstCollectData
631 {
632 	/**
633 	 * owner #GstCollectPads
634 	 */
635 	GstCollectPads* collect;
636 	/**
637 	 * #GstPad managed by this data
638 	 */
639 	GstPad* pad;
640 	/**
641 	 * currently queued buffer.
642 	 */
643 	GstBuffer* buffer;
644 	/**
645 	 * position in the buffer
646 	 */
647 	uint pos;
648 	/**
649 	 * last segment received.
650 	 */
651 	GstSegment segment;
652 	GstCollectPadsStateFlags state;
653 	GstCollectDataPrivate* priv;
654 	union ABI
655 	{
656 		struct Abi
657 		{
658 			long dts;
659 		}
660 		Abi abi;
661 		void*[4] GstReserved;
662 	}
663 	ABI abi;
664 }
665 
666 struct GstCollectDataPrivate;
667 
668 struct GstCollectPads
669 {
670 	GstObject object;
671 	/**
672 	 * #GList of #GstCollectData managed
673 	 * by this #GstCollectPads.
674 	 */
675 	GSList* data;
676 	GRecMutex streamLock;
677 	GstCollectPadsPrivate* priv;
678 	void*[4] GstReserved;
679 }
680 
681 struct GstCollectPadsClass
682 {
683 	GstObjectClass parentClass;
684 	void*[4] GstReserved;
685 }
686 
687 struct GstCollectPadsPrivate;
688 
689 struct GstDataQueue
690 {
691 	/**
692 	 * the parent structure
693 	 */
694 	GObject object;
695 	GstDataQueuePrivate* priv;
696 	void*[4] GstReserved;
697 }
698 
699 struct GstDataQueueClass
700 {
701 	GObjectClass parentClass;
702 	/** */
703 	extern(C) void function(GstDataQueue* queue) empty;
704 	/** */
705 	extern(C) void function(GstDataQueue* queue) full;
706 	void*[4] GstReserved;
707 }
708 
709 /**
710  * Structure used by #GstDataQueue. You can supply a different structure, as
711  * long as the top of the structure is identical to this structure.
712  */
713 struct GstDataQueueItem
714 {
715 	/**
716 	 * the #GstMiniObject to queue.
717 	 */
718 	GstMiniObject* object;
719 	/**
720 	 * the size in bytes of the miniobject.
721 	 */
722 	uint size;
723 	/**
724 	 * the duration in #GstClockTime of the miniobject. Can not be
725 	 * %GST_CLOCK_TIME_NONE.
726 	 */
727 	ulong duration;
728 	/**
729 	 * %TRUE if @object should be considered as a visible object.
730 	 */
731 	bool visible;
732 	/**
733 	 * The #GDestroyNotify function to use to free the #GstDataQueueItem.
734 	 * This function should also drop the reference to @object the owner of the
735 	 * #GstDataQueueItem is assumed to hold.
736 	 */
737 	GDestroyNotify destroy;
738 	void*[4] GstReserved;
739 }
740 
741 struct GstDataQueuePrivate;
742 
743 /**
744  * Structure describing the size of a queue.
745  */
746 struct GstDataQueueSize
747 {
748 	/**
749 	 * number of buffers
750 	 */
751 	uint visible;
752 	/**
753 	 * number of bytes
754 	 */
755 	uint bytes;
756 	/**
757 	 * amount of time
758 	 */
759 	ulong time;
760 }
761 
762 struct GstFlowCombiner;
763 
764 struct GstPushSrc
765 {
766 	GstBaseSrc parent;
767 	void*[4] GstReserved;
768 }
769 
770 /**
771  * Subclasses can override any of the available virtual methods or not, as
772  * needed. At the minimum, the @fill method should be overridden to produce
773  * buffers.
774  */
775 struct GstPushSrcClass
776 {
777 	/**
778 	 * Element parent class
779 	 */
780 	GstBaseSrcClass parentClass;
781 	/** */
782 	extern(C) GstFlowReturn function(GstPushSrc* src, GstBuffer** buf) create;
783 	/** */
784 	extern(C) GstFlowReturn function(GstPushSrc* src, GstBuffer** buf) alloc;
785 	/** */
786 	extern(C) GstFlowReturn function(GstPushSrc* src, GstBuffer* buf) fill;
787 	void*[4] GstReserved;
788 }
789 
790 struct GstQueueArray;
791 
792 /**
793  * A function that will be called when the #GstCollectData will be freed.
794  * It is passed the pointer to the structure and should free any custom
795  * memory and resources allocated for it.
796  *
797  * Params:
798  *     data = the #GstCollectData that will be freed
799  */
800 public alias extern(C) void function(GstCollectData* data) GstCollectDataDestroyNotify;
801 
802 /**
803  * A function that will be called when a (considered oldest) buffer can be muxed.
804  * If all pads have reached EOS, this function is called with %NULL @buffer
805  * and %NULL @data.
806  *
807  * Params:
808  *     pads = the #GstCollectPads that triggered the callback
809  *     data = the #GstCollectData of pad that has received the buffer
810  *     buffer = the #GstBuffer
811  *     userData = user data passed to gst_collect_pads_set_buffer_function()
812  *
813  * Returns: %GST_FLOW_OK for success
814  */
815 public alias extern(C) GstFlowReturn function(GstCollectPads* pads, GstCollectData* data, GstBuffer* buffer, void* userData) GstCollectPadsBufferFunction;
816 
817 /**
818  * A function that will be called when @inbuffer is received on the pad managed
819  * by @data in the collectpad object @pads.
820  *
821  * The function should use the segment of @data and the negotiated media type on
822  * the pad to perform clipping of @inbuffer.
823  *
824  * This function takes ownership of @inbuffer and should output a buffer in
825  * @outbuffer or return %NULL in @outbuffer if the buffer should be dropped.
826  *
827  * Params:
828  *     pads = a #GstCollectPads
829  *     data = a #GstCollectData
830  *     inbuffer = the input #GstBuffer
831  *     outbuffer = the output #GstBuffer
832  *     userData = user data
833  *
834  * Returns: a #GstFlowReturn that corresponds to the result of clipping.
835  */
836 public alias extern(C) GstFlowReturn function(GstCollectPads* pads, GstCollectData* data, GstBuffer* inbuffer, GstBuffer** outbuffer, void* userData) GstCollectPadsClipFunction;
837 
838 /**
839  * A function for comparing two timestamps of buffers or newsegments collected on one pad.
840  *
841  * Params:
842  *     pads = the #GstCollectPads that is comparing the timestamps
843  *     data1 = the first #GstCollectData
844  *     timestamp1 = the first timestamp
845  *     data2 = the second #GstCollectData
846  *     timestamp2 = the second timestamp
847  *     userData = user data passed to gst_collect_pads_set_compare_function()
848  *
849  * Returns: Integer less than zero when first timestamp is deemed older than the second one.
850  *     Zero if the timestamps are deemed equally old.
851  *     Integer greater than zero when second timestamp is deemed older than the first one.
852  */
853 public alias extern(C) int function(GstCollectPads* pads, GstCollectData* data1, GstClockTime timestamp1, GstCollectData* data2, GstClockTime timestamp2, void* userData) GstCollectPadsCompareFunction;
854 
855 /**
856  * A function that will be called while processing an event. It takes
857  * ownership of the event and is responsible for chaining up (to
858  * gst_collect_pads_event_default()) or dropping events (such typical cases
859  * being handled by the default handler).
860  *
861  * Params:
862  *     pads = the #GstCollectPads that triggered the callback
863  *     pad = the #GstPad that received an event
864  *     event = the #GstEvent received
865  *     userData = user data passed to gst_collect_pads_set_event_function()
866  *
867  * Returns: %TRUE if the pad could handle the event
868  */
869 public alias extern(C) int function(GstCollectPads* pads, GstCollectData* pad, GstEvent* event, void* userData) GstCollectPadsEventFunction;
870 
871 /**
872  * A function that will be called while processing a flushing seek event.
873  *
874  * The function should flush any internal state of the element and the state of
875  * all the pads. It should clear only the state not directly managed by the
876  * @pads object. It is therefore not necessary to call
877  * gst_collect_pads_set_flushing nor gst_collect_pads_clear from this function.
878  *
879  * Params:
880  *     pads = a #GstCollectPads
881  *     userData = user data
882  *
883  * Since: 1.4
884  */
885 public alias extern(C) void function(GstCollectPads* pads, void* userData) GstCollectPadsFlushFunction;
886 
887 /**
888  * A function that will be called when all pads have received data.
889  *
890  * Params:
891  *     pads = the #GstCollectPads that triggered the callback
892  *     userData = user data passed to gst_collect_pads_set_function()
893  *
894  * Returns: %GST_FLOW_OK for success
895  */
896 public alias extern(C) GstFlowReturn function(GstCollectPads* pads, void* userData) GstCollectPadsFunction;
897 
898 /**
899  * A function that will be called while processing a query. It takes
900  * ownership of the query and is responsible for chaining up (to
901  * events downstream (with gst_pad_event_default()).
902  *
903  * Params:
904  *     pads = the #GstCollectPads that triggered the callback
905  *     pad = the #GstPad that received an event
906  *     query = the #GstEvent received
907  *     userData = user data passed to gst_collect_pads_set_query_function()
908  *
909  * Returns: %TRUE if the pad could handle the event
910  */
911 public alias extern(C) int function(GstCollectPads* pads, GstCollectData* pad, GstQuery* query, void* userData) GstCollectPadsQueryFunction;
912 
913 /**
914  * The prototype of the function used to inform the queue that it should be
915  * considered as full.
916  *
917  * Params:
918  *     queue = a #GstDataQueue.
919  *     visible = The number of visible items currently in the queue.
920  *     bytes = The amount of bytes currently in the queue.
921  *     time = The accumulated duration of the items currently in the queue.
922  *     checkdata = The #gpointer registered when the #GstDataQueue was created.
923  *
924  * Returns: %TRUE if the queue should be considered full.
925  */
926 public alias extern(C) int function(GstDataQueue* queue, uint visible, uint bytes, ulong time, void* checkdata) GstDataQueueCheckFullFunction;
927 
928 /** */
929 public alias extern(C) void function(GstDataQueue* queue, void* checkdata) GstDataQueueEmptyCallback;
930 
931 /** */
932 public alias extern(C) void function(GstDataQueue* queue, void* checkdata) GstDataQueueFullCallback;
933 
934 /**
935  * This function will be called by gst_type_find_helper_get_range() when
936  * typefinding functions request to peek at the data of a stream at certain
937  * offsets. If this function returns GST_FLOW_OK, the result buffer will be
938  * stored in @buffer. The  contents of @buffer is invalid for any other
939  * return value.
940  *
941  * This function is supposed to behave exactly like a #GstPadGetRangeFunction.
942  *
943  * Params:
944  *     obj = a #GstObject that will handle the getrange request
945  *     parent = the parent of @obj or %NULL
946  *     offset = the offset of the range
947  *     length = the length of the range
948  *     buffer = a memory location to hold the result buffer
949  *
950  * Returns: GST_FLOW_OK for success
951  */
952 public alias extern(C) GstFlowReturn function(GstObject* obj, GstObject* parent, ulong offset, uint length, GstBuffer** buffer) GstTypeFindHelperGetRangeFunction;
953 
954 enum BASE_PARSE_FLAG_DRAINING = 2;
955 alias GST_BASE_PARSE_FLAG_DRAINING = BASE_PARSE_FLAG_DRAINING;
956 
957 enum BASE_PARSE_FLAG_LOST_SYNC = 1;
958 alias GST_BASE_PARSE_FLAG_LOST_SYNC = BASE_PARSE_FLAG_LOST_SYNC;
959 
960 /**
961  * The name of the templates for the sink pad.
962  */
963 enum BASE_TRANSFORM_SINK_NAME = "sink";
964 alias GST_BASE_TRANSFORM_SINK_NAME = BASE_TRANSFORM_SINK_NAME;
965 
966 /**
967  * The name of the templates for the source pad.
968  */
969 enum BASE_TRANSFORM_SRC_NAME = "src";
970 alias GST_BASE_TRANSFORM_SRC_NAME = BASE_TRANSFORM_SRC_NAME;