mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
android: camera_device: Clone settings in request descriptor
When a Camera3RequestDescriptor instance is created to wrap a camera3_capture_request_t the settings associated with the request are cloned for later re-use. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
b9369a0e60
commit
9e6eece622
2 changed files with 5 additions and 3 deletions
|
@ -22,7 +22,6 @@
|
||||||
#include "libcamera/internal/log.h"
|
#include "libcamera/internal/log.h"
|
||||||
#include "libcamera/internal/utils.h"
|
#include "libcamera/internal/utils.h"
|
||||||
|
|
||||||
#include "camera_metadata.h"
|
|
||||||
#include "system/graphics.h"
|
#include "system/graphics.h"
|
||||||
|
|
||||||
using namespace libcamera;
|
using namespace libcamera;
|
||||||
|
@ -311,6 +310,9 @@ CameraDevice::Camera3RequestDescriptor::Camera3RequestDescriptor(
|
||||||
*/
|
*/
|
||||||
frameBuffers_.reserve(numBuffers_);
|
frameBuffers_.reserve(numBuffers_);
|
||||||
|
|
||||||
|
/* Clone the controls associated with the camera3 request. */
|
||||||
|
settings_ = CameraMetadata(camera3Request->settings);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create the libcamera::Request unique_ptr<> to tie its lifetime
|
* Create the libcamera::Request unique_ptr<> to tie its lifetime
|
||||||
* to the descriptor's one. Set the descriptor's address as the
|
* to the descriptor's one. Set the descriptor's address as the
|
||||||
|
|
|
@ -24,12 +24,11 @@
|
||||||
#include "libcamera/internal/log.h"
|
#include "libcamera/internal/log.h"
|
||||||
#include "libcamera/internal/message.h"
|
#include "libcamera/internal/message.h"
|
||||||
|
|
||||||
|
#include "camera_metadata.h"
|
||||||
#include "camera_stream.h"
|
#include "camera_stream.h"
|
||||||
#include "camera_worker.h"
|
#include "camera_worker.h"
|
||||||
#include "jpeg/encoder.h"
|
#include "jpeg/encoder.h"
|
||||||
|
|
||||||
class CameraMetadata;
|
|
||||||
|
|
||||||
class MappedCamera3Buffer : public libcamera::MappedBuffer
|
class MappedCamera3Buffer : public libcamera::MappedBuffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -82,6 +81,7 @@ private:
|
||||||
uint32_t numBuffers_;
|
uint32_t numBuffers_;
|
||||||
camera3_stream_buffer_t *buffers_;
|
camera3_stream_buffer_t *buffers_;
|
||||||
std::vector<std::unique_ptr<libcamera::FrameBuffer>> frameBuffers_;
|
std::vector<std::unique_ptr<libcamera::FrameBuffer>> frameBuffers_;
|
||||||
|
CameraMetadata settings_;
|
||||||
std::unique_ptr<CaptureRequest> request_;
|
std::unique_ptr<CaptureRequest> request_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue