libcamera  v0.0.0
Supporting cameras in Linux since 2019
Classes | Typedefs | Enumerations
stream.h File Reference

Video stream for a Camera. More...

#include <map>
#include <memory>
#include <string>
#include <vector>
#include <libcamera/buffer.h>
#include <libcamera/geometry.h>
#include <libcamera/pixel_format.h>

Go to the source code of this file.

Classes

class  libcamera::StreamFormats
 Hold information about supported stream formats. More...
 
struct  libcamera::StreamConfiguration
 Configuration parameters for a stream. More...
 
class  libcamera::Stream
 Video stream for a camera. More...
 

Typedefs

using libcamera::StreamRoles = std::vector< StreamRole >
 A vector of StreamRole.
 

Enumerations

enum  libcamera::StreamRole { libcamera::StillCapture , libcamera::StillCaptureRaw , libcamera::VideoRecording , libcamera::Viewfinder }
 Identify the role a stream is intended to play. More...
 

Detailed Description

Video stream for a Camera.

A camera device can provide frames in different resolutions and formats concurrently from a single image source. The Stream class represents one of the multiple concurrent streams.

All streams exposed by a camera device share the same image source and are thus not fully independent. Parameters related to the image source, such as the exposure time or flash control, are common to all streams. Other parameters, such as format or resolution, may be specified per-stream, depending on the capabilities of the camera device.

Camera devices expose at least one stream, and may expose additional streams based on the device capabilities. This can be used, for instance, to implement concurrent viewfinder and video capture, or concurrent viewfinder, video capture and still image capture.

Enumeration Type Documentation

◆ StreamRole

Identify the role a stream is intended to play.

The StreamRole describes how an application intends to use a stream. Roles are specified by applications and passed to cameras, that then select the most appropriate streams and their default configurations.

Enumerator
StillCapture 

The stream is intended to capture high-resolution, high-quality still images with low frame rate. The captured frames may be exposed with flash.

StillCaptureRaw 

The stream is intended to capture high-resolution, raw still images with low frame rate.

VideoRecording 

The stream is intended to capture video for the purpose of recording or streaming. The video stream may produce a high frame rate and may be enhanced with video stabilization.

Viewfinder 

The stream is intended to capture video for the purpose of display on the local screen. Trade-offs between quality and usage of system resources are acceptable.