diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-11-22 16:22:56 +0100 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-01-12 16:10:38 +0100 |
commit | 9217f274f64f690b768d332663e1731a3ee5ef15 (patch) | |
tree | ee152928be1eaea656c929e56e27e97b175de435 /include | |
parent | eb4030f6c07174a520be1ebd73628e9ae4789569 (diff) |
libcamera: Switch to FrameBuffer interface
Switch to the FrameBuffer interface where all buffers are treated as
external buffers and are allocated outside the camera. Applications
allocating buffers using libcamera are switched to use the
FrameBufferAllocator helper.
Follow-up changes to this one will finalize the transition to the new
FrameBuffer interface by removing code that is left unused after this
change.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/camera.h | 4 | ||||
-rw-r--r-- | include/libcamera/request.h | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h index 2fd5870b..28655bec 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -19,7 +19,7 @@ namespace libcamera { -class Buffer; +class FrameBuffer; class FrameBufferAllocator; class PipelineHandler; class Request; @@ -78,7 +78,7 @@ public: const std::string &name() const; - Signal<Request *, Buffer *> bufferCompleted; + Signal<Request *, FrameBuffer *> bufferCompleted; Signal<Request *> requestCompleted; Signal<Camera *> disconnected; diff --git a/include/libcamera/request.h b/include/libcamera/request.h index b8324224..eded6831 100644 --- a/include/libcamera/request.h +++ b/include/libcamera/request.h @@ -17,9 +17,9 @@ namespace libcamera { -class Buffer; class Camera; class CameraControlValidator; +class FrameBuffer; class Stream; class Request @@ -38,9 +38,9 @@ public: ControlList &controls() { return *controls_; } ControlList &metadata() { return *metadata_; } - const std::map<Stream *, Buffer *> &buffers() const { return bufferMap_; } - int addBuffer(Stream *stream, std::unique_ptr<Buffer> buffer); - Buffer *findBuffer(Stream *stream) const; + const std::map<Stream *, FrameBuffer *> &buffers() const { return bufferMap_; } + int addBuffer(Stream *stream, FrameBuffer *buffer); + FrameBuffer *findBuffer(Stream *stream) const; uint64_t cookie() const { return cookie_; } Status status() const { return status_; } @@ -52,14 +52,14 @@ private: void complete(); - bool completeBuffer(Buffer *buffer); + bool completeBuffer(FrameBuffer *buffer); Camera *camera_; CameraControlValidator *validator_; ControlList *controls_; ControlList *metadata_; - std::map<Stream *, Buffer *> bufferMap_; - std::unordered_set<Buffer *> pending_; + std::map<Stream *, FrameBuffer *> bufferMap_; + std::unordered_set<FrameBuffer *> pending_; const uint64_t cookie_; Status status_; |