summaryrefslogtreecommitdiff
path: root/src/cam/capture.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-05-26 20:42:12 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-06-19 12:25:12 +0200
commitafef18d35ab919f7efbb93295a0f8955bceb33b3 (patch)
treeae25c67563b00e72a045ec8f8993fa03e088d0ff /src/cam/capture.h
parent5ed3a89480b5330e0032c13ba6edb2adcf5c3e7a (diff)
cam: Move camera configuration preparation to CamApp
Most of the camera configuration preparation that is done in the Capture module is not specific to capturing and could be useful for other modules. Extract the generic parts to CamApp and do basic preparation of the configuration before passing it to modules. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam/capture.h')
-rw-r--r--src/cam/capture.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cam/capture.h b/src/cam/capture.h
index a97d1f44..1d4a25a8 100644
--- a/src/cam/capture.h
+++ b/src/cam/capture.h
@@ -20,19 +20,18 @@
class Capture
{
public:
- Capture(libcamera::Camera *camera);
+ Capture(libcamera::Camera *camera,
+ libcamera::CameraConfiguration *config);
int run(EventLoop *loop, const OptionsParser::Options &options);
private:
- int prepareConfig(const OptionsParser::Options &options);
-
int capture(EventLoop *loop);
void requestComplete(libcamera::Request *request,
const std::map<libcamera::Stream *, libcamera::Buffer *> &buffers);
libcamera::Camera *camera_;
- std::unique_ptr<libcamera::CameraConfiguration> config_;
+ libcamera::CameraConfiguration *config_;
std::map<libcamera::Stream *, std::string> streamName_;
BufferWriter *writer_;