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 GstByteReader 573 { 574 /** 575 * Data from which the bit reader will 576 * read 577 */ 578 ubyte* data; 579 /** 580 * Size of @data in bytes 581 */ 582 uint size; 583 /** 584 * Current byte position 585 */ 586 uint _byte; 587 void*[4] GstReserved; 588 } 589 590 struct GstByteWriter 591 { 592 /** 593 * #GstByteReader parent 594 */ 595 GstByteReader parent; 596 /** 597 * Allocation size of the data 598 */ 599 uint allocSize; 600 /** 601 * If %TRUE no reallocations are allowed 602 */ 603 bool fixed; 604 /** 605 * If %FALSE no reallocations are allowed and copies of data are returned 606 */ 607 bool owned; 608 void*[4] GstReserved; 609 } 610 611 /** 612 * Structure used by the collect_pads. 613 */ 614 struct GstCollectData 615 { 616 /** 617 * owner #GstCollectPads 618 */ 619 GstCollectPads* collect; 620 /** 621 * #GstPad managed by this data 622 */ 623 GstPad* pad; 624 /** 625 * currently queued buffer. 626 */ 627 GstBuffer* buffer; 628 /** 629 * position in the buffer 630 */ 631 uint pos; 632 /** 633 * last segment received. 634 */ 635 GstSegment segment; 636 GstCollectPadsStateFlags state; 637 GstCollectDataPrivate* priv; 638 union ABI 639 { 640 struct Abi 641 { 642 long dts; 643 } 644 Abi abi; 645 void*[4] GstReserved; 646 } 647 ABI abi; 648 } 649 650 struct GstCollectDataPrivate; 651 652 struct GstCollectPads 653 { 654 GstObject object; 655 /** 656 * #GList of #GstCollectData managed 657 * by this #GstCollectPads. 658 */ 659 GSList* data; 660 GRecMutex streamLock; 661 GstCollectPadsPrivate* priv; 662 void*[4] GstReserved; 663 } 664 665 struct GstCollectPadsClass 666 { 667 GstObjectClass parentClass; 668 void*[4] GstReserved; 669 } 670 671 struct GstCollectPadsPrivate; 672 673 struct GstDataQueue 674 { 675 /** 676 * the parent structure 677 */ 678 GObject object; 679 GstDataQueuePrivate* priv; 680 void*[4] GstReserved; 681 } 682 683 struct GstDataQueueClass 684 { 685 GObjectClass parentClass; 686 /** */ 687 extern(C) void function(GstDataQueue* queue) empty; 688 /** */ 689 extern(C) void function(GstDataQueue* queue) full; 690 void*[4] GstReserved; 691 } 692 693 /** 694 * Structure used by #GstDataQueue. You can supply a different structure, as 695 * long as the top of the structure is identical to this structure. 696 */ 697 struct GstDataQueueItem 698 { 699 /** 700 * the #GstMiniObject to queue. 701 */ 702 GstMiniObject* object; 703 /** 704 * the size in bytes of the miniobject. 705 */ 706 uint size; 707 /** 708 * the duration in #GstClockTime of the miniobject. Can not be 709 * %GST_CLOCK_TIME_NONE. 710 */ 711 ulong duration; 712 /** 713 * %TRUE if @object should be considered as a visible object. 714 */ 715 bool visible; 716 /** 717 * The #GDestroyNotify function to use to free the #GstDataQueueItem. 718 * This function should also drop the reference to @object the owner of the 719 * #GstDataQueueItem is assumed to hold. 720 */ 721 GDestroyNotify destroy; 722 void*[4] GstReserved; 723 } 724 725 struct GstDataQueuePrivate; 726 727 /** 728 * Structure describing the size of a queue. 729 */ 730 struct GstDataQueueSize 731 { 732 /** 733 * number of buffers 734 */ 735 uint visible; 736 /** 737 * number of bytes 738 */ 739 uint bytes; 740 /** 741 * amount of time 742 */ 743 ulong time; 744 } 745 746 struct GstFlowCombiner; 747 748 struct GstPushSrc 749 { 750 GstBaseSrc parent; 751 void*[4] GstReserved; 752 } 753 754 /** 755 * Subclasses can override any of the available virtual methods or not, as 756 * needed. At the minimum, the @fill method should be overridden to produce 757 * buffers. 758 */ 759 struct GstPushSrcClass 760 { 761 /** 762 * Element parent class 763 */ 764 GstBaseSrcClass parentClass; 765 /** */ 766 extern(C) GstFlowReturn function(GstPushSrc* src, GstBuffer** buf) create; 767 /** */ 768 extern(C) GstFlowReturn function(GstPushSrc* src, GstBuffer** buf) alloc; 769 /** */ 770 extern(C) GstFlowReturn function(GstPushSrc* src, GstBuffer* buf) fill; 771 void*[4] GstReserved; 772 } 773 774 struct GstQueueArray; 775 776 /** 777 * A function that will be called when the #GstCollectData will be freed. 778 * It is passed the pointer to the structure and should free any custom 779 * memory and resources allocated for it. 780 * 781 * Params: 782 * data = the #GstCollectData that will be freed 783 */ 784 public alias extern(C) void function(GstCollectData* data) GstCollectDataDestroyNotify; 785 786 /** 787 * A function that will be called when a (considered oldest) buffer can be muxed. 788 * If all pads have reached EOS, this function is called with %NULL @buffer 789 * and %NULL @data. 790 * 791 * Params: 792 * pads = the #GstCollectPads that triggered the callback 793 * data = the #GstCollectData of pad that has received the buffer 794 * buffer = the #GstBuffer 795 * userData = user data passed to gst_collect_pads_set_buffer_function() 796 * 797 * Returns: %GST_FLOW_OK for success 798 */ 799 public alias extern(C) GstFlowReturn function(GstCollectPads* pads, GstCollectData* data, GstBuffer* buffer, void* userData) GstCollectPadsBufferFunction; 800 801 /** 802 * A function that will be called when @inbuffer is received on the pad managed 803 * by @data in the collectpad object @pads. 804 * 805 * The function should use the segment of @data and the negotiated media type on 806 * the pad to perform clipping of @inbuffer. 807 * 808 * This function takes ownership of @inbuffer and should output a buffer in 809 * @outbuffer or return %NULL in @outbuffer if the buffer should be dropped. 810 * 811 * Params: 812 * pads = a #GstCollectPads 813 * data = a #GstCollectData 814 * inbuffer = the input #GstBuffer 815 * outbuffer = the output #GstBuffer 816 * userData = user data 817 * 818 * Returns: a #GstFlowReturn that corresponds to the result of clipping. 819 */ 820 public alias extern(C) GstFlowReturn function(GstCollectPads* pads, GstCollectData* data, GstBuffer* inbuffer, GstBuffer** outbuffer, void* userData) GstCollectPadsClipFunction; 821 822 /** 823 * A function for comparing two timestamps of buffers or newsegments collected on one pad. 824 * 825 * Params: 826 * pads = the #GstCollectPads that is comparing the timestamps 827 * data1 = the first #GstCollectData 828 * timestamp1 = the first timestamp 829 * data2 = the second #GstCollectData 830 * timestamp2 = the second timestamp 831 * userData = user data passed to gst_collect_pads_set_compare_function() 832 * 833 * Returns: Integer less than zero when first timestamp is deemed older than the second one. 834 * Zero if the timestamps are deemed equally old. 835 * Integer greater than zero when second timestamp is deemed older than the first one. 836 */ 837 public alias extern(C) int function(GstCollectPads* pads, GstCollectData* data1, GstClockTime timestamp1, GstCollectData* data2, GstClockTime timestamp2, void* userData) GstCollectPadsCompareFunction; 838 839 /** 840 * A function that will be called while processing an event. It takes 841 * ownership of the event and is responsible for chaining up (to 842 * gst_collect_pads_event_default()) or dropping events (such typical cases 843 * being handled by the default handler). 844 * 845 * Params: 846 * pads = the #GstCollectPads that triggered the callback 847 * pad = the #GstPad that received an event 848 * event = the #GstEvent received 849 * userData = user data passed to gst_collect_pads_set_event_function() 850 * 851 * Returns: %TRUE if the pad could handle the event 852 */ 853 public alias extern(C) int function(GstCollectPads* pads, GstCollectData* pad, GstEvent* event, void* userData) GstCollectPadsEventFunction; 854 855 /** 856 * A function that will be called while processing a flushing seek event. 857 * 858 * The function should flush any internal state of the element and the state of 859 * all the pads. It should clear only the state not directly managed by the 860 * @pads object. It is therefore not necessary to call 861 * gst_collect_pads_set_flushing nor gst_collect_pads_clear from this function. 862 * 863 * Params: 864 * pads = a #GstCollectPads 865 * userData = user data 866 * 867 * Since: 1.4 868 */ 869 public alias extern(C) void function(GstCollectPads* pads, void* userData) GstCollectPadsFlushFunction; 870 871 /** 872 * A function that will be called when all pads have received data. 873 * 874 * Params: 875 * pads = the #GstCollectPads that triggered the callback 876 * userData = user data passed to gst_collect_pads_set_function() 877 * 878 * Returns: %GST_FLOW_OK for success 879 */ 880 public alias extern(C) GstFlowReturn function(GstCollectPads* pads, void* userData) GstCollectPadsFunction; 881 882 /** 883 * A function that will be called while processing a query. It takes 884 * ownership of the query and is responsible for chaining up (to 885 * events downstream (with gst_pad_event_default()). 886 * 887 * Params: 888 * pads = the #GstCollectPads that triggered the callback 889 * pad = the #GstPad that received an event 890 * query = the #GstEvent received 891 * userData = user data passed to gst_collect_pads_set_query_function() 892 * 893 * Returns: %TRUE if the pad could handle the event 894 */ 895 public alias extern(C) int function(GstCollectPads* pads, GstCollectData* pad, GstQuery* query, void* userData) GstCollectPadsQueryFunction; 896 897 /** 898 * The prototype of the function used to inform the queue that it should be 899 * considered as full. 900 * 901 * Params: 902 * queue = a #GstDataQueue. 903 * visible = The number of visible items currently in the queue. 904 * bytes = The amount of bytes currently in the queue. 905 * time = The accumulated duration of the items currently in the queue. 906 * checkdata = The #gpointer registered when the #GstDataQueue was created. 907 * 908 * Returns: %TRUE if the queue should be considered full. 909 */ 910 public alias extern(C) int function(GstDataQueue* queue, uint visible, uint bytes, ulong time, void* checkdata) GstDataQueueCheckFullFunction; 911 912 /** */ 913 public alias extern(C) void function(GstDataQueue* queue, void* checkdata) GstDataQueueEmptyCallback; 914 915 /** */ 916 public alias extern(C) void function(GstDataQueue* queue, void* checkdata) GstDataQueueFullCallback; 917 918 /** 919 * This function will be called by gst_type_find_helper_get_range() when 920 * typefinding functions request to peek at the data of a stream at certain 921 * offsets. If this function returns GST_FLOW_OK, the result buffer will be 922 * stored in @buffer. The contents of @buffer is invalid for any other 923 * return value. 924 * 925 * This function is supposed to behave exactly like a #GstPadGetRangeFunction. 926 * 927 * Params: 928 * obj = a #GstObject that will handle the getrange request 929 * parent = the parent of @obj or %NULL 930 * offset = the offset of the range 931 * length = the length of the range 932 * buffer = a memory location to hold the result buffer 933 * 934 * Returns: GST_FLOW_OK for success 935 */ 936 public alias extern(C) GstFlowReturn function(GstObject* obj, GstObject* parent, ulong offset, uint length, GstBuffer** buffer) GstTypeFindHelperGetRangeFunction; 937 938 enum BASE_PARSE_FLAG_DRAINING = 2; 939 alias GST_BASE_PARSE_FLAG_DRAINING = BASE_PARSE_FLAG_DRAINING; 940 941 enum BASE_PARSE_FLAG_LOST_SYNC = 1; 942 alias GST_BASE_PARSE_FLAG_LOST_SYNC = BASE_PARSE_FLAG_LOST_SYNC; 943 944 /** 945 * The name of the templates for the sink pad. 946 */ 947 enum BASE_TRANSFORM_SINK_NAME = "sink"; 948 alias GST_BASE_TRANSFORM_SINK_NAME = BASE_TRANSFORM_SINK_NAME; 949 950 /** 951 * The name of the templates for the source pad. 952 */ 953 enum BASE_TRANSFORM_SRC_NAME = "src"; 954 alias GST_BASE_TRANSFORM_SRC_NAME = BASE_TRANSFORM_SRC_NAME;