Skip to content

Add GdkDataFormat

Benjamin Otte requested to merge wip/otte/dataformat into main

This patchset introduces a new (private for now) GdkDataFormat enum that is meant to be used for all the formats we only support as read-only.

It replaces the big table and set of conversion functions that used to exist in gdkdmabuf.c and replaces them with a nice API.

There's multiple reasons why I want this:

  1. I want a nice memory-format like API, and the old API was always conflated with dmabufs.

  2. I want to be able to reason about these formats on Windows and add DXGI_FORMATs.

  3. I want to be able to add GStreamer infrastructure and include the file in the GStreamer sink.

  4. I want to use it for non-dmabuf conversion, ie from DXGI_FORMAT to VkFormat or GStreamer's formats.

  5. I want to add formats that are only supported by some of those methods and not dmabufs, see for example these formats.

Merge request reports

Loading