summaryrefslogtreecommitdiff
path: root/src/cam/frame_sink.cpp
AgeCommit message (Collapse)Author
2021-08-05cam: Add FrameSink base classLaurent Pinchart
The FrameSink class serves as a base to implement components that consume frames. This allows handling frame sinks in a generic way, independent of their nature. The BufferWrite class will be ported to FrameSink in a second step. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
ppc">#include "libcamera/internal/media_device.h" #include "libcamera/internal/v4l2_videodevice.h" class BufferSource { public: BufferSource(); ~BufferSource(); int allocate(const libcamera::StreamConfiguration &config); const std::vector<std::unique_ptr<libcamera::FrameBuffer>> &buffers(); private: std::shared_ptr<libcamera::MediaDevice> media_; std::vector<std::unique_ptr<libcamera::FrameBuffer>> buffers_; };