summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/raspberrypi/rpi_stream.h
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-11-22 15:42:35 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-11-23 15:18:42 +0200
commita857a150e13d71abdc0b321984f08bd0a173a3b2 (patch)
tree153217a31f82d941735103b197a2baf0af43db2c /src/libcamera/pipeline/raspberrypi/rpi_stream.h
parent1bcb7539dfcc2dde9745a9637c0a4132de34a9d4 (diff)
pipeline: raspberrypi: Remove enum BuffferMask from the mojom interface
The BufferMask enum provides a way of identifying which stream a frame buffer belongs to. This enum is defined in the raspberrypi.mojom interface file. However, the IPA does not need these enum definitions to mmap buffers that it uses. Move this enum out of the raspberrypi.mojom interface file and put it into the RPi namespace visible only to the pipeline handler. This removes the need to include the auto-generated IPA interface header in the RPi::Stream definition. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/raspberrypi/rpi_stream.h')
-rw-r--r--src/libcamera/pipeline/raspberrypi/rpi_stream.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h
index 3c0b5c8e..b8bd79cf 100644
--- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h
+++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h
@@ -12,7 +12,6 @@
#include <unordered_map>
#include <vector>
-#include <libcamera/ipa/raspberrypi_ipa_interface.h>
#include <libcamera/stream.h>
#include "libcamera/internal/v4l2_videodevice.h"
@@ -23,6 +22,14 @@ namespace RPi {
using BufferMap = std::unordered_map<unsigned int, FrameBuffer *>;
+enum BufferMask {
+ MaskID = 0x00ffff,
+ MaskStats = 0x010000,
+ MaskEmbeddedData = 0x020000,
+ MaskBayerData = 0x040000,
+ MaskExternalBuffer = 0x100000,
+};
+
/*
* Device stream abstraction for either an internal or external stream.
* Used for both Unicam and the ISP.
@@ -31,13 +38,13 @@ class Stream : public libcamera::Stream
{
public:
Stream()
- : id_(ipa::RPi::MaskID)
+ : id_(BufferMask::MaskID)
{
}
Stream(const char *name, MediaEntity *dev, bool importOnly = false)
: external_(false), importOnly_(importOnly), name_(name),
- dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(ipa::RPi::MaskID)
+ dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(BufferMask::MaskID)
{
}