libcamera  v0.2.0+150-2031e2f2
Supporting cameras in Linux since 2019
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
libcamera::MediaBusFormatInfo Class Reference

Information about media bus formats. More...

Public Types

enum  Type { Image, Metadata, EmbeddedData }
 The format type.
 

Public Member Functions

bool isValid () const
 Check if the media bus format info is valid. More...
 

Static Public Member Functions

static const MediaBusFormatInfoinfo (uint32_t code)
 Retrieve information about a media bus format. More...
 

Public Attributes

const char * name
 The format name as a human-readable string, used as the text representation of the format.
 
uint32_t code
 The media bus format code described by this instance (MEDIA_BUS_FMT_*)
 
Type type
 The media bus format type.
 
unsigned int bitsPerPixel
 The average number of bits per pixel. More...
 
PixelFormatInfo::ColourEncoding colourEncoding
 The colour encoding type. More...
 

Detailed Description

Information about media bus formats.

The MediaBusFormatInfo class groups together information describing a media bus format. It facilitates handling of media bus formats by providing data commonly used in pipeline handlers.

Member Function Documentation

◆ info()

const MediaBusFormatInfo & libcamera::MediaBusFormatInfo::info ( uint32_t  code)
static

Retrieve information about a media bus format.

Parameters
[in]codeThe media bus format code
Returns
The MediaBusFormatInfo describing the code if known, or an invalid MediaBusFormatInfo otherwise

◆ isValid()

bool libcamera::MediaBusFormatInfo::isValid ( ) const
inline

Check if the media bus format info is valid.

Returns
True if the media bus format info is valid, false otherwise

Member Data Documentation

◆ bitsPerPixel

libcamera::MediaBusFormatInfo::bitsPerPixel

The average number of bits per pixel.

The number of bits per pixel averages the total number of bits for all colour components over the whole image, excluding any padding bits or padding pixels.

For formats that transmit multiple or fractional pixels per sample, the value will differ from the bus width.

Formats that don't have a fixed number of bits per pixel, such as compressed formats, or device-specific embedded data formats, report 0 in this field.

◆ colourEncoding

libcamera::MediaBusFormatInfo::colourEncoding

The colour encoding type.

This field is valid for Type::Image formats only.


The documentation for this class was generated from the following files: