Files
external_libcamera/src/cam/capture.h
T
Niklas Söderlund f7ddfd4517 libcamera: camera: Remove explicit stream to buffer map in requestCompleted signal
The stream to buffer map in the requestCompleted signal is taken
directly from the request which is part of the same signal. Remove the
map as it can be fetched directly from the request.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-11-19 18:30:26 +01:00

42 lines
873 B
C++

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2019, Google Inc.
*
* capture.h - Cam capture
*/
#ifndef __CAM_CAPTURE_H__
#define __CAM_CAPTURE_H__
#include <chrono>
#include <memory>
#include <libcamera/camera.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
#include "buffer_writer.h"
#include "event_loop.h"
#include "options.h"
class Capture
{
public:
Capture(libcamera::Camera *camera,
libcamera::CameraConfiguration *config);
int run(EventLoop *loop, const OptionsParser::Options &options);
private:
int capture(EventLoop *loop);
void requestComplete(libcamera::Request *request);
libcamera::Camera *camera_;
libcamera::CameraConfiguration *config_;
std::map<libcamera::Stream *, std::string> streamName_;
BufferWriter *writer_;
std::chrono::steady_clock::time_point last_;
};
#endif /* __CAM_CAPTURE_H__ */