This file is indexed.

/usr/share/gir-1.0/GstAllocators-1.0.gir is in libgstreamer-plugins-base1.0-dev 1.14.0-2ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 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
182
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
239
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
<?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.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>
    <constant name="CAPS_FEATURE_MEMORY_DMABUF"
              value="memory:DMABuf"
              c:type="GST_CAPS_FEATURE_MEMORY_DMABUF"
              version="1.12">
      <doc xml:space="preserve">Constant that defines the caps feature name for DMA buffer sharing.

It has to be used for non-mappable dma-buf only, i.e. when the underlying
memory is not mappable to user space. Or when the mapped memory contains
non meaningful data. It can be the case for protected content or when the
user wants explicitly avoid any software post processing.

In these cases all elements between the exported and the importer has to work
in passthrough mode. This is done by adding this caps feature.

When the memory is mappable for read and write requests then it is assumes
to be a fast path and so this caps feature should not be used. Though
according to the dma-buf protocal, while it is mapped it prevents the
exporter to migrate the buffer.

This caps feature should not serve at all the purpose of selecting the
@GST_ALLOCATOR_DMABUF allocator during caps negotiation.
When the exporter is the upstream element from the importer point of view,
the exporter should try to map the dma buffer at runtime (preferrably during
decide_allocation phase). When it succeeds for #GST_MAP_READWRITE this caps
feature should not be used. This allows scalers, color converts and any image
processing filters to work directly on the dma buffer.
In this case the importer element should check all incomming memory using
gst_is_dmabuf_memory().</doc>
      <type name="utf8" c:type="gchar*"/>
    </constant>
    <class name="DmaBufAllocator"
           c:symbol-prefix="dmabuf_allocator"
           c:type="GstDmaBufAllocator"
           version="1.12"
           parent="FdAllocator"
           glib:type-name="GstDmaBufAllocator"
           glib:get-type="gst_dmabuf_allocator_get_type"
           glib:type-struct="DmaBufAllocatorClass">
      <doc xml:space="preserve">Base class for allocators with dmabuf-backed memory</doc>
      <constructor name="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>
      </constructor>
      <function name="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>
      <field name="parent">
        <type name="FdAllocator" c:type="GstFdAllocator"/>
      </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>
    </class>
    <record name="DmaBufAllocatorClass"
            c:type="GstDmaBufAllocatorClass"
            glib:is-gtype-struct-for="DmaBufAllocator">
      <field name="parent_class">
        <type name="FdAllocatorClass" c:type="GstFdAllocatorClass"/>
      </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>
    <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 unless
the %GST_FD_MEMORY_FLAG_DONT_CLOSE flag is specified.
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>
      <member name="dont_close"
              value="4"
              c:identifier="GST_FD_MEMORY_FLAG_DONT_CLOSE">
        <doc xml:space="preserve">don't close the file descriptor when
       the memory is freed. Since: 1.10</doc>
      </member>
    </bitfield>
    <interface name="PhysMemoryAllocator"
               c:symbol-prefix="phys_memory_allocator"
               c:type="GstPhysMemoryAllocator"
               glib:type-name="GstPhysMemoryAllocator"
               glib:get-type="gst_phys_memory_allocator_get_type"
               glib:type-struct="PhysMemoryAllocatorInterface">
      <prerequisite name="Gst.Allocator"/>
      <virtual-method name="get_phys_addr">
        <return-value transfer-ownership="none">
          <type name="guintptr" c:type="guintptr"/>
        </return-value>
        <parameters>
          <instance-parameter name="allocator" transfer-ownership="none">
            <type name="PhysMemoryAllocator" c:type="GstPhysMemoryAllocator*"/>
          </instance-parameter>
          <parameter name="mem" transfer-ownership="none">
            <type name="Gst.Memory" c:type="GstMemory*"/>
          </parameter>
        </parameters>
      </virtual-method>
    </interface>
    <record name="PhysMemoryAllocatorInterface"
            c:type="GstPhysMemoryAllocatorInterface"
            glib:is-gtype-struct-for="PhysMemoryAllocator"
            version="1.14">
      <doc xml:space="preserve">Marker interface for allocators with physical address backed memory</doc>
      <field name="parent_iface">
        <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
      </field>
      <field name="get_phys_addr">
        <callback name="get_phys_addr">
          <return-value transfer-ownership="none">
            <type name="guintptr" c:type="guintptr"/>
          </return-value>
          <parameters>
            <parameter name="allocator" transfer-ownership="none">
              <type name="PhysMemoryAllocator"
                    c:type="GstPhysMemoryAllocator*"/>
            </parameter>
            <parameter name="mem" transfer-ownership="none">
              <type name="Gst.Memory" c:type="GstMemory*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
    </record>
    <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>
    <function name="is_phys_memory"
              c:identifier="gst_is_phys_memory"
              version="1.14">
      <return-value transfer-ownership="none">
        <doc xml:space="preserve">whether the memory at @mem is backed by physical memory</doc>
        <type name="gboolean" c:type="gboolean"/>
      </return-value>
      <parameters>
        <parameter name="mem" transfer-ownership="none">
          <doc xml:space="preserve">a #GstMemory</doc>
          <type name="Gst.Memory" c:type="GstMemory*"/>
        </parameter>
      </parameters>
    </function>
    <function name="phys_memory_get_phys_addr"
              c:identifier="gst_phys_memory_get_phys_addr"
              version="1.14">
      <return-value transfer-ownership="none">
        <doc xml:space="preserve">Physical memory address that is backing @mem, or 0 if none</doc>
        <type name="guintptr" c:type="guintptr"/>
      </return-value>
      <parameters>
        <parameter name="mem" transfer-ownership="none">
          <doc xml:space="preserve">a #GstMemory</doc>
          <type name="Gst.Memory" c:type="GstMemory*"/>
        </parameter>
      </parameters>
    </function>
  </namespace>
</repository>