Class DmabufFormats
- All Implemented Interfaces:
Proxy
You can query whether a given format is supported with
contains(int, long) and you can iterate
over the list of all supported formats with
getNFormats() and
getFormat(long, org.javagi.base.Out<java.lang.Integer>, org.javagi.base.Out<java.lang.Long>).
The list of supported formats is sorted by preference, with the best formats coming first.
The list may contains (format, modifier) pairs where the modifier
is DMA_FORMAT_MOD_INVALID, indicating that **_implicit modifiers_**
may be used with this format.
See DmabufTextureBuilder for more information
about DMA buffers.
Note that DMA buffers only exist on Linux.
- Since:
- 4.14
-
Constructor Summary
ConstructorsConstructorDescriptionDmabufFormats(MemorySegment address) Create a DmabufFormats proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(int fourcc, long modifier) Returns whether a given format is contained informats.booleanequal(@Nullable DmabufFormats formats2) Returns whether this DmabufFormats andformats2contain the same dmabuf formats, in the same order.voidGets the fourcc code and modifier for a format that is contained informats.longReturns the number of formats that the this DmabufFormats object contains.static @Nullable TypegetType()Get the GType of the DmabufFormats classref()Increases the reference count offormats.voidunref()Decreases the reference count offormats.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
DmabufFormats
Create a DmabufFormats proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
-
Method Details
-
getType
-
contains
public boolean contains(int fourcc, long modifier) Returns whether a given format is contained informats.- Parameters:
fourcc- a format codemodifier- a format modifier- Returns:
TRUEif the format specified by the arguments is part of this DmabufFormats- Since:
- 4.14
-
equal
Returns whether this DmabufFormats andformats2contain the same dmabuf formats, in the same order.- Parameters:
formats2- anotherGdkDmabufFormats- Returns:
TRUEif this DmabufFormats andformats2are equal- Since:
- 4.14
-
getFormat
Gets the fourcc code and modifier for a format that is contained informats.- Parameters:
idx- the index of the format to returnfourcc- return location for the format codemodifier- return location for the format modifier- Since:
- 4.14
-
getNFormats
public long getNFormats()Returns the number of formats that the this DmabufFormats object contains.Note that DMA buffers are a Linux concept, so on other platforms,
getNFormats()will always return zero.- Returns:
- the number of formats
- Since:
- 4.14
-
ref
Increases the reference count offormats.- Returns:
- the passed-in object
- Since:
- 4.14
-
unref
public void unref()Decreases the reference count offormats.When the reference count reaches zero, the object is freed.
- Since:
- 4.14
-