Gdk.DmabufFormats¶
Fields¶
None
Methods¶
|
|
|
|
|
|
|
|
|
Details¶
- class Gdk.DmabufFormats¶
The
GdkDmabufFormats
struct provides information about supported DMA buffer formats.You can query whether a given format is supported with [method`Gdk`.DmabufFormats.contains] and you can iterate over the list of all supported formats with [method`Gdk`.DmabufFormats.get_n_formats] and [method`Gdk`.DmabufFormats.get_format].
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 [class`Gdk`.DmabufTextureBuilder] for more information about DMA buffers.
Note that DMA buffers only exist on Linux.
New in version 4.14.
- contains(fourcc, modifier)[source]¶
- Parameters:
- Returns:
TRUE
if the format specified by the arguments is part of self- Return type:
Returns whether a given format is contained in self.
New in version 4.14.
- equal(formats2)[source]¶
- Parameters:
formats2 (
Gdk.DmabufFormats
orNone
) – anotherGdkDmabufFormats
- Returns:
TRUE
if self and formats2 are equal- Return type:
Returns whether self and formats2 contain the same dmabuf formats, in the same order.
New in version 4.14.
- get_format(idx)[source]¶
- Parameters:
idx (
int
) – the index of the format to return- Returns:
- fourcc:
return location for the format code
- modifier:
return location for the format modifier
- Return type:
Gets the fourcc code and modifier for a format that is contained in self.
New in version 4.14.
- get_n_formats()[source]¶
- Returns:
the number of formats
- Return type:
Returns the number of formats that the self object contains.
Note that DMA buffers are a Linux concept, so on other platforms, [method`Gdk`.DmabufFormats.get_n_formats] will always return zero.
New in version 4.14.