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