libcamera  v0.0.0
Supporting cameras in Linux since 2019
Public Member Functions | Public Attributes | List of all members
libcamera::StreamConfiguration Struct Reference

Configuration parameters for a stream. More...

Public Member Functions

 StreamConfiguration ()
 
 StreamConfiguration (const StreamFormats &formats)
 Construct a configuration with stream formats.
 
Streamstream () const
 Retrieve the stream associated with the configuration. More...
 
void setStream (Stream *stream)
 Associate a stream with a configuration. More...
 
const StreamFormatsformats () const
 Retrieve advisory stream format information. More...
 
std::string toString () const
 Assemble and return a string describing the configuration. More...
 

Public Attributes

PixelFormat pixelFormat
 Stream pixel format.
 
Size size
 Stream size in pixels.
 
unsigned int stride
 Image stride for the stream, in bytes. More...
 
unsigned int bufferCount
 Requested number of buffers to allocate for the stream.
 

Detailed Description

Configuration parameters for a stream.

The StreamConfiguration structure models all information which can be configured for a single video stream.

Constructor & Destructor Documentation

◆ StreamConfiguration()

libcamera::StreamConfiguration::StreamConfiguration ( )
Todo:
This method is deprecated and should be removed once all pipeline handlers provide StreamFormats.

Member Function Documentation

◆ formats()

libcamera::StreamConfiguration::formats ( ) const
inline

Retrieve advisory stream format information.

This method retrieves information about the pixel formats and sizes supported by the stream configuration. The sizes are advisory and not all of them are guaranteed to be supported by the stream. Users shall always inspect the size in the stream configuration after calling CameraConfiguration::validate().

Returns
Stream formats information

◆ setStream()

libcamera::StreamConfiguration::setStream ( Stream stream)
inline

Associate a stream with a configuration.

This method is meant for the PipelineHandler::configure() method and shall not be called by applications.

Parameters
[in]streamThe stream

◆ stream()

libcamera::StreamConfiguration::stream ( ) const
inline

Retrieve the stream associated with the configuration.

When a camera is configured with Camera::configure() Stream instances are associated with each stream configuration entry. This method retrieves the associated Stream, which remains valid until the next call to Camera::configure() or Camera::release().

Returns
The stream associated with the configuration

◆ toString()

std::string libcamera::StreamConfiguration::toString ( ) const

Assemble and return a string describing the configuration.

Returns
A string describing the StreamConfiguration

Member Data Documentation

◆ stride

libcamera::StreamConfiguration::stride

Image stride for the stream, in bytes.

The stride value reports the number of bytes between the beginning of successive lines in an image buffer for this stream. The value is valid after successfully configuring the camera with this configuration with a call to Camera::Configure().

Todo:
Update this value when configuration is validated instead of when the camera is configured.

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