Crate drm_fourcc[][src]

DrmFormat is an enum representing every pixel format supported by DRM (as of kernel version 5.8.0).

A fourcc is four bytes of ascii representing some data format. This enum contains every fourcc representing a pixel format supported by DRM, the Linux Direct Rendering Manager.

To get the bytes of the fourcc representing the format, cast to u32.

assert_eq!(DrmFormat::Xrgb8888 as u32, 875713112);

To get the string form of the fourcc, use DrmFormat::string_form.

assert_eq!(DrmFormat::Xrgb8888.string_form(), "XR24");

The enum is autogenerated from the canonical list in the Linux source code.

Structs

UnrecognizedFourcc

Wraps some u32 that isn’t a DRM fourcc we recognize

Enums

DrmFormat