32 struct StreamConfiguration;
41 bool isValid()
const {
return m2m_ !=
nullptr; }
46 std::tuple<unsigned int, unsigned int>
50 const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfg);
52 std::vector<std::unique_ptr<FrameBuffer>> *buffers);
58 const std::map<const Stream *, FrameBuffer *> &outputs);
61 class V4L2M2MStream :
protected Loggable 66 bool isValid()
const {
return m2m_ !=
nullptr; }
71 std::vector<std::unique_ptr<FrameBuffer>> *buffers);
79 std::string logPrefix()
const override;
87 std::unique_ptr<V4L2M2MDevice> m2m_;
89 unsigned int inputBufferCount_;
90 unsigned int outputBufferCount_;
93 std::unique_ptr<V4L2M2MDevice> m2m_;
95 std::map<const Stream *, std::unique_ptr<V4L2M2MStream>> streams_;
96 std::map<FrameBuffer *, unsigned int> queue_;
Video stream for a camera.
Definition: stream.h:74
Base class to support log message extensions.
Definition: log.h:91
Top-level libcamera namespace.
Definition: backtrace.h:17
SizeRange sizes(const Size &input)
Retrieve the range of minimum and maximum output sizes for an input size.
Definition: converter_v4l2_m2m.cpp:264
std::vector< PixelFormat > formats(PixelFormat input)
Definition: converter_v4l2_m2m.cpp:224
Frame buffer data and its associated dynamic metadata.
Definition: framebuffer.h:49
Describe a two-dimensional size.
Definition: geometry.h:52
The V4L2 M2M converter implements the converter interface based on V4L2 M2M device.
Definition: converter_v4l2_m2m.h:35
Signal & slot implementation.
void stop()
Stop the converter streaming operation.
Definition: converter_v4l2_m2m.cpp:398
int configure(const StreamConfiguration &inputCfg, const std::vector< std::reference_wrapper< StreamConfiguration >> &outputCfg)
Configure a set of output stream conversion from an input stream.
Definition: converter_v4l2_m2m.cpp:330
std::tuple< unsigned int, unsigned int > strideAndFrameSize(const PixelFormat &pixelFormat, const Size &size)
Retrieve the output stride and frame size for an input configutation.
Definition: converter_v4l2_m2m.cpp:313
Signal< FrameBuffer * > outputBufferReady
A signal emitted on each frame buffer completion of the output queue.
Definition: converter.h:60
bool isValid() const
Definition: converter_v4l2_m2m.h:41
int exportBuffers(const Stream *stream, unsigned int count, std::vector< std::unique_ptr< FrameBuffer >> *buffers)
Export buffers from the converter device.
Definition: converter_v4l2_m2m.cpp:367
Describe a range of sizes.
Definition: geometry.h:200
int loadConfiguration([[maybe_unused]] const std::string &filename)
Definition: converter_v4l2_m2m.h:40
int start()
Start the converter streaming operation.
Definition: converter_v4l2_m2m.cpp:380
Configuration parameters for a stream.
Definition: stream.h:41
V4L2M2MConverter(MediaDevice *media)
Construct a V4L2M2MConverter instance.
Definition: converter_v4l2_m2m.cpp:196
int queueBuffers(FrameBuffer *input, const std::map< const Stream *, FrameBuffer *> &outputs)
Queue buffers to converter device.
Definition: converter_v4l2_m2m.cpp:407
Abstract Base Class for converter.
Definition: converter.h:32