libcamera
v0.3.1+12-19bbca3c
Supporting cameras in Linux since 2019
|
The V4L2 M2M converter implements the converter interface based on V4L2 M2M device. More...
Public Member Functions | |
V4L2M2MConverter (MediaDevice *media) | |
Construct a V4L2M2MConverter instance. More... | |
int | loadConfiguration ([[maybe_unused]] const std::string &filename) |
bool | isValid () const |
std::vector< PixelFormat > | formats (PixelFormat input) |
SizeRange | sizes (const Size &input) |
Retrieve the range of minimum and maximum output sizes for an input size. More... | |
std::tuple< unsigned int, unsigned int > | strideAndFrameSize (const PixelFormat &pixelFormat, const Size &size) |
Retrieve the output stride and frame size for an input configutation. More... | |
int | configure (const StreamConfiguration &inputCfg, const std::vector< std::reference_wrapper< StreamConfiguration >> &outputCfg) |
Configure a set of output stream conversion from an input stream. More... | |
int | exportBuffers (const Stream *stream, unsigned int count, std::vector< std::unique_ptr< FrameBuffer >> *buffers) |
Export buffers from the converter device. More... | |
int | start () |
Start the converter streaming operation. More... | |
void | stop () |
Stop the converter streaming operation. More... | |
int | queueBuffers (FrameBuffer *input, const std::map< const Stream *, FrameBuffer *> &outputs) |
Queue buffers to converter device. More... | |
Public Member Functions inherited from libcamera::Converter | |
Converter (MediaDevice *media) | |
Construct a Converter instance. More... | |
virtual int | loadConfiguration (const std::string &filename)=0 |
Load converter configuration from file. More... | |
const std::string & | deviceNode () const |
The converter device node attribute accessor. More... | |
Additional Inherited Members | |
Public Attributes inherited from libcamera::Converter | |
Signal< FrameBuffer * > | inputBufferReady |
A signal emitted when the input frame buffer completes. | |
Signal< FrameBuffer * > | outputBufferReady |
A signal emitted on each frame buffer completion of the output queue. | |
The V4L2 M2M converter implements the converter interface based on V4L2 M2M device.
libcamera::V4L2M2MConverter::V4L2M2MConverter | ( | MediaDevice * | media | ) |
Construct a V4L2M2MConverter instance.
[in] | media | The media device implementing the converter |
|
virtual |
Configure a set of output stream conversion from an input stream.
[in] | inputCfg | Input stream configuration |
[out] | outputCfgs | A list of output stream configurations |
Implements libcamera::Converter.
|
virtual |
Export buffers from the converter device.
[in] | stream | Output stream pointer exporting the buffers |
[in] | count | Number of buffers to allocate |
[out] | buffers | Vector to store allocated buffers |
This function operates similarly to V4L2VideoDevice::exportBuffers() on the output stream indicated by the output.
Implements libcamera::Converter.
|
virtual |
[in] | input | Input pixel format to retrieve output pixel format list for |
Implements libcamera::Converter.
|
inlinevirtual |
Implements libcamera::Converter.
|
inline |
[in] | filename | The file name path |
Load converter dependent configuration parameters to apply on the hardware.
|
virtual |
Queue buffers to converter device.
[in] | input | The frame buffer to apply the conversion |
[out] | outputs | The container holding the output stream pointers and their respective frame buffer outputs. |
This function queues the input frame buffer on the output streams of the outputs map key and retrieve the output frame buffer indicated by the buffer map value.
Implements libcamera::Converter.
Retrieve the range of minimum and maximum output sizes for an input size.
[in] | input | Input stream size to retrieve range for |
Implements libcamera::Converter.
|
virtual |
Start the converter streaming operation.
Implements libcamera::Converter.
|
virtual |
Stop the converter streaming operation.
Implements libcamera::Converter.
|
virtual |
Retrieve the output stride and frame size for an input configutation.
[in] | pixelFormat | Input stream pixel format |
[in] | size | Input stream size |
Implements libcamera::Converter.