libcamera v0.3.2 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
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 class | Type { Image , Metadata , EmbeddedData }
| The format type. More...

## Public Member Functions
bool | isValid () const
| Check if the media bus format info is valid.

## Static Public Member Functions
static const MediaBusFormatInfo & | info (uint32_t code)
| Retrieve information about a media bus format.

## 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.
PixelFormatInfo::ColourEncoding | colourEncoding
| The colour encoding type.

## 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 Enumeration Documentation

## ◆ Type

enum class libcamera::MediaBusFormatInfo::Type
| strong

The format type.

Enumerator
Image | The format describes image data.
Metadata | The format describes generic metadata.
EmbeddedData | The format describes sensor embedded data.

## Member Function Documentation

## ◆ info()

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

Retrieve information about a media bus format.

Parameters

  [in] | code | The 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

unsigned int 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

PixelFormatInfo::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:

- include/libcamera/internal/v4l2_subdevice.h
- src/libcamera/v4l2_subdevice.cpp