summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/framebuffer.h19
-rw-r--r--include/libcamera/internal/framebuffer.h10
2 files changed, 13 insertions, 16 deletions
diff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h
index 36b91d11..69553999 100644
--- a/include/libcamera/framebuffer.h
+++ b/include/libcamera/framebuffer.h
@@ -59,28 +59,19 @@ public:
};
FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie = 0);
- FrameBuffer(std::unique_ptr<Private> d,
- const std::vector<Plane> &planes, unsigned int cookie = 0);
+ FrameBuffer(std::unique_ptr<Private> d);
- const std::vector<Plane> &planes() const { return planes_; }
+ const std::vector<Plane> &planes() const;
Request *request() const;
- const FrameMetadata &metadata() const { return metadata_; }
+ const FrameMetadata &metadata() const;
- uint64_t cookie() const { return cookie_; }
- void setCookie(uint64_t cookie) { cookie_ = cookie; }
+ uint64_t cookie() const;
+ void setCookie(uint64_t cookie);
std::unique_ptr<Fence> releaseFence();
private:
LIBCAMERA_DISABLE_COPY_AND_MOVE(FrameBuffer)
-
- friend class V4L2VideoDevice; /* Needed to update metadata_. */
-
- std::vector<Plane> planes_;
-
- FrameMetadata metadata_;
-
- uint64_t cookie_;
};
} /* namespace libcamera */
diff --git a/include/libcamera/internal/framebuffer.h b/include/libcamera/internal/framebuffer.h
index 8a9cc98e..1f42a4fc 100644
--- a/include/libcamera/internal/framebuffer.h
+++ b/include/libcamera/internal/framebuffer.h
@@ -22,7 +22,7 @@ class FrameBuffer::Private : public Extensible::Private
LIBCAMERA_DECLARE_PUBLIC(FrameBuffer)
public:
- Private();
+ Private(const std::vector<Plane> &planes, uint64_t cookie = 0);
virtual ~Private();
void setRequest(Request *request) { request_ = request; }
@@ -31,9 +31,15 @@ public:
Fence *fence() const { return fence_.get(); }
void setFence(std::unique_ptr<Fence> fence) { fence_ = std::move(fence); }
- void cancel() { LIBCAMERA_O_PTR()->metadata_.status = FrameMetadata::FrameCancelled; }
+ void cancel() { metadata_.status = FrameMetadata::FrameCancelled; }
+
+ FrameMetadata &metadata() { return metadata_; }
private:
+ std::vector<Plane> planes_;
+ FrameMetadata metadata_;
+ uint64_t cookie_;
+
std::unique_ptr<Fence> fence_;
Request *request_;
bool isContiguous_;