Gst-1.0.gir 2.18 MB
Newer Older
Sebastian Dröge's avatar
Sebastian Dröge committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations.  -->
<repository version="1.2"
            xmlns="http://www.gtk.org/introspection/core/1.0"
            xmlns:c="http://www.gtk.org/introspection/c/1.0"
            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
  <include name="GLib" version="2.0"/>
  <include name="GModule" version="2.0"/>
  <include name="GObject" version="2.0"/>
  <package name="gstreamer-1.0"/>
  <c:include name="gst/gst.h"/>
  <namespace name="Gst"
             version="1.0"
             shared-library="libgstreamer-1.0.so.0"
             c:identifier-prefixes="Gst"
             c:symbol-prefixes="gst">
    <alias name="ClockID" c:type="GstClockID">
      <doc xml:space="preserve">A datatype to hold the handle to an outstanding sync or async clock callback.</doc>
      <type name="gpointer" c:type="gpointer"/>
    </alias>
    <alias name="ClockTime" c:type="GstClockTime">
      <doc xml:space="preserve">A datatype to hold a time, measured in nanoseconds.</doc>
      <type name="guint64" c:type="guint64"/>
    </alias>
    <alias name="ClockTimeDiff" c:type="GstClockTimeDiff">
      <doc xml:space="preserve">A datatype to hold a time difference, measured in nanoseconds.</doc>
      <type name="gint64" c:type="gint64"/>
    </alias>
    <alias name="ElementFactoryListType" c:type="GstElementFactoryListType">
      <type name="guint64" c:type="guint64"/>
    </alias>
    <constant name="ALLOCATOR_SYSMEM"
              value="SystemMemory"
              c:type="GST_ALLOCATOR_SYSMEM">
      <doc xml:space="preserve">The allocator name for the default system memory allocator</doc>
      <type name="utf8" c:type="gchar*"/>
    </constant>
    <record name="AllocationParams"
            c:type="GstAllocationParams"
            glib:type-name="GstAllocationParams"
            glib:get-type="gst_allocation_params_get_type"
            c:symbol-prefix="allocation_params">
      <doc xml:space="preserve">Parameters to control the allocation of memory</doc>
      <field name="flags" writable="1">
        <doc xml:space="preserve">flags to control allocation</doc>
        <type name="MemoryFlags" c:type="GstMemoryFlags"/>
      </field>
      <field name="align" writable="1">
        <doc xml:space="preserve">the desired alignment of the memory</doc>
        <type name="gsize" c:type="gsize"/>
      </field>
      <field name="prefix" writable="1">
        <doc xml:space="preserve">the desired prefix</doc>
        <type name="gsize" c:type="gsize"/>
      </field>
      <field name="padding" writable="1">
        <doc xml:space="preserve">the desired padding</doc>
        <type name="gsize" c:type="gsize"/>
      </field>
      <field name="_gst_reserved" readable="0" private="1">
        <array zero-terminated="0" c:type="gpointer" fixed-size="4">
          <type name="gpointer" c:type="gpointer"/>
        </array>
      </field>
      <method name="copy" c:identifier="gst_allocation_params_copy">
        <doc xml:space="preserve">Create a copy of @params.

Free-function: gst_allocation_params_free</doc>
71
        <return-value transfer-ownership="full" nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
72 73 74 75 76
          <doc xml:space="preserve">a new ##GstAllocationParams, free with
gst_allocation_params_free().</doc>
          <type name="AllocationParams" c:type="GstAllocationParams*"/>
        </return-value>
        <parameters>
77 78 79 80
          <instance-parameter name="params"
                              transfer-ownership="none"
                              nullable="1"
                              allow-none="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
            <doc xml:space="preserve">a #GstAllocationParams</doc>
            <type name="AllocationParams" c:type="const GstAllocationParams*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="free" c:identifier="gst_allocation_params_free">
        <doc xml:space="preserve">Free @params</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="params" transfer-ownership="full">
            <doc xml:space="preserve">a #GstAllocationParams</doc>
            <type name="AllocationParams" c:type="GstAllocationParams*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="init" c:identifier="gst_allocation_params_init">
        <doc xml:space="preserve">Initialize @params to its default values</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="params" transfer-ownership="none">
            <doc xml:space="preserve">a #GstAllocationParams</doc>
            <type name="AllocationParams" c:type="GstAllocationParams*"/>
          </instance-parameter>
        </parameters>
      </method>
    </record>
    <class name="Allocator"
           c:symbol-prefix="allocator"
           c:type="GstAllocator"
           parent="Object"
           abstract="1"
           glib:type-name="GstAllocator"
           glib:get-type="gst_allocator_get_type"
           glib:type-struct="AllocatorClass">
      <doc xml:space="preserve">Memory is usually created by allocators with a gst_allocator_alloc()
method call. When %NULL is used as the allocator, the default allocator will
be used.

New allocators can be registered with gst_allocator_register().
Allocators are identified by name and can be retrieved with
gst_allocator_find(). gst_allocator_set_default() can be used to change the
default allocator.

New memory can be created with gst_memory_new_wrapped() that wraps the memory
allocated elsewhere.</doc>
      <function name="find" c:identifier="gst_allocator_find">
        <doc xml:space="preserve">Find a previously registered allocator with @name. When @name is %NULL, the
default allocator will be returned.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">a #GstAllocator or %NULL when
the allocator with @name was not registered. Use gst_object_unref()
to release the allocator after usage.</doc>
          <type name="Allocator" c:type="GstAllocator*"/>
        </return-value>
        <parameters>
          <parameter name="name"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">the name of the allocator</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
        </parameters>
      </function>
      <function name="register" c:identifier="gst_allocator_register">
        <doc xml:space="preserve">Registers the memory @allocator with @name. This function takes ownership of
@allocator.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="name" transfer-ownership="none">
            <doc xml:space="preserve">the name of the allocator</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="allocator" transfer-ownership="full">
            <doc xml:space="preserve">#GstAllocator</doc>
            <type name="Allocator" c:type="GstAllocator*"/>
          </parameter>
        </parameters>
      </function>
      <virtual-method name="alloc" invoker="alloc">
        <doc xml:space="preserve">Use @allocator to allocate a new memory block with memory that is at least
@size big.

The optional @params can specify the prefix and padding for the memory. If
%NULL is passed, no flags, no extra prefix/padding and a default alignment is
used.

The prefix/padding will be filled with 0 if flags contains
#GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively.

When @allocator is %NULL, the default allocator will be used.

The alignment in @params is given as a bitmask so that @align + 1 equals
the amount of bytes to align to. For example, to align to 8 bytes,
use an alignment of 7.</doc>
182
        <return-value transfer-ownership="full" nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
          <doc xml:space="preserve">a new #GstMemory.</doc>
          <type name="Memory" c:type="GstMemory*"/>
        </return-value>
        <parameters>
          <instance-parameter name="allocator"
                              transfer-ownership="none"
                              nullable="1"
                              allow-none="1">
            <doc xml:space="preserve">a #GstAllocator to use</doc>
            <type name="Allocator" c:type="GstAllocator*"/>
          </instance-parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">size of the visible memory area</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="params"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">optional parameters</doc>
            <type name="AllocationParams" c:type="GstAllocationParams*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <virtual-method name="free" invoker="free">
        <doc xml:space="preserve">Free @memory that was previously allocated with gst_allocator_alloc().</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="allocator" transfer-ownership="none">
            <doc xml:space="preserve">a #GstAllocator to use</doc>
            <type name="Allocator" c:type="GstAllocator*"/>
          </instance-parameter>
          <parameter name="memory" transfer-ownership="full">
            <doc xml:space="preserve">the memory to free</doc>
            <type name="Memory" c:type="GstMemory*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <method name="alloc" c:identifier="gst_allocator_alloc">
        <doc xml:space="preserve">Use @allocator to allocate a new memory block with memory that is at least
@size big.

The optional @params can specify the prefix and padding for the memory. If
%NULL is passed, no flags, no extra prefix/padding and a default alignment is
used.

The prefix/padding will be filled with 0 if flags contains
#GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively.

When @allocator is %NULL, the default allocator will be used.

The alignment in @params is given as a bitmask so that @align + 1 equals
the amount of bytes to align to. For example, to align to 8 bytes,
use an alignment of 7.</doc>
239
        <return-value transfer-ownership="full" nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347
          <doc xml:space="preserve">a new #GstMemory.</doc>
          <type name="Memory" c:type="GstMemory*"/>
        </return-value>
        <parameters>
          <instance-parameter name="allocator"
                              transfer-ownership="none"
                              nullable="1"
                              allow-none="1">
            <doc xml:space="preserve">a #GstAllocator to use</doc>
            <type name="Allocator" c:type="GstAllocator*"/>
          </instance-parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">size of the visible memory area</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="params"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">optional parameters</doc>
            <type name="AllocationParams" c:type="GstAllocationParams*"/>
          </parameter>
        </parameters>
      </method>
      <method name="free" c:identifier="gst_allocator_free">
        <doc xml:space="preserve">Free @memory that was previously allocated with gst_allocator_alloc().</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="allocator" transfer-ownership="none">
            <doc xml:space="preserve">a #GstAllocator to use</doc>
            <type name="Allocator" c:type="GstAllocator*"/>
          </instance-parameter>
          <parameter name="memory" transfer-ownership="full">
            <doc xml:space="preserve">the memory to free</doc>
            <type name="Memory" c:type="GstMemory*"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_default" c:identifier="gst_allocator_set_default">
        <doc xml:space="preserve">Set the default allocator. This function takes ownership of @allocator.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="allocator" transfer-ownership="full">
            <doc xml:space="preserve">a #GstAllocator</doc>
            <type name="Allocator" c:type="GstAllocator*"/>
          </instance-parameter>
        </parameters>
      </method>
      <field name="object">
        <type name="Object" c:type="GstObject"/>
      </field>
      <field name="mem_type">
        <type name="utf8" c:type="const gchar*"/>
      </field>
      <field name="mem_map">
        <doc xml:space="preserve">the implementation of the GstMemoryMapFunction</doc>
        <type name="MemoryMapFunction" c:type="GstMemoryMapFunction"/>
      </field>
      <field name="mem_unmap">
        <doc xml:space="preserve">the implementation of the GstMemoryUnmapFunction</doc>
        <type name="MemoryUnmapFunction" c:type="GstMemoryUnmapFunction"/>
      </field>
      <field name="mem_copy">
        <doc xml:space="preserve">the implementation of the GstMemoryCopyFunction</doc>
        <type name="MemoryCopyFunction" c:type="GstMemoryCopyFunction"/>
      </field>
      <field name="mem_share">
        <doc xml:space="preserve">the implementation of the GstMemoryShareFunction</doc>
        <type name="MemoryShareFunction" c:type="GstMemoryShareFunction"/>
      </field>
      <field name="mem_is_span">
        <doc xml:space="preserve">the implementation of the GstMemoryIsSpanFunction</doc>
        <type name="MemoryIsSpanFunction" c:type="GstMemoryIsSpanFunction"/>
      </field>
      <field name="mem_map_full">
        <doc xml:space="preserve">the implementation of the GstMemoryMapFullFunction.
     Will be used instead of @mem_map if present. (Since 1.6)</doc>
        <type name="MemoryMapFullFunction" c:type="GstMemoryMapFullFunction"/>
      </field>
      <field name="mem_unmap_full">
        <doc xml:space="preserve">the implementation of the GstMemoryUnmapFullFunction.
     Will be used instead of @mem_unmap if present. (Since 1.6)</doc>
        <type name="MemoryUnmapFullFunction"
              c:type="GstMemoryUnmapFullFunction"/>
      </field>
      <field name="_gst_reserved" readable="0" private="1">
        <array zero-terminated="0" c:type="gpointer" fixed-size="2">
          <type name="gpointer" c:type="gpointer"/>
        </array>
      </field>
      <field name="priv" readable="0" private="1">
        <type name="AllocatorPrivate" c:type="GstAllocatorPrivate*"/>
      </field>
    </class>
    <record name="AllocatorClass"
            c:type="GstAllocatorClass"
            glib:is-gtype-struct-for="Allocator">
      <doc xml:space="preserve">The #GstAllocator is used to create new memory.</doc>
      <field name="object_class">
        <doc xml:space="preserve">Object parent class</doc>
        <type name="ObjectClass" c:type="GstObjectClass"/>
      </field>
      <field name="alloc">
        <callback name="alloc">
348
          <return-value transfer-ownership="full" nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791
            <doc xml:space="preserve">a new #GstMemory.</doc>
            <type name="Memory" c:type="GstMemory*"/>
          </return-value>
          <parameters>
            <parameter name="allocator"
                       transfer-ownership="none"
                       nullable="1"
                       allow-none="1">
              <doc xml:space="preserve">a #GstAllocator to use</doc>
              <type name="Allocator" c:type="GstAllocator*"/>
            </parameter>
            <parameter name="size" transfer-ownership="none">
              <doc xml:space="preserve">size of the visible memory area</doc>
              <type name="gsize" c:type="gsize"/>
            </parameter>
            <parameter name="params"
                       transfer-ownership="none"
                       nullable="1"
                       allow-none="1">
              <doc xml:space="preserve">optional parameters</doc>
              <type name="AllocationParams" c:type="GstAllocationParams*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="free">
        <callback name="free">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
          <parameters>
            <parameter name="allocator" transfer-ownership="none">
              <doc xml:space="preserve">a #GstAllocator to use</doc>
              <type name="Allocator" c:type="GstAllocator*"/>
            </parameter>
            <parameter name="memory" transfer-ownership="full">
              <doc xml:space="preserve">the memory to free</doc>
              <type name="Memory" c:type="GstMemory*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="_gst_reserved" readable="0" private="1">
        <array zero-terminated="0" c:type="gpointer" fixed-size="4">
          <type name="gpointer" c:type="gpointer"/>
        </array>
      </field>
    </record>
    <bitfield name="AllocatorFlags"
              glib:type-name="GstAllocatorFlags"
              glib:get-type="gst_allocator_flags_get_type"
              c:type="GstAllocatorFlags">
      <doc xml:space="preserve">Flags for allocators.</doc>
      <member name="custom_alloc"
              value="16"
              c:identifier="GST_ALLOCATOR_FLAG_CUSTOM_ALLOC"
              glib:nick="custom-alloc">
        <doc xml:space="preserve">The allocator has a custom alloc function.</doc>
      </member>
      <member name="last"
              value="1048576"
              c:identifier="GST_ALLOCATOR_FLAG_LAST"
              glib:nick="last">
        <doc xml:space="preserve">first flag that can be used for custom purposes</doc>
      </member>
    </bitfield>
    <record name="AllocatorPrivate" c:type="GstAllocatorPrivate" disguised="1">
    </record>
    <record name="AtomicQueue"
            c:type="GstAtomicQueue"
            glib:type-name="GstAtomicQueue"
            glib:get-type="gst_atomic_queue_get_type"
            c:symbol-prefix="atomic_queue">
      <doc xml:space="preserve">The #GstAtomicQueue object implements a queue that can be used from multiple
threads without performing any blocking operations.</doc>
      <constructor name="new" c:identifier="gst_atomic_queue_new">
        <doc xml:space="preserve">Create a new atomic queue instance. @initial_size will be rounded up to the
nearest power of 2 and used as the initial size of the queue.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a new #GstAtomicQueue</doc>
          <type name="AtomicQueue" c:type="GstAtomicQueue*"/>
        </return-value>
        <parameters>
          <parameter name="initial_size" transfer-ownership="none">
            <doc xml:space="preserve">initial queue size</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </constructor>
      <method name="length" c:identifier="gst_atomic_queue_length">
        <doc xml:space="preserve">Get the amount of items in the queue.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the number of elements in the queue.</doc>
          <type name="guint" c:type="guint"/>
        </return-value>
        <parameters>
          <instance-parameter name="queue" transfer-ownership="none">
            <doc xml:space="preserve">a #GstAtomicQueue</doc>
            <type name="AtomicQueue" c:type="GstAtomicQueue*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="peek" c:identifier="gst_atomic_queue_peek">
        <doc xml:space="preserve">Peek the head element of the queue without removing it from the queue.</doc>
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve">the head element of @queue or
%NULL when the queue is empty.</doc>
          <type name="gpointer" c:type="gpointer"/>
        </return-value>
        <parameters>
          <instance-parameter name="queue" transfer-ownership="none">
            <doc xml:space="preserve">a #GstAtomicQueue</doc>
            <type name="AtomicQueue" c:type="GstAtomicQueue*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="pop" c:identifier="gst_atomic_queue_pop">
        <doc xml:space="preserve">Get the head element of the queue.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">the head element of @queue or %NULL when
the queue is empty.</doc>
          <type name="gpointer" c:type="gpointer"/>
        </return-value>
        <parameters>
          <instance-parameter name="queue" transfer-ownership="none">
            <doc xml:space="preserve">a #GstAtomicQueue</doc>
            <type name="AtomicQueue" c:type="GstAtomicQueue*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="push" c:identifier="gst_atomic_queue_push">
        <doc xml:space="preserve">Append @data to the tail of the queue.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="queue" transfer-ownership="none">
            <doc xml:space="preserve">a #GstAtomicQueue</doc>
            <type name="AtomicQueue" c:type="GstAtomicQueue*"/>
          </instance-parameter>
          <parameter name="data"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">the data</doc>
            <type name="gpointer" c:type="gpointer"/>
          </parameter>
        </parameters>
      </method>
      <method name="ref" c:identifier="gst_atomic_queue_ref">
        <doc xml:space="preserve">Increase the refcount of @queue.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="queue" transfer-ownership="none">
            <doc xml:space="preserve">a #GstAtomicQueue</doc>
            <type name="AtomicQueue" c:type="GstAtomicQueue*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="unref" c:identifier="gst_atomic_queue_unref">
        <doc xml:space="preserve">Unref @queue and free the memory when the refcount reaches 0.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="queue" transfer-ownership="none">
            <doc xml:space="preserve">a #GstAtomicQueue</doc>
            <type name="AtomicQueue" c:type="GstAtomicQueue*"/>
          </instance-parameter>
        </parameters>
      </method>
    </record>
    <constant name="BUFFER_COPY_ALL" value="15" c:type="GST_BUFFER_COPY_ALL">
      <doc xml:space="preserve">Combination of all possible fields that can be copied with
gst_buffer_copy_into().</doc>
      <type name="BufferCopyFlags" c:type="GstBufferCopyFlags"/>
    </constant>
    <constant name="BUFFER_COPY_METADATA"
              value="7"
              c:type="GST_BUFFER_COPY_METADATA">
      <doc xml:space="preserve">Combination of all possible metadata fields that can be copied with
gst_buffer_copy_into().</doc>
      <type name="BufferCopyFlags" c:type="GstBufferCopyFlags"/>
    </constant>
    <constant name="BUFFER_OFFSET_NONE"
              value="18446744073709551615"
              c:type="GST_BUFFER_OFFSET_NONE">
      <doc xml:space="preserve">Constant for no-offset return results.</doc>
      <type name="guint64" c:type="guint64"/>
    </constant>
    <class name="Bin"
           c:symbol-prefix="bin"
           c:type="GstBin"
           parent="Element"
           glib:type-name="GstBin"
           glib:get-type="gst_bin_get_type"
           glib:type-struct="BinClass">
      <doc xml:space="preserve">#GstBin is an element that can contain other #GstElement, allowing them to be
managed as a group.
Pads from the child elements can be ghosted to the bin, see #GstGhostPad.
This makes the bin look like any other elements and enables creation of
higher-level abstraction elements.

A new #GstBin is created with gst_bin_new(). Use a #GstPipeline instead if you
want to create a toplevel bin because a normal bin doesn't have a bus or
handle clock distribution of its own.

After the bin has been created you will typically add elements to it with
gst_bin_add(). You can remove elements with gst_bin_remove().

An element can be retrieved from a bin with gst_bin_get_by_name(), using the
elements name. gst_bin_get_by_name_recurse_up() is mainly used for internal
purposes and will query the parent bins when the element is not found in the
current bin.

An iterator of elements in a bin can be retrieved with
gst_bin_iterate_elements(). Various other iterators exist to retrieve the
elements in a bin.

gst_object_unref() is used to drop your reference to the bin.

The #GstBin::element-added signal is fired whenever a new element is added to
the bin. Likewise the #GstBin::element-removed signal is fired whenever an
element is removed from the bin.

## Notes

A #GstBin internally intercepts every #GstMessage posted by its children and
implements the following default behaviour for each of them:

* GST_MESSAGE_EOS: This message is only posted by sinks in the PLAYING
state. If all sinks posted the EOS message, this bin will post and EOS
message upwards.

* GST_MESSAGE_SEGMENT_START: Just collected and never forwarded upwards.
The messages are used to decide when all elements have completed playback
of their segment.

* GST_MESSAGE_SEGMENT_DONE: Is posted by #GstBin when all elements that posted
a SEGMENT_START have posted a SEGMENT_DONE.

* GST_MESSAGE_DURATION_CHANGED: Is posted by an element that detected a change
in the stream duration. The default bin behaviour is to clear any
cached duration values so that the next duration query will perform
a full duration recalculation. The duration change is posted to the
application so that it can refetch the new duration with a duration
query. Note that these messages can be posted before the bin is
prerolled, in which case the duration query might fail.

* GST_MESSAGE_CLOCK_LOST: This message is posted by an element when it
can no longer provide a clock. The default bin behaviour is to
check if the lost clock was the one provided by the bin. If so and
the bin is currently in the PLAYING state, the message is forwarded to
the bin parent.
This message is also generated when a clock provider is removed from
the bin. If this message is received by the application, it should
PAUSE the pipeline and set it back to PLAYING to force a new clock
distribution.

* GST_MESSAGE_CLOCK_PROVIDE: This message is generated when an element
can provide a clock. This mostly happens when a new clock
provider is added to the bin. The default behaviour of the bin is to
mark the currently selected clock as dirty, which will perform a clock
recalculation the next time the bin is asked to provide a clock.
This message is never sent tot the application but is forwarded to
the parent of the bin.

* OTHERS: posted upwards.

A #GstBin implements the following default behaviour for answering to a
#GstQuery:

* GST_QUERY_DURATION:If the query has been asked before with the same format
and the bin is a toplevel bin (ie. has no parent),
use the cached previous value. If no previous value was cached, the
query is sent to all sink elements in the bin and the MAXIMUM of all
values is returned. If the bin is a toplevel bin the value is cached.
If no sinks are available in the bin, the query fails.

* GST_QUERY_POSITION:The query is sent to all sink elements in the bin and the
MAXIMUM of all values is returned. If no sinks are available in the bin,
the query fails.

* OTHERS:the query is forwarded to all sink elements, the result
of the first sink that answers the query successfully is returned. If no
sink is in the bin, the query fails.

A #GstBin will by default forward any event sent to it to all sink
(#GST_EVENT_TYPE_DOWNSTREAM) or source (#GST_EVENT_TYPE_UPSTREAM) elements
depending on the event type.
If all the elements return %TRUE, the bin will also return %TRUE, else %FALSE
is returned. If no elements of the required type are in the bin, the event
handler will return %TRUE.</doc>
      <implements name="ChildProxy"/>
      <constructor name="new" c:identifier="gst_bin_new">
        <doc xml:space="preserve">Creates a new bin with the given name.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">a new #GstBin</doc>
          <type name="Element" c:type="GstElement*"/>
        </return-value>
        <parameters>
          <parameter name="name"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">the name of the new bin</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
        </parameters>
      </constructor>
      <virtual-method name="add_element">
        <return-value transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="element" transfer-ownership="none">
            <type name="Element" c:type="GstElement*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <virtual-method name="deep_element_added">
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="sub_bin" transfer-ownership="none">
            <type name="Bin" c:type="GstBin*"/>
          </parameter>
          <parameter name="child" transfer-ownership="none">
            <type name="Element" c:type="GstElement*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <virtual-method name="deep_element_removed">
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="sub_bin" transfer-ownership="none">
            <type name="Bin" c:type="GstBin*"/>
          </parameter>
          <parameter name="child" transfer-ownership="none">
            <type name="Element" c:type="GstElement*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <virtual-method name="do_latency">
        <return-value transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
        </parameters>
      </virtual-method>
      <virtual-method name="element_added">
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="child" transfer-ownership="none">
            <type name="Element" c:type="GstElement*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <virtual-method name="element_removed">
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="child" transfer-ownership="none">
            <type name="Element" c:type="GstElement*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <virtual-method name="handle_message">
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="message" transfer-ownership="none">
            <type name="Message" c:type="GstMessage*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <virtual-method name="remove_element">
        <return-value transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="element" transfer-ownership="none">
            <type name="Element" c:type="GstElement*"/>
          </parameter>
        </parameters>
      </virtual-method>
      <method name="add" c:identifier="gst_bin_add">
        <doc xml:space="preserve">Adds the given element to the bin.  Sets the element's parent, and thus
takes ownership of the element. An element can only be added to one bin.

If the element's pads are linked to other pads, the pads will be unlinked
before the element is added to the bin.

&gt; When you add an element to an already-running pipeline, you will have to
&gt; take care to set the state of the newly-added element to the desired
&gt; state (usually PLAYING or PAUSED, same you set the pipeline to originally)
&gt; with gst_element_set_state(), or use gst_element_sync_state_with_parent().
&gt; The bin or pipeline will not take care of this for you.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the element could be added, %FALSE if
the bin does not want to accept the element.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
792
          <parameter name="element" transfer-ownership="none">
Sebastian Dröge's avatar
Sebastian Dröge committed
793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811
            <doc xml:space="preserve">the #GstElement to add</doc>
            <type name="Element" c:type="GstElement*"/>
          </parameter>
        </parameters>
      </method>
      <method name="add_many"
              c:identifier="gst_bin_add_many"
              introspectable="0">
        <doc xml:space="preserve">Adds a %NULL-terminated list of elements to a bin.  This function is
equivalent to calling gst_bin_add() for each member of the list. The return
value of each gst_bin_add() is ignored.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
812
          <parameter name="element_1" transfer-ownership="none">
Sebastian Dröge's avatar
Sebastian Dröge committed
813 814 815
            <doc xml:space="preserve">the #GstElement element to add to the bin</doc>
            <type name="Element" c:type="GstElement*"/>
          </parameter>
816
          <parameter name="..." transfer-ownership="none">
Sebastian Dröge's avatar
Sebastian Dröge committed
817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852
            <doc xml:space="preserve">additional elements to add to the bin</doc>
            <varargs/>
          </parameter>
        </parameters>
      </method>
      <method name="find_unlinked_pad"
              c:identifier="gst_bin_find_unlinked_pad">
        <doc xml:space="preserve">Recursively looks for elements with an unlinked pad of the given
direction within the specified bin and returns an unlinked pad
if one is found, or %NULL otherwise. If a pad is found, the caller
owns a reference to it and should use gst_object_unref() on the
pad when it is not needed any longer.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">unlinked pad of the given
direction, %NULL.</doc>
          <type name="Pad" c:type="GstPad*"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">bin in which to look for elements with unlinked pads</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="direction" transfer-ownership="none">
            <doc xml:space="preserve">whether to look for an unlinked source or sink pad</doc>
            <type name="PadDirection" c:type="GstPadDirection"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_by_interface" c:identifier="gst_bin_get_by_interface">
        <doc xml:space="preserve">Looks for an element inside the bin that implements the given
interface. If such an element is found, it returns the element.
You can cast this element to the given interface afterwards.  If you want
all elements that implement the interface, use
gst_bin_iterate_all_by_interface(). This function recurses into child bins.

MT safe.  Caller owns returned reference.</doc>
853 854 855
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">A #GstElement inside the bin
implementing the interface</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748
          <type name="Element" c:type="GstElement*"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="iface" transfer-ownership="none">
            <doc xml:space="preserve">the #GType of an interface</doc>
            <type name="GType" c:type="GType"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_by_name" c:identifier="gst_bin_get_by_name">
        <doc xml:space="preserve">Gets the element with the given name from a bin. This
function recurses into child bins.

Returns %NULL if no element with the given name is found in the bin.

MT safe.  Caller owns returned reference.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">the #GstElement with the given
name, or %NULL</doc>
          <type name="Element" c:type="GstElement*"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="name" transfer-ownership="none">
            <doc xml:space="preserve">the element name to search for</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_by_name_recurse_up"
              c:identifier="gst_bin_get_by_name_recurse_up">
        <doc xml:space="preserve">Gets the element with the given name from this bin. If the
element is not found, a recursion is performed on the parent bin.

Returns %NULL if:
- no element with the given name is found in the bin

MT safe.  Caller owns returned reference.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">the #GstElement with the given
name, or %NULL</doc>
          <type name="Element" c:type="GstElement*"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="name" transfer-ownership="none">
            <doc xml:space="preserve">the element name to search for</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_suppressed_flags"
              c:identifier="gst_bin_get_suppressed_flags"
              version="1.10">
        <doc xml:space="preserve">Return the suppressed flags of the bin.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the bin's suppressed #GstElementFlags.</doc>
          <type name="ElementFlags" c:type="GstElementFlags"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="iterate_all_by_interface"
              c:identifier="gst_bin_iterate_all_by_interface">
        <doc xml:space="preserve">Looks for all elements inside the bin that implements the given
interface. You can safely cast all returned elements to the given interface.
The function recurses inside child bins. The iterator will yield a series
of #GstElement that should be unreffed after use.

MT safe.  Caller owns returned value.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">a #GstIterator of #GstElement
    for all elements in the bin implementing the given interface,
    or %NULL</doc>
          <type name="Iterator" c:type="GstIterator*"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="iface" transfer-ownership="none">
            <doc xml:space="preserve">the #GType of an interface</doc>
            <type name="GType" c:type="GType"/>
          </parameter>
        </parameters>
      </method>
      <method name="iterate_elements" c:identifier="gst_bin_iterate_elements">
        <doc xml:space="preserve">Gets an iterator for the elements in this bin.

MT safe.  Caller owns returned value.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">a #GstIterator of #GstElement,
or %NULL</doc>
          <type name="Iterator" c:type="GstIterator*"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="iterate_recurse" c:identifier="gst_bin_iterate_recurse">
        <doc xml:space="preserve">Gets an iterator for the elements in this bin.
This iterator recurses into GstBin children.

MT safe.  Caller owns returned value.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">a #GstIterator of #GstElement,
or %NULL</doc>
          <type name="Iterator" c:type="GstIterator*"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="iterate_sinks" c:identifier="gst_bin_iterate_sinks">
        <doc xml:space="preserve">Gets an iterator for all elements in the bin that have the
#GST_ELEMENT_FLAG_SINK flag set.

MT safe.  Caller owns returned value.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">a #GstIterator of #GstElement,
or %NULL</doc>
          <type name="Iterator" c:type="GstIterator*"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="iterate_sorted" c:identifier="gst_bin_iterate_sorted">
        <doc xml:space="preserve">Gets an iterator for the elements in this bin in topologically
sorted order. This means that the elements are returned from
the most downstream elements (sinks) to the sources.

This function is used internally to perform the state changes
of the bin elements and for clock selection.

MT safe.  Caller owns returned value.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">a #GstIterator of #GstElement,
or %NULL</doc>
          <type name="Iterator" c:type="GstIterator*"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="iterate_sources" c:identifier="gst_bin_iterate_sources">
        <doc xml:space="preserve">Gets an iterator for all elements in the bin that have the
#GST_ELEMENT_FLAG_SOURCE flag set.

MT safe.  Caller owns returned value.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">a #GstIterator of #GstElement,
or %NULL</doc>
          <type name="Iterator" c:type="GstIterator*"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="recalculate_latency"
              c:identifier="gst_bin_recalculate_latency">
        <doc xml:space="preserve">Query @bin for the current latency using and reconfigures this latency to all the
elements with a LATENCY event.

This method is typically called on the pipeline when a #GST_MESSAGE_LATENCY
is posted on the bus.

This function simply emits the 'do-latency' signal so any custom latency
calculations will be performed.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the latency could be queried and reconfigured.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="remove" c:identifier="gst_bin_remove">
        <doc xml:space="preserve">Removes the element from the bin, unparenting it as well.
Unparenting the element means that the element will be dereferenced,
so if the bin holds the only reference to the element, the element
will be freed in the process of removing it from the bin.  If you
want the element to still exist after removing, you need to call
gst_object_ref() before removing it from the bin.

If the element's pads are linked to other pads, the pads will be unlinked
before the element is removed from the bin.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the element could be removed, %FALSE if
the bin does not want to remove the element.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="element" transfer-ownership="none">
            <doc xml:space="preserve">the #GstElement to remove</doc>
            <type name="Element" c:type="GstElement*"/>
          </parameter>
        </parameters>
      </method>
      <method name="remove_many"
              c:identifier="gst_bin_remove_many"
              introspectable="0">
        <doc xml:space="preserve">Remove a list of elements from a bin. This function is equivalent
to calling gst_bin_remove() with each member of the list.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="element_1" transfer-ownership="none">
            <doc xml:space="preserve">the first #GstElement to remove from the bin</doc>
            <type name="Element" c:type="GstElement*"/>
          </parameter>
          <parameter name="..." transfer-ownership="none">
            <doc xml:space="preserve">%NULL-terminated list of elements to remove from the bin</doc>
            <varargs/>
          </parameter>
        </parameters>
      </method>
      <method name="set_suppressed_flags"
              c:identifier="gst_bin_set_suppressed_flags"
              version="1.10">
        <doc xml:space="preserve">Suppress the given flags on the bin. #GstElementFlags of a
child element are propagated when it is added to the bin.
When suppressed flags are set, those specified flags will
not be propagated to the bin.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
          <parameter name="flags" transfer-ownership="none">
            <doc xml:space="preserve">the #GstElementFlags to suppress</doc>
            <type name="ElementFlags" c:type="GstElementFlags"/>
          </parameter>
        </parameters>
      </method>
      <method name="sync_children_states"
              c:identifier="gst_bin_sync_children_states"
              version="1.6">
        <doc xml:space="preserve">Synchronizes the state of every child of @bin with the state
of @bin. See also gst_element_sync_state_with_parent().</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if syncing the state was successful for all children,
 otherwise %FALSE.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="bin" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBin</doc>
            <type name="Bin" c:type="GstBin*"/>
          </instance-parameter>
        </parameters>
      </method>
      <property name="async-handling" writable="1" transfer-ownership="none">
        <doc xml:space="preserve">If set to %TRUE, the bin will handle asynchronous state changes.
This should be used only if the bin subclass is modifying the state
of its children on its own.</doc>
        <type name="gboolean" c:type="gboolean"/>
      </property>
      <property name="message-forward" writable="1" transfer-ownership="none">
        <doc xml:space="preserve">Forward all children messages, even those that would normally be filtered by
the bin. This can be interesting when one wants to be notified of the EOS
state of individual elements, for example.

The messages are converted to an ELEMENT message with the bin as the
source. The structure of the message is named 'GstBinForwarded' and contains
a field named 'message' of type GST_TYPE_MESSAGE that contains the original
forwarded message.</doc>
        <type name="gboolean" c:type="gboolean"/>
      </property>
      <field name="element">
        <type name="Element" c:type="GstElement"/>
      </field>
      <field name="numchildren">
        <doc xml:space="preserve">the number of children in this bin</doc>
        <type name="gint" c:type="gint"/>
      </field>
      <field name="children">
        <doc xml:space="preserve">the list of children in this bin</doc>
        <type name="GLib.List" c:type="GList*">
          <type name="Element"/>
        </type>
      </field>
      <field name="children_cookie">
        <doc xml:space="preserve">updated whenever @children changes</doc>
        <type name="guint32" c:type="guint32"/>
      </field>
      <field name="child_bus">
        <doc xml:space="preserve">internal bus for handling child messages</doc>
        <type name="Bus" c:type="GstBus*"/>
      </field>
      <field name="messages">
        <doc xml:space="preserve">queued and cached messages</doc>
        <type name="GLib.List" c:type="GList*">
          <type name="Message"/>
        </type>
      </field>
      <field name="polling">
        <doc xml:space="preserve">the bin is currently calculating its state</doc>
        <type name="gboolean" c:type="gboolean"/>
      </field>
      <field name="state_dirty">
        <doc xml:space="preserve">the bin needs to recalculate its state (deprecated)</doc>
        <type name="gboolean" c:type="gboolean"/>
      </field>
      <field name="clock_dirty">
        <doc xml:space="preserve">the bin needs to select a new clock</doc>
        <type name="gboolean" c:type="gboolean"/>
      </field>
      <field name="provided_clock">
        <doc xml:space="preserve">the last clock selected</doc>
        <type name="Clock" c:type="GstClock*"/>
      </field>
      <field name="clock_provider">
        <doc xml:space="preserve">the element that provided @provided_clock</doc>
        <type name="Element" c:type="GstElement*"/>
      </field>
      <field name="priv" readable="0" private="1">
        <type name="BinPrivate" c:type="GstBinPrivate*"/>
      </field>
      <field name="_gst_reserved" readable="0" private="1">
        <array zero-terminated="0" c:type="gpointer" fixed-size="4">
          <type name="gpointer" c:type="gpointer"/>
        </array>
      </field>
      <glib:signal name="deep-element-added" when="first" version="1.10">
        <doc xml:space="preserve">Will be emitted after the element was added to sub_bin.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="sub_bin" transfer-ownership="none">
            <doc xml:space="preserve">the #GstBin the element was added to</doc>
            <type name="Bin"/>
          </parameter>
          <parameter name="element" transfer-ownership="none">
            <doc xml:space="preserve">the #GstElement that was added to @sub_bin</doc>
            <type name="Element"/>
          </parameter>
        </parameters>
      </glib:signal>
      <glib:signal name="deep-element-removed" when="first" version="1.10">
        <doc xml:space="preserve">Will be emitted after the element was removed from sub_bin.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="sub_bin" transfer-ownership="none">
            <doc xml:space="preserve">the #GstBin the element was removed from</doc>
            <type name="Bin"/>
          </parameter>
          <parameter name="element" transfer-ownership="none">
            <doc xml:space="preserve">the #GstElement that was removed from @sub_bin</doc>
            <type name="Element"/>
          </parameter>
        </parameters>
      </glib:signal>
      <glib:signal name="do-latency" when="last">
        <doc xml:space="preserve">Will be emitted when the bin needs to perform latency calculations. This
signal is only emitted for toplevel bins or when async-handling is
enabled.

Only one signal handler is invoked. If no signals are connected, the
default handler is invoked, which will query and distribute the lowest
possible latency to all sinks.

Connect to this signal if the default latency calculations are not
sufficient, like when you need different latencies for different sinks in
the same pipeline.</doc>
        <return-value transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
      </glib:signal>
      <glib:signal name="element-added" when="first">
        <doc xml:space="preserve">Will be emitted after the element was added to the bin.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="element" transfer-ownership="none">
            <doc xml:space="preserve">the #GstElement that was added to the bin</doc>
            <type name="Element"/>
          </parameter>
        </parameters>
      </glib:signal>
      <glib:signal name="element-removed" when="first">
        <doc xml:space="preserve">Will be emitted after the element was removed from the bin.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="element" transfer-ownership="none">
            <doc xml:space="preserve">the #GstElement that was removed from the bin</doc>
            <type name="Element"/>
          </parameter>
        </parameters>
      </glib:signal>
    </class>
    <record name="BinClass"
            c:type="GstBinClass"
            glib:is-gtype-struct-for="Bin">
      <doc xml:space="preserve">Subclasses can override the @add_element and @remove_element to
update the list of children in the bin.

The @handle_message method can be overridden to implement custom
message handling.  @handle_message takes ownership of the message, just like
#gst_element_post_message.

The @deep_element_added vfunc will be called when a new element has been
added to any bin inside this bin, so it will also be called if a new child
was added to a sub-bin of this bin. #GstBin implementations that override
this message should chain up to the parent class implementation so the
element-added-deep signal is emitted on all parents.</doc>
      <field name="parent_class">
        <doc xml:space="preserve">bin parent class</doc>
        <type name="ElementClass" c:type="GstElementClass"/>
      </field>
      <field name="pool" readable="0" private="1">
        <type name="GLib.ThreadPool" c:type="GThreadPool*"/>
      </field>
      <field name="element_added">
        <callback name="element_added">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
          <parameters>
            <parameter name="bin" transfer-ownership="none">
              <type name="Bin" c:type="GstBin*"/>
            </parameter>
            <parameter name="child" transfer-ownership="none">
              <type name="Element" c:type="GstElement*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="element_removed">
        <callback name="element_removed">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
          <parameters>
            <parameter name="bin" transfer-ownership="none">
              <type name="Bin" c:type="GstBin*"/>
            </parameter>
            <parameter name="child" transfer-ownership="none">
              <type name="Element" c:type="GstElement*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="add_element">
        <callback name="add_element">
          <return-value transfer-ownership="none">
            <type name="gboolean" c:type="gboolean"/>
          </return-value>
          <parameters>
            <parameter name="bin" transfer-ownership="none">
              <type name="Bin" c:type="GstBin*"/>
            </parameter>
            <parameter name="element" transfer-ownership="none">
              <type name="Element" c:type="GstElement*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="remove_element">
        <callback name="remove_element">
          <return-value transfer-ownership="none">
            <type name="gboolean" c:type="gboolean"/>
          </return-value>
          <parameters>
            <parameter name="bin" transfer-ownership="none">
              <type name="Bin" c:type="GstBin*"/>
            </parameter>
            <parameter name="element" transfer-ownership="none">
              <type name="Element" c:type="GstElement*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="handle_message">
        <callback name="handle_message">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
          <parameters>
            <parameter name="bin" transfer-ownership="none">
              <type name="Bin" c:type="GstBin*"/>
            </parameter>
            <parameter name="message" transfer-ownership="none">
              <type name="Message" c:type="GstMessage*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="do_latency">
        <callback name="do_latency">
          <return-value transfer-ownership="none">
            <type name="gboolean" c:type="gboolean"/>
          </return-value>
          <parameters>
            <parameter name="bin" transfer-ownership="none">
              <type name="Bin" c:type="GstBin*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="deep_element_added">
        <callback name="deep_element_added">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
          <parameters>
            <parameter name="bin" transfer-ownership="none">
              <type name="Bin" c:type="GstBin*"/>
            </parameter>
            <parameter name="sub_bin" transfer-ownership="none">
              <type name="Bin" c:type="GstBin*"/>
            </parameter>
            <parameter name="child" transfer-ownership="none">
              <type name="Element" c:type="GstElement*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="deep_element_removed">
        <callback name="deep_element_removed">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
          <parameters>
            <parameter name="bin" transfer-ownership="none">
              <type name="Bin" c:type="GstBin*"/>
            </parameter>
            <parameter name="sub_bin" transfer-ownership="none">
              <type name="Bin" c:type="GstBin*"/>
            </parameter>
            <parameter name="child" transfer-ownership="none">
              <type name="Element" c:type="GstElement*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="_gst_reserved" readable="0" private="1">
        <array zero-terminated="0" c:type="gpointer" fixed-size="2">
          <type name="gpointer" c:type="gpointer"/>
        </array>
      </field>
    </record>
    <bitfield name="BinFlags"
              glib:type-name="GstBinFlags"
              glib:get-type="gst_bin_flags_get_type"
              c:type="GstBinFlags">
      <doc xml:space="preserve">GstBinFlags are a set of flags specific to bins. Most are set/used
internally. They can be checked using the GST_OBJECT_FLAG_IS_SET () macro,
and (un)set using GST_OBJECT_FLAG_SET () and GST_OBJECT_FLAG_UNSET ().</doc>
      <member name="no_resync"
              value="16384"
              c:identifier="GST_BIN_FLAG_NO_RESYNC"
              glib:nick="no-resync">
        <doc xml:space="preserve">don't resync a state change when elements are
            added or linked in the bin (Since 1.0.5)</doc>
      </member>
      <member name="streams_aware"
              value="32768"
              c:identifier="GST_BIN_FLAG_STREAMS_AWARE"
              glib:nick="streams-aware">
        <doc xml:space="preserve">Indicates whether the bin can handle elements
            that add/remove source pads at any point in time without
            first posting a no-more-pads signal (Since 1.10)</doc>
      </member>
      <member name="last"
              value="524288"
              c:identifier="GST_BIN_FLAG_LAST"
              glib:nick="last">
        <doc xml:space="preserve">the last enum in the series of flags for bins.
Derived classes can use this as first value in a list of flags.</doc>
      </member>
    </bitfield>
    <record name="BinPrivate" c:type="GstBinPrivate" disguised="1">
    </record>
    <class name="Bitmask"
           c:symbol-prefix="bitmask"
           glib:type-name="GstBitmask"
           glib:get-type="gst_bitmask_get_type"
           glib:fundamental="1">
    </class>
    <record name="Buffer"
            c:type="GstBuffer"
            glib:type-name="GstBuffer"
            glib:get-type="gst_buffer_get_type"
            c:symbol-prefix="buffer">
      <doc xml:space="preserve">Buffers are the basic unit of data transfer in GStreamer. They contain the
timing and offset along with other arbitrary metadata that is associated
with the #GstMemory blocks that the buffer contains.

Buffers are usually created with gst_buffer_new(). After a buffer has been
created one will typically allocate memory for it and add it to the buffer.
The following example creates a buffer that can hold a given video frame
with a given width, height and bits per plane.
|[&lt;!-- language="C" --&gt;
  GstBuffer *buffer;
  GstMemory *memory;
  gint size, width, height, bpp;
  ...
  size = width * height * bpp;
  buffer = gst_buffer_new ();
  memory = gst_allocator_alloc (NULL, size, NULL);
  gst_buffer_insert_memory (buffer, -1, memory);
  ...
]|

Alternatively, use gst_buffer_new_allocate() to create a buffer with
preallocated data of a given size.

Buffers can contain a list of #GstMemory objects. You can retrieve how many
memory objects with gst_buffer_n_memory() and you can get a pointer
to memory with gst_buffer_peek_memory()

A buffer will usually have timestamps, and a duration, but neither of these
are guaranteed (they may be set to #GST_CLOCK_TIME_NONE). Whenever a
meaningful value can be given for these, they should be set. The timestamps
and duration are measured in nanoseconds (they are #GstClockTime values).

The buffer DTS refers to the timestamp when the buffer should be decoded and
is usually monotonically increasing. The buffer PTS refers to the timestamp when
the buffer content should be presented to the user and is not always
monotonically increasing.

A buffer can also have one or both of a start and an end offset. These are
media-type specific. For video buffers, the start offset will generally be
the frame number. For audio buffers, it will be the number of samples
produced so far. For compressed data, it could be the byte offset in a
source or destination file. Likewise, the end offset will be the offset of
the end of the buffer. These can only be meaningfully interpreted if you
know the media type of the buffer (the preceding CAPS event). Either or both
can be set to #GST_BUFFER_OFFSET_NONE.

gst_buffer_ref() is used to increase the refcount of a buffer. This must be
done when you want to keep a handle to the buffer after pushing it to the
next element. The buffer refcount determines the writability of the buffer, a
buffer is only writable when the refcount is exactly 1, i.e. when the caller
has the only reference to the buffer.

To efficiently create a smaller buffer out of an existing one, you can
use gst_buffer_copy_region(). This method tries to share the memory objects
between the two buffers.

If a plug-in wants to modify the buffer data or metadata in-place, it should
first obtain a buffer that is safe to modify by using
gst_buffer_make_writable().  This function is optimized so that a copy will
only be made when it is necessary.

Several flags of the buffer can be set and unset with the
GST_BUFFER_FLAG_SET() and GST_BUFFER_FLAG_UNSET() macros. Use
GST_BUFFER_FLAG_IS_SET() to test if a certain #GstBufferFlags flag is set.

Buffers can be efficiently merged into a larger buffer with
gst_buffer_append(). Copying of memory will only be done when absolutely
needed.

Arbitrary extra metadata can be set on a buffer with gst_buffer_add_meta().
Metadata can be retrieved with gst_buffer_get_meta(). See also #GstMeta

An element should either unref the buffer or push it out on a src pad
using gst_pad_push() (see #GstPad).

Buffers are usually freed by unreffing them with gst_buffer_unref(). When
the refcount drops to 0, any memory and metadata pointed to by the buffer is
unreffed as well. Buffers allocated from a #GstBufferPool will be returned to
the pool when the refcount drops to 0.

The #GstParentBufferMeta is a meta which can be attached to a #GstBuffer
to hold a reference to another buffer that is only released when the child
#GstBuffer is released.

Typically, #GstParentBufferMeta is used when the child buffer is directly
using the #GstMemory of the parent buffer, and wants to prevent the parent
buffer from being returned to a buffer pool until the #GstMemory is available
for re-use. (Since 1.6)</doc>
      <field name="mini_object" writable="1">
        <doc xml:space="preserve">the parent structure</doc>
        <type name="MiniObject" c:type="GstMiniObject"/>
      </field>
      <field name="pool" writable="1">
        <doc xml:space="preserve">pointer to the pool owner of the buffer</doc>
        <type name="BufferPool" c:type="GstBufferPool*"/>
      </field>
      <field name="pts" writable="1">
        <doc xml:space="preserve">presentation timestamp of the buffer, can be #GST_CLOCK_TIME_NONE when the
    pts is not known or relevant. The pts contains the timestamp when the
    media should be presented to the user.</doc>
        <type name="ClockTime" c:type="GstClockTime"/>
      </field>
      <field name="dts" writable="1">
        <doc xml:space="preserve">decoding timestamp of the buffer, can be #GST_CLOCK_TIME_NONE when the
    dts is not known or relevant. The dts contains the timestamp when the
    media should be processed.</doc>
        <type name="ClockTime" c:type="GstClockTime"/>
      </field>
      <field name="duration" writable="1">
        <doc xml:space="preserve">duration in time of the buffer data, can be #GST_CLOCK_TIME_NONE
    when the duration is not known or relevant.</doc>
        <type name="ClockTime" c:type="GstClockTime"/>
      </field>
      <field name="offset" writable="1">
        <doc xml:space="preserve">a media specific offset for the buffer data.
    For video frames, this is the frame number of this buffer.
    For audio samples, this is the offset of the first sample in this buffer.
    For file data or compressed data this is the byte offset of the first
      byte in this buffer.</doc>
        <type name="guint64" c:type="guint64"/>
      </field>
      <field name="offset_end" writable="1">
        <doc xml:space="preserve">the last offset contained in this buffer. It has the same
    format as @offset.</doc>
        <type name="guint64" c:type="guint64"/>
      </field>
      <constructor name="new" c:identifier="gst_buffer_new">
        <doc xml:space="preserve">Creates a newly allocated buffer without any data.

MT safe.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">the new #GstBuffer.</doc>
          <type name="Buffer" c:type="GstBuffer*"/>
        </return-value>
      </constructor>
      <constructor name="new_allocate" c:identifier="gst_buffer_new_allocate">
        <doc xml:space="preserve">Tries to create a newly allocated buffer with data of the given size and
extra parameters from @allocator. If the requested amount of memory can't be
allocated, %NULL will be returned. The allocated buffer memory is not cleared.

When @allocator is %NULL, the default memory allocator will be used.

Note that when @size == 0, the buffer will not have memory associated with it.

MT safe.</doc>
        <return-value transfer-ownership="full" nullable="1">
          <doc xml:space="preserve">a new #GstBuffer, or %NULL if
    the memory couldn't be allocated.</doc>
          <type name="Buffer" c:type="GstBuffer*"/>
        </return-value>
        <parameters>
          <parameter name="allocator"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">the #GstAllocator to use, or %NULL to use the
    default allocator</doc>
            <type name="Allocator" c:type="GstAllocator*"/>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">the size in bytes of the new buffer's data.</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="params"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">optional parameters</doc>
            <type name="AllocationParams" c:type="GstAllocationParams*"/>
          </parameter>
        </parameters>
      </constructor>
      <constructor name="new_wrapped" c:identifier="gst_buffer_new_wrapped">
        <doc xml:space="preserve">Creates a new buffer that wraps the given @data. The memory will be freed
with g_free and will be marked writable.

MT safe.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a new #GstBuffer</doc>
          <type name="Buffer" c:type="GstBuffer*"/>
        </return-value>
        <parameters>
          <parameter name="data" transfer-ownership="full">
            <doc xml:space="preserve">data to wrap</doc>
            <array length="1" zero-terminated="0" c:type="gpointer">
              <type name="guint8"/>
            </array>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">allocated size of @data</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
        </parameters>
      </constructor>
      <constructor name="new_wrapped_full"
                   c:identifier="gst_buffer_new_wrapped_full">
        <doc xml:space="preserve">Allocate a new buffer that wraps the given memory. @data must point to
@maxsize of memory, the wrapped buffer will have the region from @offset and
@size visible.

When the buffer is destroyed, @notify will be called with @user_data.

The prefix/padding must be filled with 0 if @flags contains
#GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a new #GstBuffer</doc>
          <type name="Buffer" c:type="GstBuffer*"/>
        </return-value>
        <parameters>
          <parameter name="flags" transfer-ownership="none">
            <doc xml:space="preserve">#GstMemoryFlags</doc>
            <type name="MemoryFlags" c:type="GstMemoryFlags"/>
          </parameter>
          <parameter name="data" transfer-ownership="none">
            <doc xml:space="preserve">data to wrap</doc>
            <array length="4" zero-terminated="0" c:type="gpointer">
              <type name="guint8"/>
            </array>
          </parameter>
          <parameter name="maxsize" transfer-ownership="none">
            <doc xml:space="preserve">allocated size of @data</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">offset in @data</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">size of valid data</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="user_data"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">user_data</doc>
            <type name="gpointer" c:type="gpointer"/>
          </parameter>
          <parameter name="notify"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1"
                     scope="async"
                     closure="5">
            <doc xml:space="preserve">called with @user_data when the memory is freed</doc>
            <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
          </parameter>
        </parameters>
      </constructor>
      <method name="add_meta" c:identifier="gst_buffer_add_meta">
        <doc xml:space="preserve">Add metadata for @info to @buffer using the parameters in @params.</doc>
1749
        <return-value transfer-ownership="none" nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775
          <doc xml:space="preserve">the metadata for the api in @info on @buffer.</doc>
          <type name="Meta" c:type="GstMeta*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="info" transfer-ownership="none">
            <doc xml:space="preserve">a #GstMetaInfo</doc>
            <type name="MetaInfo" c:type="const GstMetaInfo*"/>
          </parameter>
          <parameter name="params"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">params for @info</doc>
            <type name="gpointer" c:type="gpointer"/>
          </parameter>
        </parameters>
      </method>
      <method name="add_parent_buffer_meta"
              c:identifier="gst_buffer_add_parent_buffer_meta"
              version="1.6">
        <doc xml:space="preserve">Add a #GstParentBufferMeta to @buffer that holds a reference on
@ref until the buffer is freed.</doc>
1776
        <return-value transfer-ownership="none" nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813
          <doc xml:space="preserve">The #GstParentBufferMeta that was added to the buffer</doc>
          <type name="ParentBufferMeta" c:type="GstParentBufferMeta*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="ref" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer to ref</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </parameter>
        </parameters>
      </method>
      <method name="add_protection_meta"
              c:identifier="gst_buffer_add_protection_meta"
              version="1.6">
        <doc xml:space="preserve">Attaches protection metadata to a #GstBuffer.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">a pointer to the added #GstProtectionMeta if successful; %NULL if
unsuccessful.</doc>
          <type name="ProtectionMeta" c:type="GstProtectionMeta*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">#GstBuffer holding an encrypted sample, to which protection
    metadata should be added.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="info" transfer-ownership="full">
            <doc xml:space="preserve">a #GstStructure holding cryptographic
    information relating to the sample contained in @buffer. This
    function takes ownership of @info.</doc>
            <type name="Structure" c:type="GstStructure*"/>
          </parameter>
        </parameters>
      </method>
1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843
      <method name="add_reference_timestamp_meta"
              c:identifier="gst_buffer_add_reference_timestamp_meta"
              version="1.14">
        <doc xml:space="preserve">Add a #GstReferenceTimestampMeta to @buffer that holds a @timestamp and
optionally @duration based on a specific timestamp @reference. See the
documentation of #GstReferenceTimestampMeta for details.</doc>
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve">The #GstReferenceTimestampMeta that was added to the buffer</doc>
          <type name="ReferenceTimestampMeta"
                c:type="GstReferenceTimestampMeta*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="reference" transfer-ownership="none">
            <doc xml:space="preserve">identifier for the timestamp reference.</doc>
            <type name="Caps" c:type="GstCaps*"/>
          </parameter>
          <parameter name="timestamp" transfer-ownership="none">
            <doc xml:space="preserve">timestamp</doc>
            <type name="ClockTime" c:type="GstClockTime"/>
          </parameter>
          <parameter name="duration" transfer-ownership="none">
            <doc xml:space="preserve">duration, or %GST_CLOCK_TIME_NONE</doc>
            <type name="ClockTime" c:type="GstClockTime"/>
          </parameter>
        </parameters>
      </method>
Sebastian Dröge's avatar
Sebastian Dröge committed
1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014
      <method name="append" c:identifier="gst_buffer_append">
        <doc xml:space="preserve">Append all the memory from @buf2 to @buf1. The result buffer will contain a
concatenation of the memory of @buf1 and @buf2.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">the new #GstBuffer that contains the memory
    of the two source buffers.</doc>
          <type name="Buffer" c:type="GstBuffer*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buf1" transfer-ownership="full">
            <doc xml:space="preserve">the first source #GstBuffer to append.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="buf2" transfer-ownership="full">
            <doc xml:space="preserve">the second source #GstBuffer to append.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </parameter>
        </parameters>
      </method>
      <method name="append_memory" c:identifier="gst_buffer_append_memory">
        <doc xml:space="preserve">Append the memory block @mem to @buffer. This function takes
ownership of @mem and thus doesn't increase its refcount.

This function is identical to gst_buffer_insert_memory() with an index of -1.
See gst_buffer_insert_memory() for more details.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="mem" transfer-ownership="full">
            <doc xml:space="preserve">a #GstMemory.</doc>
            <type name="Memory" c:type="GstMemory*"/>
          </parameter>
        </parameters>
      </method>
      <method name="append_region" c:identifier="gst_buffer_append_region">
        <doc xml:space="preserve">Append @size bytes at @offset from @buf2 to @buf1. The result buffer will
contain a concatenation of the memory of @buf1 and the requested region of
@buf2.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">the new #GstBuffer that contains the memory
    of the two source buffers.</doc>
          <type name="Buffer" c:type="GstBuffer*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buf1" transfer-ownership="full">
            <doc xml:space="preserve">the first source #GstBuffer to append.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="buf2" transfer-ownership="full">
            <doc xml:space="preserve">the second source #GstBuffer to append.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">the offset in @buf2</doc>
            <type name="gssize" c:type="gssize"/>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">the size or -1 of @buf2</doc>
            <type name="gssize" c:type="gssize"/>
          </parameter>
        </parameters>
      </method>
      <method name="copy_deep"
              c:identifier="gst_buffer_copy_deep"
              version="1.6">
        <doc xml:space="preserve">Create a copy of the given buffer. This will make a newly allocated
copy of the data the source buffer contains.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a new copy of @buf.</doc>
          <type name="Buffer" c:type="GstBuffer*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buf" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="const GstBuffer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="copy_into" c:identifier="gst_buffer_copy_into">
        <doc xml:space="preserve">Copies the information from @src into @dest.

If @dest already contains memory and @flags contains GST_BUFFER_COPY_MEMORY,
the memory from @src will be appended to @dest.

@flags indicate which fields will be copied.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the copying succeeded, %FALSE otherwise.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="dest" transfer-ownership="none">
            <doc xml:space="preserve">a destination #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="src" transfer-ownership="none">
            <doc xml:space="preserve">a source #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </parameter>
          <parameter name="flags" transfer-ownership="none">
            <doc xml:space="preserve">flags indicating what metadata fields should be copied.</doc>
            <type name="BufferCopyFlags" c:type="GstBufferCopyFlags"/>
          </parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">offset to copy from</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">total size to copy. If -1, all data is copied.</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
        </parameters>
      </method>
      <method name="copy_region" c:identifier="gst_buffer_copy_region">
        <doc xml:space="preserve">Creates a sub-buffer from @parent at @offset and @size.
This sub-buffer uses the actual memory space of the parent buffer.
This function will copy the offset and timestamp fields when the
offset is 0. If not, they will be set to #GST_CLOCK_TIME_NONE and
#GST_BUFFER_OFFSET_NONE.
If @offset equals 0 and @size equals the total size of @buffer, the
duration and offset end fields are also copied. If not they will be set
to #GST_CLOCK_TIME_NONE and #GST_BUFFER_OFFSET_NONE.

MT safe.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">the new #GstBuffer or %NULL if the arguments were
    invalid.</doc>
          <type name="Buffer" c:type="GstBuffer*"/>
        </return-value>
        <parameters>
          <instance-parameter name="parent" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="flags" transfer-ownership="none">
            <doc xml:space="preserve">the #GstBufferCopyFlags</doc>
            <type name="BufferCopyFlags" c:type="GstBufferCopyFlags"/>
          </parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">the offset into parent #GstBuffer at which the new sub-buffer
         begins.</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">the size of the new #GstBuffer sub-buffer, in bytes. If -1, all
       data is copied.</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
        </parameters>
      </method>
      <method name="extract" c:identifier="gst_buffer_extract">
        <doc xml:space="preserve">Copy @size bytes starting from @offset in @buffer to @dest.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">The amount of bytes extracted. This value can be lower than @size
   when @buffer did not contain enough data.</doc>
          <type name="gsize" c:type="gsize"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">the offset to extract</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="dest"
2015 2016 2017 2018 2019 2020 2021 2022
                     direction="out"
                     caller-allocates="1"
                     transfer-ownership="none">
            <doc xml:space="preserve">
    the destination address</doc>
            <array length="2" zero-terminated="0" c:type="gpointer">
              <type name="guint8"/>
            </array>
Sebastian Dröge's avatar
Sebastian Dröge committed
2023
          </parameter>
2024 2025 2026 2027
          <parameter name="size"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full">
Sebastian Dröge's avatar
Sebastian Dröge committed
2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058
            <doc xml:space="preserve">the size to extract</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
        </parameters>
      </method>
      <method name="extract_dup"
              c:identifier="gst_buffer_extract_dup"
              version="1.0.10">
        <doc xml:space="preserve">Extracts a copy of at most @size bytes the data at @offset into
newly-allocated memory. @dest must be freed using g_free() when done.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">the offset to extract</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">the size to extract</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="dest"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full">
            <doc xml:space="preserve">A pointer where
2059
 the destination array will be written. Might be %NULL if the size is 0.</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187
            <array length="3" zero-terminated="0" c:type="gpointer*">
              <type name="guint8"/>
            </array>
          </parameter>
          <parameter name="dest_size"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full">
            <doc xml:space="preserve">A location where the size of @dest can be written</doc>
            <type name="gsize" c:type="gsize*"/>
          </parameter>
        </parameters>
      </method>
      <method name="fill" c:identifier="gst_buffer_fill">
        <doc xml:space="preserve">Copy @size bytes from @src to @buffer at @offset.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">The amount of bytes copied. This value can be lower than @size
   when @buffer did not contain enough data.</doc>
          <type name="gsize" c:type="gsize"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">the offset to fill</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="src" transfer-ownership="none">
            <doc xml:space="preserve">the source address</doc>
            <array length="2" zero-terminated="0" c:type="gconstpointer">
              <type name="guint8"/>
            </array>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">the size to fill</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
        </parameters>
      </method>
      <method name="find_memory" c:identifier="gst_buffer_find_memory">
        <doc xml:space="preserve">Find the memory blocks that span @size bytes starting from @offset
in @buffer.

When this function returns %TRUE, @idx will contain the index of the first
memory block where the byte for @offset can be found and @length contains the
number of memory blocks containing the @size remaining bytes. @skip contains
the number of bytes to skip in the memory block at @idx to get to the byte
for @offset.

@size can be -1 to get all the memory blocks after @idx.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE when @size bytes starting from @offset could be found in
@buffer and @idx, @length and @skip will be filled.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">an offset</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">a size</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="idx"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full">
            <doc xml:space="preserve">pointer to index</doc>
            <type name="guint" c:type="guint*"/>
          </parameter>
          <parameter name="length"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full">
            <doc xml:space="preserve">pointer to length</doc>
            <type name="guint" c:type="guint*"/>
          </parameter>
          <parameter name="skip"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full">
            <doc xml:space="preserve">pointer to skip</doc>
            <type name="gsize" c:type="gsize*"/>
          </parameter>
        </parameters>
      </method>
      <method name="foreach_meta" c:identifier="gst_buffer_foreach_meta">
        <doc xml:space="preserve">Call @func with @user_data for each meta in @buffer.

@func can modify the passed meta pointer or its contents. The return value
of @func define if this function returns or if the remaining metadata items
in the buffer should be skipped.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%FALSE when @func returned %FALSE for one of the metadata.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="func"
                     transfer-ownership="none"
                     scope="call"
                     closure="1">
            <doc xml:space="preserve">a #GstBufferForeachMetaFunc to call</doc>
            <type name="BufferForeachMetaFunc"
                  c:type="GstBufferForeachMetaFunc"/>
          </parameter>
          <parameter name="user_data"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">user data passed to @func</doc>
            <type name="gpointer" c:type="gpointer"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_all_memory" c:identifier="gst_buffer_get_all_memory">
        <doc xml:space="preserve">Get all the memory block in @buffer. The memory blocks will be merged
into one large #GstMemory.</doc>
2188
        <return-value transfer-ownership="full" nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216
          <doc xml:space="preserve">a #GstMemory that contains the merged memory.
Use gst_memory_unref () after usage.</doc>
          <type name="Memory" c:type="GstMemory*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_flags"
              c:identifier="gst_buffer_get_flags"
              version="1.10">
        <doc xml:space="preserve">Get the #GstBufferFlags flags set on this buffer.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the flags set on this buffer.</doc>
          <type name="BufferFlags" c:type="GstBufferFlags"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_memory" c:identifier="gst_buffer_get_memory">
        <doc xml:space="preserve">Get the memory block at index @idx in @buffer.</doc>
2217
        <return-value transfer-ownership="full" nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238
          <doc xml:space="preserve">a #GstMemory that contains the data of the
memory block at @idx. Use gst_memory_unref () after usage.</doc>
          <type name="Memory" c:type="GstMemory*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">an index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_memory_range"
              c:identifier="gst_buffer_get_memory_range">
        <doc xml:space="preserve">Get @length memory blocks in @buffer starting at @idx. The memory blocks will
be merged into one large #GstMemory.

If @length is -1, all memory starting from @idx is merged.</doc>
2239
        <return-value transfer-ownership="full" nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280
          <doc xml:space="preserve">a #GstMemory that contains the merged data of @length
   blocks starting at @idx. Use gst_memory_unref () after usage.</doc>
          <type name="Memory" c:type="GstMemory*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">an index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
          <parameter name="length" transfer-ownership="none">
            <doc xml:space="preserve">a length</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_meta" c:identifier="gst_buffer_get_meta">
        <doc xml:space="preserve">Get the metadata for @api on buffer. When there is no such metadata, %NULL is
returned. If multiple metadata with the given @api are attached to this
buffer only the first one is returned.  To handle multiple metadata with a
given API use gst_buffer_iterate_meta() or gst_buffer_foreach_meta() instead
and check the meta-&gt;info.api member for the API type.</doc>
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve">the metadata for @api on
@buffer.</doc>
          <type name="Meta" c:type="GstMeta*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="api" transfer-ownership="none">
            <doc xml:space="preserve">the #GType of an API</doc>
            <type name="GType" c:type="GType"/>
          </parameter>
        </parameters>
      </method>
2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326
      <method name="get_n_meta"
              c:identifier="gst_buffer_get_n_meta"
              version="1.14">
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">number of metas of type @api_type on @buffer.</doc>
          <type name="guint" c:type="guint"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="api_type" transfer-ownership="none">
            <doc xml:space="preserve">the #GType of an API</doc>
            <type name="GType" c:type="GType"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_reference_timestamp_meta"
              c:identifier="gst_buffer_get_reference_timestamp_meta"
              version="1.14">
        <doc xml:space="preserve">Find the first #GstReferenceTimestampMeta on @buffer that conforms to
@reference. Conformance is tested by checking if the meta's reference is a
subset of @reference.

Buffers can contain multiple #GstReferenceTimestampMeta metadata items.</doc>
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve">the #GstReferenceTimestampMeta or %NULL when there
is no such metadata on @buffer.</doc>
          <type name="ReferenceTimestampMeta"
                c:type="GstReferenceTimestampMeta*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="reference"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">a reference #GstCaps</doc>
            <type name="Caps" c:type="GstCaps*"/>
          </parameter>
        </parameters>
      </method>
Sebastian Dröge's avatar
Sebastian Dröge committed
2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524
      <method name="get_size" c:identifier="gst_buffer_get_size">
        <doc xml:space="preserve">Get the total size of the memory blocks in @buffer.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">total size of the memory blocks in @buffer.</doc>
          <type name="gsize" c:type="gsize"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_sizes" c:identifier="gst_buffer_get_sizes">
        <doc xml:space="preserve">Get the total size of the memory blocks in @b.

When not %NULL, @offset will contain the offset of the data in the
first memory block in @buffer and @maxsize will contain the sum of
the size and @offset and the amount of extra padding on the last
memory block.  @offset and @maxsize can be used to resize the
buffer memory blocks with gst_buffer_resize().</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">total size of the memory blocks in @buffer.</doc>
          <type name="gsize" c:type="gsize"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="offset"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full"
                     optional="1"
                     allow-none="1">
            <doc xml:space="preserve">a pointer to the offset</doc>
            <type name="gsize" c:type="gsize*"/>
          </parameter>
          <parameter name="maxsize"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full"
                     optional="1"
                     allow-none="1">
            <doc xml:space="preserve">a pointer to the maxsize</doc>
            <type name="gsize" c:type="gsize*"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_sizes_range" c:identifier="gst_buffer_get_sizes_range">
        <doc xml:space="preserve">Get the total size of @length memory blocks stating from @idx in @buffer.

When not %NULL, @offset will contain the offset of the data in the
memory block in @buffer at @idx and @maxsize will contain the sum of the size
and @offset and the amount of extra padding on the memory block at @idx +
@length -1.
@offset and @maxsize can be used to resize the buffer memory blocks with
gst_buffer_resize_range().</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">total size of @length memory blocks starting at @idx in @buffer.</doc>
          <type name="gsize" c:type="gsize"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">an index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
          <parameter name="length" transfer-ownership="none">
            <doc xml:space="preserve">a length</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="offset"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full"
                     optional="1"
                     allow-none="1">
            <doc xml:space="preserve">a pointer to the offset</doc>
            <type name="gsize" c:type="gsize*"/>
          </parameter>
          <parameter name="maxsize"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full"
                     optional="1"
                     allow-none="1">
            <doc xml:space="preserve">a pointer to the maxsize</doc>
            <type name="gsize" c:type="gsize*"/>
          </parameter>
        </parameters>
      </method>
      <method name="has_flags" c:identifier="gst_buffer_has_flags">
        <return-value transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="flags" transfer-ownership="none">
            <type name="BufferFlags" c:type="GstBufferFlags"/>
          </parameter>
        </parameters>
      </method>
      <method name="insert_memory" c:identifier="gst_buffer_insert_memory">
        <doc xml:space="preserve">Insert the memory block @mem to @buffer at @idx. This function takes ownership
of @mem and thus doesn't increase its refcount.

Only gst_buffer_get_max_memory() can be added to a buffer. If more memory is
added, existing memory blocks will automatically be merged to make room for
the new memory.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">the index to add the memory at, or -1 to append it to the end</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="mem" transfer-ownership="full">
            <doc xml:space="preserve">a #GstMemory.</doc>
            <type name="Memory" c:type="GstMemory*"/>
          </parameter>
        </parameters>
      </method>
      <method name="is_all_memory_writable"
              c:identifier="gst_buffer_is_all_memory_writable"
              version="1.4">
        <doc xml:space="preserve">Check if all memory blocks in @buffer are writable.

Note that this function does not check if @buffer is writable, use
gst_buffer_is_writable() to check that if needed.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if all memory blocks in @buffer are writable</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="is_memory_range_writable"
              c:identifier="gst_buffer_is_memory_range_writable"
              version="1.4">
        <doc xml:space="preserve">Check if @length memory blocks in @buffer starting from @idx are writable.

@length can be -1 to check all the memory blocks after @idx.

Note that this function does not check if @buffer is writable, use
gst_buffer_is_writable() to check that if needed.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the memory range is writable</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">an index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
          <parameter name="length" transfer-ownership="none">
            <doc xml:space="preserve">a length should not be 0</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
        </parameters>
      </method>
      <method name="iterate_meta"
              c:identifier="gst_buffer_iterate_meta"
              introspectable="0">
        <doc xml:space="preserve">Retrieve the next #GstMeta after @current. If @state points
to %NULL, the first metadata is returned.

@state will be updated with an opaque state pointer</doc>
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve">The next #GstMeta or %NULL
when there are no more items.</doc>
          <type name="Meta" c:type="GstMeta*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="state"
2525 2526
                     direction="out"
                     caller-allocates="1"
Sebastian Dröge's avatar
Sebastian Dröge committed
2527
                     transfer-ownership="none"
2528
                     nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553
            <doc xml:space="preserve">an opaque state pointer</doc>
            <type name="gpointer" c:type="gpointer*"/>
          </parameter>
        </parameters>
      </method>
      <method name="iterate_meta_filtered"
              c:identifier="gst_buffer_iterate_meta_filtered"
              version="1.12"
              introspectable="0">
        <doc xml:space="preserve">Retrieve the next #GstMeta of type @meta_api_type after the current one
according to @state. If @state points to %NULL, the first metadata of
type @meta_api_type is returned.

@state will be updated with an opaque state pointer</doc>
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve">The next #GstMeta of type
@meta_api_type or %NULL when there are no more items.</doc>
          <type name="Meta" c:type="GstMeta*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="state"
2554 2555
                     direction="out"
                     caller-allocates="1"
Sebastian Dröge's avatar
Sebastian Dröge committed
2556
                     transfer-ownership="none"
2557
                     nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718
            <doc xml:space="preserve">an opaque state pointer</doc>
            <type name="gpointer" c:type="gpointer*"/>
          </parameter>
          <parameter name="meta_api_type" transfer-ownership="none">
            <doc xml:space="preserve">only return #GstMeta of this type</doc>
            <type name="GType" c:type="GType"/>
          </parameter>
        </parameters>
      </method>
      <method name="map" c:identifier="gst_buffer_map">
        <doc xml:space="preserve">This function fills @info with the #GstMapInfo of all merged memory
blocks in @buffer.

@flags describe the desired access of the memory. When @flags is
#GST_MAP_WRITE, @buffer should be writable (as returned from
gst_buffer_is_writable()).

When @buffer is writable but the memory isn't, a writable copy will
automatically be created and returned. The readonly copy of the
buffer memory will then also be replaced with this writable copy.

The memory in @info should be unmapped with gst_buffer_unmap() after
usage.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the map succeeded and @info contains valid data.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="info"
                     direction="out"
                     caller-allocates="1"
                     transfer-ownership="none">
            <doc xml:space="preserve">info about the mapping</doc>
            <type name="MapInfo" c:type="GstMapInfo*"/>
          </parameter>
          <parameter name="flags" transfer-ownership="none">
            <doc xml:space="preserve">flags for the mapping</doc>
            <type name="MapFlags" c:type="GstMapFlags"/>
          </parameter>
        </parameters>
      </method>
      <method name="map_range" c:identifier="gst_buffer_map_range">
        <doc xml:space="preserve">This function fills @info with the #GstMapInfo of @length merged memory blocks
starting at @idx in @buffer. When @length is -1, all memory blocks starting
from @idx are merged and mapped.

@flags describe the desired access of the memory. When @flags is
#GST_MAP_WRITE, @buffer should be writable (as returned from
gst_buffer_is_writable()).

When @buffer is writable but the memory isn't, a writable copy will
automatically be created and returned. The readonly copy of the buffer memory
will then also be replaced with this writable copy.

The memory in @info should be unmapped with gst_buffer_unmap() after usage.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the map succeeded and @info contains valid
data.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">an index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
          <parameter name="length" transfer-ownership="none">
            <doc xml:space="preserve">a length</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="info"
                     direction="out"
                     caller-allocates="1"
                     transfer-ownership="none">
            <doc xml:space="preserve">info about the mapping</doc>
            <type name="MapInfo" c:type="GstMapInfo*"/>
          </parameter>
          <parameter name="flags" transfer-ownership="none">
            <doc xml:space="preserve">flags for the mapping</doc>
            <type name="MapFlags" c:type="GstMapFlags"/>
          </parameter>
        </parameters>
      </method>
      <method name="memcmp" c:identifier="gst_buffer_memcmp">
        <doc xml:space="preserve">Compare @size bytes starting from @offset in @buffer with the memory in @mem.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">0 if the memory is equal.</doc>
          <type name="gint" c:type="gint"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">the offset in @buffer</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="mem" transfer-ownership="none">
            <doc xml:space="preserve">the memory to compare</doc>
            <array length="2" zero-terminated="0" c:type="gconstpointer">
              <type name="guint8"/>
            </array>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">the size to compare</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
        </parameters>
      </method>
      <method name="memset" c:identifier="gst_buffer_memset">
        <doc xml:space="preserve">Fill @buf with @size bytes with @val starting from @offset.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">The amount of bytes filled. This value can be lower than @size
   when @buffer did not contain enough data.</doc>
          <type name="gsize" c:type="gsize"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">the offset in @buffer</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="val" transfer-ownership="none">
            <doc xml:space="preserve">the value to set</doc>
            <type name="guint8" c:type="guint8"/>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">the size to set</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
        </parameters>
      </method>
      <method name="n_memory" c:identifier="gst_buffer_n_memory">
        <doc xml:space="preserve">Get the amount of memory blocks that this buffer has. This amount is never
larger than what gst_buffer_get_max_memory() returns.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the number of memory blocks this buffer is made of.</doc>
          <type name="guint" c:type="guint"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="peek_memory" c:identifier="gst_buffer_peek_memory">
        <doc xml:space="preserve">Get the memory block at @idx in @buffer. The memory block stays valid until
the memory block in @buffer is removed, replaced or merged, typically with
any call that modifies the memory in @buffer.</doc>
2719
        <return-value transfer-ownership="none" nullable="1">
Sebastian Dröge's avatar
Sebastian Dröge committed
2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090
          <doc xml:space="preserve">the #GstMemory at @idx.</doc>
          <type name="Memory" c:type="GstMemory*"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">an index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
      <method name="prepend_memory" c:identifier="gst_buffer_prepend_memory">
        <doc xml:space="preserve">Prepend the memory block @mem to @buffer. This function takes
ownership of @mem and thus doesn't increase its refcount.

This function is identical to gst_buffer_insert_memory() with an index of 0.
See gst_buffer_insert_memory() for more details.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="mem" transfer-ownership="full">
            <doc xml:space="preserve">a #GstMemory.</doc>
            <type name="Memory" c:type="GstMemory*"/>
          </parameter>
        </parameters>
      </method>
      <method name="remove_all_memory"
              c:identifier="gst_buffer_remove_all_memory">
        <doc xml:space="preserve">Remove all the memory blocks in @buffer.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="remove_memory" c:identifier="gst_buffer_remove_memory">
        <doc xml:space="preserve">Remove the memory block in @b at index @i.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">an index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
      <method name="remove_memory_range"
              c:identifier="gst_buffer_remove_memory_range">
        <doc xml:space="preserve">Remove @length memory blocks in @buffer starting from @idx.

@length can be -1, in which case all memory starting from @idx is removed.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">an index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
          <parameter name="length" transfer-ownership="none">
            <doc xml:space="preserve">a length</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
        </parameters>
      </method>
      <method name="remove_meta" c:identifier="gst_buffer_remove_meta">
        <doc xml:space="preserve">Remove the metadata for @meta on @buffer.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the metadata existed and was removed, %FALSE if no such
metadata was on @buffer.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="meta" transfer-ownership="none">
            <doc xml:space="preserve">a #GstMeta</doc>
            <type name="Meta" c:type="GstMeta*"/>
          </parameter>
        </parameters>
      </method>
      <method name="replace_all_memory"
              c:identifier="gst_buffer_replace_all_memory">
        <doc xml:space="preserve">Replaces all memory in @buffer with @mem.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="mem" transfer-ownership="full">
            <doc xml:space="preserve">a #GstMemory</doc>
            <type name="Memory" c:type="GstMemory*"/>
          </parameter>
        </parameters>
      </method>
      <method name="replace_memory" c:identifier="gst_buffer_replace_memory">
        <doc xml:space="preserve">Replaces the memory block at index @idx in @buffer with @mem.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">an index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
          <parameter name="mem" transfer-ownership="full">
            <doc xml:space="preserve">a #GstMemory</doc>
            <type name="Memory" c:type="GstMemory*"/>
          </parameter>
        </parameters>
      </method>
      <method name="replace_memory_range"
              c:identifier="gst_buffer_replace_memory_range">
        <doc xml:space="preserve">Replaces @length memory blocks in @buffer starting at @idx with @mem.

If @length is -1, all memory starting from @idx will be removed and
replaced with @mem.

@buffer should be writable.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">an index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
          <parameter name="length" transfer-ownership="none">
            <doc xml:space="preserve">a length should not be 0</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="mem" transfer-ownership="full">
            <doc xml:space="preserve">a #GstMemory</doc>
            <type name="Memory" c:type="GstMemory*"/>
          </parameter>
        </parameters>
      </method>
      <method name="resize" c:identifier="gst_buffer_resize">
        <doc xml:space="preserve">Set the offset and total size of the memory blocks in @buffer.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">the offset adjustment</doc>
            <type name="gssize" c:type="gssize"/>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">the new size or -1 to just adjust the offset</doc>
            <type name="gssize" c:type="gssize"/>
          </parameter>
        </parameters>
      </method>
      <method name="resize_range" c:identifier="gst_buffer_resize_range">
        <doc xml:space="preserve">Set the total size of the @length memory blocks starting at @idx in
@buffer</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if resizing succeeded, %FALSE otherwise.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">an index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
          <parameter name="length" transfer-ownership="none">
            <doc xml:space="preserve">a length</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="offset" transfer-ownership="none">
            <doc xml:space="preserve">the offset adjustment</doc>
            <type name="gssize" c:type="gssize"/>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">the new size or -1 to just adjust the offset</doc>
            <type name="gssize" c:type="gssize"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_flags"
              c:identifier="gst_buffer_set_flags"
              version="1.10">
        <doc xml:space="preserve">Sets one or more buffer flags on a buffer.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if @flags were successfully set on buffer.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="flags" transfer-ownership="none">
            <doc xml:space="preserve">the #GstBufferFlags to set.</doc>
            <type name="BufferFlags" c:type="GstBufferFlags"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_size" c:identifier="gst_buffer_set_size">
        <doc xml:space="preserve">Set the total size of the memory blocks in @buffer.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">the new size</doc>
            <type name="gssize" c:type="gssize"/>
          </parameter>
        </parameters>
      </method>
      <method name="unmap" c:identifier="gst_buffer_unmap">
        <doc xml:space="preserve">Release the memory previously mapped with gst_buffer_map().</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer.</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="info" transfer-ownership="none">
            <doc xml:space="preserve">a #GstMapInfo</doc>
            <type name="MapInfo" c:type="GstMapInfo*"/>
          </parameter>
        </parameters>
      </method>
      <method name="unset_flags"
              c:identifier="gst_buffer_unset_flags"
              version="1.10">
        <doc xml:space="preserve">Clears one or more buffer flags.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">true if @flags is successfully cleared from buffer.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="buffer" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </instance-parameter>
          <parameter name="flags" transfer-ownership="none">
            <doc xml:space="preserve">the #GstBufferFlags to clear</doc>
            <type name="BufferFlags" c:type="GstBufferFlags"/>
          </parameter>
        </parameters>
      </method>
      <function name="get_max_memory"
                c:identifier="gst_buffer_get_max_memory"
                version="1.2">
        <doc xml:space="preserve">Get the maximum amount of memory blocks that a buffer can hold. This is a
compile time constant that can be queried with the function.

When more memory blocks are added, existing memory blocks will be merged
together to make room for the new block.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the maximum amount of memory blocks that a buffer can hold.</doc>
          <type name="guint" c:type="guint"/>
        </return-value>
      </function>
    </record>
    <bitfield name="BufferCopyFlags"
              glib:type-name="GstBufferCopyFlags"
              glib:get-type="gst_buffer_copy_flags_get_type"
              c:type="GstBufferCopyFlags">
      <doc xml:space="preserve">A set of flags that can be provided to the gst_buffer_copy_into()
function to specify which items should be copied.</doc>
      <member name="none"
              value="0"
              c:identifier="GST_BUFFER_COPY_NONE"
              glib:nick="none">
        <doc xml:space="preserve">copy nothing</doc>
      </member>
      <member name="flags"
              value="1"
              c:identifier="GST_BUFFER_COPY_FLAGS"
              glib:nick="flags">
        <doc xml:space="preserve">flag indicating that buffer flags should be copied</doc>
      </member>
      <member name="timestamps"
              value="2"
              c:identifier="GST_BUFFER_COPY_TIMESTAMPS"
              glib:nick="timestamps">
        <doc xml:space="preserve">flag indicating that buffer pts, dts,
  duration, offset and offset_end should be copied</doc>
      </member>
      <member name="meta"
              value="4"
              c:identifier="GST_BUFFER_COPY_META"
              glib:nick="meta">
        <doc xml:space="preserve">flag indicating that buffer meta should be
  copied</doc>
      </member>
      <member name="memory"
              value="8"
              c:identifier="GST_BUFFER_COPY_MEMORY"
              glib:nick="memory">
        <doc xml:space="preserve">flag indicating that buffer memory should be reffed
  and appended to already existing memory. Unless the memory is marked as
  NO_SHARE, no actual copy of the memory is made but it is simply reffed.
  Add @GST_BUFFER_COPY_DEEP to force a real copy.</doc>
      </member>
      <member name="merge"
              value="16"
              c:identifier="GST_BUFFER_COPY_MERGE"
              glib:nick="merge">
        <doc xml:space="preserve">flag indicating that buffer memory should be
  merged</doc>
      </member>
      <member name="deep"
              value="32"
              c:identifier="GST_BUFFER_COPY_DEEP"
              glib:nick="deep">
        <doc xml:space="preserve">flag indicating that memory should always be
  copied instead of reffed (Since 1.2)</doc>
      </member>
    </bitfield>
    <bitfield name="BufferFlags"
              glib:type-name="GstBufferFlags"
              glib:get-type="gst_buffer_flags_get_type"
              c:type="GstBufferFlags">
      <doc xml:space="preserve">A set of buffer flags used to describe properties of a #GstBuffer.</doc>
      <member name="live"
              value="16"
              c:identifier="GST_BUFFER_FLAG_LIVE"
              glib:nick="live">
        <doc xml:space="preserve">the buffer is live data and should be discarded in
3091
                                the PAUSED state.</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
3092 3093 3094 3095 3096 3097
      </member>
      <member name="decode_only"
              value="32"
              c:identifier="GST_BUFFER_FLAG_DECODE_ONLY"
              glib:nick="decode-only">
        <doc xml:space="preserve">the buffer contains data that should be dropped
3098 3099 3100
                                because it will be clipped against the segment
                                boundaries or because it does not contain data
                                that should be shown to the user.</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
3101 3102 3103 3104 3105 3106
      </member>
      <member name="discont"
              value="64"
              c:identifier="GST_BUFFER_FLAG_DISCONT"
              glib:nick="discont">
        <doc xml:space="preserve">the buffer marks a data discontinuity in the stream.
3107 3108
                                This typically occurs after a seek or a dropped buffer
                                from a live or network source.</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
3109 3110 3111 3112 3113 3114
      </member>
      <member name="resync"
              value="128"
              c:identifier="GST_BUFFER_FLAG_RESYNC"
              glib:nick="resync">
        <doc xml:space="preserve">the buffer timestamps might have a discontinuity
3115
                                and this buffer is a good point to resynchronize.</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127
      </member>
      <member name="corrupted"
              value="256"
              c:identifier="GST_BUFFER_FLAG_CORRUPTED"
              glib:nick="corrupted">
        <doc xml:space="preserve">the buffer data is corrupted.</doc>
      </member>
      <member name="marker"
              value="512"
              c:identifier="GST_BUFFER_FLAG_MARKER"
              glib:nick="marker">
        <doc xml:space="preserve">the buffer contains a media specific marker. for
3128 3129
                                video this is typically the end of a frame boundary, for audio
                                this is usually the start of a talkspurt.</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
3130 3131 3132 3133 3134 3135
      </member>
      <member name="header"
              value="1024"
              c:identifier="GST_BUFFER_FLAG_HEADER"
              glib:nick="header">
        <doc xml:space="preserve">the buffer contains header information that is
3136
                                needed to decode the following data.</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
3137 3138 3139 3140 3141 3142
      </member>
      <member name="gap"
              value="2048"
              c:identifier="GST_BUFFER_FLAG_GAP"
              glib:nick="gap">
        <doc xml:space="preserve">the buffer has been created to fill a gap in the
3143 3144 3145
                                stream and contains media neutral data (elements can
                                switch to optimized code path that ignores the buffer
                                content).</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
3146 3147 3148 3149 3150 3151
      </member>
      <member name="droppable"
              value="4096"
              c:identifier="GST_BUFFER_FLAG_DROPPABLE"
              glib:nick="droppable">
        <doc xml:space="preserve">the buffer can be dropped without breaking the
3152
                                stream, for example to reduce bandwidth.</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164
      </member>
      <member name="delta_unit"
              value="8192"
              c:identifier="GST_BUFFER_FLAG_DELTA_UNIT"
              glib:nick="delta-unit">
        <doc xml:space="preserve">this unit cannot be decoded independently.</doc>
      </member>
      <member name="tag_memory"
              value="16384"
              c:identifier="GST_BUFFER_FLAG_TAG_MEMORY"
              glib:nick="tag-memory">
        <doc xml:space="preserve">this flag is set when memory of the buffer
3165
                                is added/removed</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
3166 3167 3168 3169 3170 3171 3172 3173 3174
      </member>
      <member name="sync_after"
              value="32768"
              c:identifier="GST_BUFFER_FLAG_SYNC_AFTER"
              glib:nick="sync-after">
        <doc xml:space="preserve">Elements which write to disk or permanent
				 storage should ensure the data is synced after
				 writing the contents of this buffer. (Since 1.6)</doc>
      </member>
3175 3176 3177 3178 3179 3180 3181 3182 3183 3184
      <member name="non_droppable"
              value="65536"
              c:identifier="GST_BUFFER_FLAG_NON_DROPPABLE"
              glib:nick="non-droppable">
        <doc xml:space="preserve">This buffer is important and should not be dropped.
                                This can be used to mark important buffers, e.g. to flag
                                RTP packets carrying keyframes or codec setup data for RTP
                                Forward Error Correction purposes, or to prevent still video
                                frames from being dropped by elements due to QoS. (Since 1.14)</doc>
      </member>
Sebastian Dröge's avatar
Sebastian Dröge committed
3185 3186 3187 3188 3189
      <member name="last"
              value="1048576"
              c:identifier="GST_BUFFER_FLAG_LAST"
              glib:nick="last">
        <doc xml:space="preserve">additional media specific flags can be added starting from
3190
                                this flag.</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271
      </member>
    </bitfield>
    <callback name="BufferForeachMetaFunc" c:type="GstBufferForeachMetaFunc">
      <doc xml:space="preserve">A function that will be called from gst_buffer_foreach_meta(). The @meta
field will point to a the reference of the meta.

@buffer should not be modified from this callback.

When this function returns %TRUE, the next meta will be
returned. When %FALSE is returned, gst_buffer_foreach_meta() will return.

When @meta is set to %NULL, the item will be removed from the buffer.</doc>
      <return-value transfer-ownership="none">
        <doc xml:space="preserve">%FALSE when gst_buffer_foreach_meta() should stop</doc>
        <type name="gboolean" c:type="gboolean"/>
      </return-value>
      <parameters>
        <parameter name="buffer" transfer-ownership="none">
          <doc xml:space="preserve">a #GstBuffer</doc>
          <type name="Buffer" c:type="GstBuffer*"/>
        </parameter>
        <parameter name="meta"
                   direction="out"
                   caller-allocates="0"
                   transfer-ownership="full"
                   nullable="1">
          <doc xml:space="preserve">a pointer to a #GstMeta</doc>
          <type name="Meta" c:type="GstMeta**"/>
        </parameter>
        <parameter name="user_data"
                   transfer-ownership="none"
                   nullable="1"
                   allow-none="1"
                   closure="2">
          <doc xml:space="preserve">user data passed to gst_buffer_foreach_meta()</doc>
          <type name="gpointer" c:type="gpointer"/>
        </parameter>
      </parameters>
    </callback>
    <record name="BufferList"
            c:type="GstBufferList"
            glib:type-name="GstBufferList"
            glib:get-type="gst_buffer_list_get_type"
            c:symbol-prefix="buffer_list">
      <doc xml:space="preserve">Buffer lists are an object containing a list of buffers.

Buffer lists are created with gst_buffer_list_new() and filled with data
using a gst_buffer_list_insert().

Buffer lists can be pushed on a srcpad with gst_pad_push_list(). This is
interesting when multiple buffers need to be pushed in one go because it
can reduce the amount of overhead for pushing each buffer individually.</doc>
      <constructor name="new" c:identifier="gst_buffer_list_new">
        <doc xml:space="preserve">Creates a new, empty #GstBufferList. The caller is responsible for unreffing
the returned #GstBufferList.

Free-function: gst_buffer_list_unref</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">the new #GstBufferList. gst_buffer_list_unref()
    after usage.</doc>
          <type name="BufferList" c:type="GstBufferList*"/>
        </return-value>
      </constructor>
      <constructor name="new_sized" c:identifier="gst_buffer_list_new_sized">
        <doc xml:space="preserve">Creates a new, empty #GstBufferList. The caller is responsible for unreffing
the returned #GstBufferList. The list will have @size space preallocated so
that memory reallocations can be avoided.

Free-function: gst_buffer_list_unref</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">the new #GstBufferList. gst_buffer_list_unref()
    after usage.</doc>
          <type name="BufferList" c:type="GstBufferList*"/>
        </return-value>
        <parameters>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">an initial reserved size</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </constructor>
3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287
      <method name="calculate_size"
              c:identifier="gst_buffer_list_calculate_size"
              version="1.14">
        <doc xml:space="preserve">Calculates the size of the data contained in buffer list by adding the
size of all buffers.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the size of the data contained in buffer list in bytes.</doc>
          <type name="gsize" c:type="gsize"/>
        </return-value>
        <parameters>
          <instance-parameter name="list" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBufferList</doc>
            <type name="BufferList" c:type="GstBufferList*"/>
          </instance-parameter>
        </parameters>
      </method>
Sebastian Dröge's avatar
Sebastian Dröge committed
3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336
      <method name="copy_deep"
              c:identifier="gst_buffer_list_copy_deep"
              version="1.6">
        <doc xml:space="preserve">Create a copy of the given buffer list. This will make a newly allocated
copy of the buffer that the source buffer list contains.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a new copy of @list.</doc>
          <type name="BufferList" c:type="GstBufferList*"/>
        </return-value>
        <parameters>
          <instance-parameter name="list" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBufferList</doc>
            <type name="BufferList" c:type="const GstBufferList*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="foreach" c:identifier="gst_buffer_list_foreach">
        <doc xml:space="preserve">Call @func with @data for each buffer in @list.

@func can modify the passed buffer pointer or its contents. The return value
of @func define if this function returns or if the remaining buffers in
the list should be skipped.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE when @func returned %TRUE for each buffer in @list or when
@list is empty.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="list" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBufferList</doc>
            <type name="BufferList" c:type="GstBufferList*"/>
          </instance-parameter>
          <parameter name="func"
                     transfer-ownership="none"
                     scope="call"
                     closure="1">
            <doc xml:space="preserve">a #GstBufferListFunc to call</doc>
            <type name="BufferListFunc" c:type="GstBufferListFunc"/>
          </parameter>
          <parameter name="user_data"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">user data passed to @func</doc>
            <type name="gpointer" c:type="gpointer"/>
          </parameter>
        </parameters>
      </method>
      <method name="get" c:identifier="gst_buffer_list_get">
3337 3338 3339 3340
        <doc xml:space="preserve">Get the buffer at @idx.

You must make sure that @idx does not exceed the number of
buffers available.</doc>
Sebastian Dröge's avatar
Sebastian Dröge committed
3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve">the buffer at @idx in @group
    or %NULL when there is no buffer. The buffer remains valid as
    long as @list is valid and buffer is not removed from the list.</doc>
          <type name="Buffer" c:type="GstBuffer*"/>
        </return-value>
        <parameters>
          <instance-parameter name="list" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBufferList</doc>
            <type name="BufferList" c:type="GstBufferList*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">the index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381
      <method name="get_writable"
              c:identifier="gst_buffer_list_get_writable"
              version="1.14">
        <doc xml:space="preserve">Gets the buffer at @idx, ensuring it is a writable buffer.

You must make sure that @idx does not exceed the number of
buffers available.</doc>
        <return-value transfer-ownership="none" nullable="1">
          <doc xml:space="preserve">the buffer at @idx in @group.
    The returned  buffer remains valid as long as @list is valid and
    the buffer is not removed from the list.</doc>
          <type name="Buffer" c:type="GstBuffer*"/>
        </return-value>
        <parameters>
          <instance-parameter name="list" transfer-ownership="none">
            <doc xml:space="preserve">a (writable) #GstBufferList</doc>
            <type name="BufferList" c:type="GstBufferList*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">the index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
Sebastian Dröge's avatar
Sebastian Dröge committed
3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523
      <method name="insert" c:identifier="gst_buffer_list_insert">
        <doc xml:space="preserve">Insert @buffer at @idx in @list. Other buffers are moved to make room for
this new buffer.

A -1 value for @idx will append the buffer at the end.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="list" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBufferList</doc>
            <type name="BufferList" c:type="GstBufferList*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">the index</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="buffer" transfer-ownership="full">
            <doc xml:space="preserve">a #GstBuffer</doc>
            <type name="Buffer" c:type="GstBuffer*"/>
          </parameter>
        </parameters>
      </method>
      <method name="length" c:identifier="gst_buffer_list_length">
        <doc xml:space="preserve">Returns the number of buffers in @list.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the number of buffers in the buffer list</doc>
          <type name="guint" c:type="guint"/>
        </return-value>
        <parameters>
          <instance-parameter name="list" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBufferList</doc>
            <type name="BufferList" c:type="GstBufferList*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="remove" c:identifier="gst_buffer_list_remove">
        <doc xml:space="preserve">Remove @length buffers starting from @idx in @list. The following buffers
are moved to close the gap.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="list" transfer-ownership="none">
            <doc xml:space="preserve">a #GstBufferList</doc>
            <type name="BufferList" c:type="GstBufferList*"/>
          </instance-parameter>
          <parameter name="idx" transfer-ownership="none">
            <doc xml:space="preserve">the index</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
          <parameter name="length" transfer-ownership="none">
            <doc xml:space="preserve">the amount to remove</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
    </record>
    <callback name="BufferListFunc" c:type="GstBufferListFunc">
      <doc xml:space="preserve">A function that will be called from gst_buffer_list_foreach(). The @buffer
field will point to a the reference of the buffer at @idx.

When this function returns %TRUE, the next buffer will be
returned. When %FALSE is returned, gst_buffer_list_foreach() will return.

When @buffer is set to %NULL, the item will be removed from the bufferlist.
When @buffer has been made writable, the new buffer reference can be assigned
to @buffer. This function is responsible for unreffing the old buffer when
removing or modifying.</doc>
      <return-value transfer-ownership="none">
        <doc xml:space="preserve">%FALSE when gst_buffer_list_foreach() should stop</doc>
        <type name="gboolean" c:type="gboolean"/>
      </return-value>
      <parameters>
        <parameter name="buffer"
                   direction="out"
                   caller-allocates="0"
                   transfer-ownership="full"
                   nullable="1">
          <doc xml:space="preserve">pointer the buffer</doc>
          <type name="Buffer" c:type="GstBuffer**"/>
        </parameter>
        <parameter name="idx" transfer-ownership="none">
          <doc xml:space="preserve">the index of @buffer</doc>
          <type name="guint" c:type="guint"/>
        </parameter>
        <parameter name="user_data"
                   transfer-ownership="none"
                   nullable="1"
                   allow-none="1"
                   closure="2">
          <doc xml:space="preserve">user data passed to gst_buffer_list_foreach()</doc>
          <type name="gpointer" c:type="gpointer"/>
        </parameter>
      </parameters>
    </callback>
    <class name="BufferPool"
           c:symbol-prefix="buffer_pool"
           c:type="GstBufferPool"
           parent="Object"
           glib:type-name="GstBufferPool"
           glib:get-type="gst_buffer_pool_get_type"
           glib:type-struct="BufferPoolClass">
      <doc xml:space="preserve">A #GstBufferPool is an object that can be used to pre-allocate and recycle
buffers of the same size and with the same properties.

A #GstBufferPool is created with gst_buffer_pool_new().

Once a pool is created, it needs to be configured. A call to
gst_buffer_pool_get_config() returns the current configuration structure from
the pool. With gst_buffer_pool_config_set_params() and
gst_buffer_pool_config_set_allocator() the bufferpool parameters and
allocator can be configured. Other properties can be configured in the pool
depending on the pool implementation.

A bufferpool can have extra options that can be enabled with
gst_buffer_pool_config_add_option(). The available options can be retrieved
with gst_buffer_pool_get_options(). Some options allow for additional
configuration properties to be set.

After the configuration structure has been configured,
gst_buffer_pool_set_config() updates the configuration in the pool. This can
fail when the configuration structure is not accepted.

After the a pool has been configured, it can be activated with
gst_buffer_pool_set_active(). This will preallocate the configured resources
in the pool.

When the pool is active, gst_buffer_pool_acquire_buffer() can be used to
retrieve a buffer from the pool.

Buffers allocated from a bufferpool will automatically be returned to the
pool with gst_buffer_pool_release_buffer() when their refcount drops to 0.

The bufferpool can be deactivated again with gst_buffer_pool_set_active().
All further gst_buffer_pool_acquire_buffer() calls will return an error. When
all buffers are returned to the pool they will be freed.

Use gst_object_unref() to release the reference to a bufferpool. If the
refcount of the pool reaches 0, the pool will be freed.</doc>
      <constructor name="new" c:identifier="gst_buffer_pool_new">
        <doc xml:space="preserve">Creates a new #GstBufferPool instance.</doc>
3524
        <return-value transfer-ownership="full">
Sebastian Dröge's avatar
Sebastian Dröge committed
3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927