diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-05-19 02:19:47 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-08-05 16:23:10 +0300 |
commit | 02001fecb0f578438bcfb27cc7496d721c6a18d1 (patch) | |
tree | 425b98c28587f9eea768dec33e17d0065faccd3b /src/cam/camera_session.h | |
parent | f929a2890ccc3d2cf9be0a73fadcc4c9c40ece79 (diff) |
cam: Turn BufferWriter into a FrameSink
Make the BufferWriter class inherit from FrameSink, and use the
FrameSink API to manage it. This makes the code more generic, and will
allow usage of other sinks.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/cam/camera_session.h')
-rw-r--r-- | src/cam/camera_session.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cam/camera_session.h b/src/cam/camera_session.h index b0f50e7f..2ccc7197 100644 --- a/src/cam/camera_session.h +++ b/src/cam/camera_session.h @@ -21,9 +21,10 @@ #include <libcamera/request.h> #include <libcamera/stream.h> -#include "buffer_writer.h" #include "options.h" +class FrameSink; + class CameraSession { public: @@ -53,13 +54,14 @@ private: int queueRequest(libcamera::Request *request); void requestComplete(libcamera::Request *request); void processRequest(libcamera::Request *request); + void sinkRelease(libcamera::Request *request); const OptionsParser::Options &options_; std::shared_ptr<libcamera::Camera> camera_; std::unique_ptr<libcamera::CameraConfiguration> config_; std::map<const libcamera::Stream *, std::string> streamName_; - std::unique_ptr<BufferWriter> writer_; + std::unique_ptr<FrameSink> sink_; unsigned int cameraIndex_; uint64_t last_; |