<?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="Gst" version="1.0"/>
  <package name="gstreamer-allocators-1.0"/>
  <c:include name="gst/allocators/allocators.h"/>
  <namespace name="GstAllocators"
             version="1.0"
             shared-library="libgstallocators-1.0.so.2.0"
             c:identifier-prefixes="Gst"
             c:symbol-prefixes="gst">
    <constant name="ALLOCATOR_DMABUF"
              value="dmabuf"
              c:type="GST_ALLOCATOR_DMABUF">
      <type name="utf8" c:type="gchar*"/>
    </constant>
    <constant name="ALLOCATOR_FD" value="fd" c:type="GST_ALLOCATOR_FD">
      <type name="utf8" c:type="gchar*"/>
    </constant>
    <class name="FdAllocator"
           c:symbol-prefix="fd_allocator"
           c:type="GstFdAllocator"
           version="1.6"
           parent="Gst.Allocator"
           glib:type-name="GstFdAllocator"
           glib:get-type="gst_fd_allocator_get_type"
           glib:type-struct="FdAllocatorClass">
      <doc xml:space="preserve">Base class for allocators with fd-backed memory</doc>
      <constructor name="new"
                   c:identifier="gst_fd_allocator_new"
                   version="1.6">
        <doc xml:space="preserve">Return a new fd allocator.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a new fd allocator, or NULL if the allocator
   isn't available. Use gst_object_unref() to release the allocator after
   usage</doc>
          <type name="Gst.Allocator" c:type="GstAllocator*"/>
        </return-value>
      </constructor>
      <function name="alloc"
                c:identifier="gst_fd_allocator_alloc"
                version="1.6">
        <doc xml:space="preserve">Return a %GstMemory that wraps a generic file descriptor.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a GstMemory based on @allocator.
When the buffer will be released the allocator will close the @fd.
The memory is only mmapped on gst_buffer_mmap() request.</doc>
          <type name="Gst.Memory" c:type="GstMemory*"/>
        </return-value>
        <parameters>
          <parameter name="allocator" transfer-ownership="none">
            <doc xml:space="preserve">allocator to be used for this memory</doc>
            <type name="Gst.Allocator" c:type="GstAllocator*"/>
          </parameter>
          <parameter name="fd" transfer-ownership="none">
            <doc xml:space="preserve">file descriptor</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="size" transfer-ownership="none">
            <doc xml:space="preserve">memory size</doc>
            <type name="gsize" c:type="gsize"/>
          </parameter>
          <parameter name="flags" transfer-ownership="none">
            <doc xml:space="preserve">extra #GstFdMemoryFlags</doc>
            <type name="FdMemoryFlags" c:type="GstFdMemoryFlags"/>
          </parameter>
        </parameters>
      </function>
      <field name="parent">
        <type name="Gst.Allocator" c:type="GstAllocator"/>
      </field>
    </class>
    <record name="FdAllocatorClass"
            c:type="GstFdAllocatorClass"
            glib:is-gtype-struct-for="FdAllocator">
      <field name="parent_class">
        <type name="Gst.AllocatorClass" c:type="GstAllocatorClass"/>
      </field>
    </record>
    <bitfield name="FdMemoryFlags" version="1.6" c:type="GstFdMemoryFlags">
      <doc xml:space="preserve">Various flags to control the operation of the fd backed memory.</doc>
      <member name="none" value="0" c:identifier="GST_FD_MEMORY_FLAG_NONE">
        <doc xml:space="preserve">no flag</doc>
      </member>
      <member name="keep_mapped"
              value="1"
              c:identifier="GST_FD_MEMORY_FLAG_KEEP_MAPPED">
        <doc xml:space="preserve">once the memory is mapped,
       keep it mapped until the memory is destroyed.</doc>
      </member>
      <member name="map_private"
              value="2"
              c:identifier="GST_FD_MEMORY_FLAG_MAP_PRIVATE">
        <doc xml:space="preserve">do a private mapping instead of
       the default shared mapping.</doc>
      </member>
    </bitfield>
    <function name="dmabuf_allocator_alloc"
              c:identifier="gst_dmabuf_allocator_alloc"
              version="1.2">
      <doc xml:space="preserve">Return a %GstMemory that wraps a dmabuf file descriptor.</doc>
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a GstMemory based on @allocator.
When the buffer will be released dmabuf allocator will close the @fd.
The memory is only mmapped on gst_buffer_mmap() request.</doc>
        <type name="Gst.Memory" c:type="GstMemory*"/>
      </return-value>
      <parameters>
        <parameter name="allocator" transfer-ownership="none">
          <doc xml:space="preserve">allocator to be used for this memory</doc>
          <type name="Gst.Allocator" c:type="GstAllocator*"/>
        </parameter>
        <parameter name="fd" transfer-ownership="none">
          <doc xml:space="preserve">dmabuf file descriptor</doc>
          <type name="gint" c:type="gint"/>
        </parameter>
        <parameter name="size" transfer-ownership="none">
          <doc xml:space="preserve">memory size</doc>
          <type name="gsize" c:type="gsize"/>
        </parameter>
      </parameters>
    </function>
    <function name="dmabuf_allocator_new"
              c:identifier="gst_dmabuf_allocator_new"
              version="1.2">
      <doc xml:space="preserve">Return a new dmabuf allocator.</doc>
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new dmabuf allocator, or NULL if the allocator
   isn't available. Use gst_object_unref() to release the allocator after
   usage</doc>
        <type name="Gst.Allocator" c:type="GstAllocator*"/>
      </return-value>
    </function>
    <function name="dmabuf_memory_get_fd"
              c:identifier="gst_dmabuf_memory_get_fd"
              version="1.2">
      <doc xml:space="preserve">Return the file descriptor associated with @mem.</doc>
      <return-value transfer-ownership="none">
        <doc xml:space="preserve">the file descriptor associated with the memory, or -1.  The file
    descriptor is still owned by the GstMemory.  Use dup to take a copy
    if you intend to use it beyond the lifetime of this GstMemory.</doc>
        <type name="gint" c:type="gint"/>
      </return-value>
      <parameters>
        <parameter name="mem" transfer-ownership="none">
          <doc xml:space="preserve">the memory to get the file descriptor</doc>
          <type name="Gst.Memory" c:type="GstMemory*"/>
        </parameter>
      </parameters>
    </function>
    <function name="fd_memory_get_fd"
              c:identifier="gst_fd_memory_get_fd"
              version="1.6">
      <doc xml:space="preserve">Get the fd from @mem. Call gst_is_fd_memory() to check if @mem has
an fd.</doc>
      <return-value transfer-ownership="none">
        <doc xml:space="preserve">the fd of @mem or -1 when there is no fd on @mem</doc>
        <type name="gint" c:type="gint"/>
      </return-value>
      <parameters>
        <parameter name="mem" transfer-ownership="none">
          <doc xml:space="preserve">#GstMemory</doc>
          <type name="Gst.Memory" c:type="GstMemory*"/>
        </parameter>
      </parameters>
    </function>
    <function name="is_dmabuf_memory"
              c:identifier="gst_is_dmabuf_memory"
              version="1.2">
      <doc xml:space="preserve">Check if @mem is dmabuf memory.</doc>
      <return-value transfer-ownership="none">
        <doc xml:space="preserve">%TRUE if @mem is dmabuf memory, otherwise %FALSE</doc>
        <type name="gboolean" c:type="gboolean"/>
      </return-value>
      <parameters>
        <parameter name="mem" transfer-ownership="none">
          <doc xml:space="preserve">the memory to be check</doc>
          <type name="Gst.Memory" c:type="GstMemory*"/>
        </parameter>
      </parameters>
    </function>
    <function name="is_fd_memory"
              c:identifier="gst_is_fd_memory"
              version="1.6">
      <doc xml:space="preserve">Check if @mem is memory backed by an fd</doc>
      <return-value transfer-ownership="none">
        <doc xml:space="preserve">%TRUE when @mem has an fd that can be retrieved with
gst_fd_memory_get_fd().</doc>
        <type name="gboolean" c:type="gboolean"/>
      </return-value>
      <parameters>
        <parameter name="mem" transfer-ownership="none">
          <doc xml:space="preserve">#GstMemory</doc>
          <type name="Gst.Memory" c:type="GstMemory*"/>
        </parameter>
      </parameters>
    </function>
  </namespace>
</repository>
