summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp44
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp34
-rw-r--r--src/libcamera/pipeline/uvcvideo.cpp40
-rw-r--r--src/libcamera/pipeline/vimc.cpp40
4 files changed, 79 insertions, 79 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 3acf82ff..5b46fb68 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -145,6 +145,25 @@ public:
ImgUDevice::ImgUOutput *device_;
};
+class IPU3CameraData : public CameraData
+{
+public:
+ IPU3CameraData(PipelineHandler *pipe)
+ : CameraData(pipe)
+ {
+ }
+
+ void imguOutputBufferReady(Buffer *buffer);
+ void imguInputBufferReady(Buffer *buffer);
+ void cio2BufferReady(Buffer *buffer);
+
+ CIO2Device cio2_;
+ ImgUDevice *imgu_;
+
+ IPU3Stream outStream_;
+ IPU3Stream vfStream_;
+};
+
class PipelineHandlerIPU3 : public PipelineHandler
{
public:
@@ -167,25 +186,6 @@ public:
bool match(DeviceEnumerator *enumerator) override;
private:
- class IPU3CameraData : public CameraData
- {
- public:
- IPU3CameraData(PipelineHandler *pipe)
- : CameraData(pipe)
- {
- }
-
- void imguOutputBufferReady(Buffer *buffer);
- void imguInputBufferReady(Buffer *buffer);
- void cio2BufferReady(Buffer *buffer);
-
- CIO2Device cio2_;
- ImgUDevice *imgu_;
-
- IPU3Stream outStream_;
- IPU3Stream vfStream_;
- };
-
static constexpr unsigned int IPU3_BUFFER_COUNT = 4;
IPU3CameraData *cameraData(const Camera *camera)
@@ -749,7 +749,7 @@ int PipelineHandlerIPU3::registerCameras()
* Buffers completed from the ImgU input are immediately queued back to the
* CIO2 unit to continue frame capture.
*/
-void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer)
+void IPU3CameraData::imguInputBufferReady(Buffer *buffer)
{
cio2_.output_->queueBuffer(buffer);
}
@@ -760,7 +760,7 @@ void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer)
*
* Buffers completed from the ImgU output are directed to the application.
*/
-void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer)
+void IPU3CameraData::imguOutputBufferReady(Buffer *buffer)
{
Request *request = buffer->request();
@@ -785,7 +785,7 @@ void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer)
* Buffers completed from the CIO2 are immediately queued to the ImgU unit
* for further processing.
*/
-void PipelineHandlerIPU3::IPU3CameraData::cio2BufferReady(Buffer *buffer)
+void IPU3CameraData::cio2BufferReady(Buffer *buffer)
{
imgu_->input_->queueBuffer(buffer);
}
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index c8d217ab..8b279e76 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -28,6 +28,23 @@ namespace libcamera {
LOG_DEFINE_CATEGORY(RkISP1)
+class RkISP1CameraData : public CameraData
+{
+public:
+ RkISP1CameraData(PipelineHandler *pipe)
+ : CameraData(pipe), sensor_(nullptr)
+ {
+ }
+
+ ~RkISP1CameraData()
+ {
+ delete sensor_;
+ }
+
+ Stream stream_;
+ CameraSensor *sensor_;
+};
+
class PipelineHandlerRkISP1 : public PipelineHandler
{
public:
@@ -51,23 +68,6 @@ public:
bool match(DeviceEnumerator *enumerator) override;
private:
- class RkISP1CameraData : public CameraData
- {
- public:
- RkISP1CameraData(PipelineHandler *pipe)
- : CameraData(pipe), sensor_(nullptr)
- {
- }
-
- ~RkISP1CameraData()
- {
- delete sensor_;
- }
-
- Stream stream_;
- CameraSensor *sensor_;
- };
-
static constexpr unsigned int RKISP1_BUFFER_COUNT = 4;
RkISP1CameraData *cameraData(const Camera *camera)
diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp
index 120d8d3a..4ffe52aa 100644
--- a/src/libcamera/pipeline/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo.cpp
@@ -20,6 +20,25 @@ namespace libcamera {
LOG_DEFINE_CATEGORY(UVC)
+class UVCCameraData : public CameraData
+{
+public:
+ UVCCameraData(PipelineHandler *pipe)
+ : CameraData(pipe), video_(nullptr)
+ {
+ }
+
+ ~UVCCameraData()
+ {
+ delete video_;
+ }
+
+ void bufferReady(Buffer *buffer);
+
+ V4L2Device *video_;
+ Stream stream_;
+};
+
class PipelineHandlerUVC : public PipelineHandler
{
public:
@@ -42,25 +61,6 @@ public:
bool match(DeviceEnumerator *enumerator) override;
private:
- class UVCCameraData : public CameraData
- {
- public:
- UVCCameraData(PipelineHandler *pipe)
- : CameraData(pipe), video_(nullptr)
- {
- }
-
- ~UVCCameraData()
- {
- delete video_;
- }
-
- void bufferReady(Buffer *buffer);
-
- V4L2Device *video_;
- Stream stream_;
- };
-
UVCCameraData *cameraData(const Camera *camera)
{
return static_cast<UVCCameraData *>(
@@ -206,7 +206,7 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)
return true;
}
-void PipelineHandlerUVC::UVCCameraData::bufferReady(Buffer *buffer)
+void UVCCameraData::bufferReady(Buffer *buffer)
{
Request *request = queuedRequests_.front();
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
index f6aa3268..ed5b1ad4 100644
--- a/src/libcamera/pipeline/vimc.cpp
+++ b/src/libcamera/pipeline/vimc.cpp
@@ -20,6 +20,25 @@ namespace libcamera {
LOG_DEFINE_CATEGORY(VIMC)
+class VimcCameraData : public CameraData
+{
+public:
+ VimcCameraData(PipelineHandler *pipe)
+ : CameraData(pipe)
+ {
+ }
+
+ ~VimcCameraData()
+ {
+ delete video_;
+ }
+
+ void bufferReady(Buffer *buffer);
+
+ V4L2Device *video_;
+ Stream stream_;
+};
+
class PipelineHandlerVimc : public PipelineHandler
{
public:
@@ -42,25 +61,6 @@ public:
bool match(DeviceEnumerator *enumerator) override;
private:
- class VimcCameraData : public CameraData
- {
- public:
- VimcCameraData(PipelineHandler *pipe)
- : CameraData(pipe)
- {
- }
-
- ~VimcCameraData()
- {
- delete video_;
- }
-
- void bufferReady(Buffer *buffer);
-
- V4L2Device *video_;
- Stream stream_;
- };
-
VimcCameraData *cameraData(const Camera *camera)
{
return static_cast<VimcCameraData *>(
@@ -202,7 +202,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
return true;
}
-void PipelineHandlerVimc::VimcCameraData::bufferReady(Buffer *buffer)
+void VimcCameraData::bufferReady(Buffer *buffer)
{
Request *request = queuedRequests_.front();